varlock
What it does
Varlock is a tool that helps manage sensitive information (like passwords and API keys) in your programming projects. It ensures these details are never accidentally shown in logs or command history, keeping your code safer.
When to use it
- βWhen you need to use passwords or API keys in a project.
- βWhen sharing your code or command history with others.
- βTo ensure confidential information isn't exposed in error logs.
Skill link
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/varlock/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βHow can I check if my API key is set up correctly without revealing it?β
5 new skills a week. 1 minute to read.
How it works
Varlock works by setting rules for how sensitive information should be handled. It can validate that necessary information is present and mask the actual values in any output, preventing them from being seen.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Varlock Security Skill
Secure-by-default environment variable management for Claude Code sessions.
Repository: https://github.com/dmno-dev/varlock Documentation: https://varlock.dev
When to Use
- You need to work with environment variables or secrets in a Claude Code session without exposing their values.
- The task involves validating, loading, or auditing secrets while keeping them out of logs, diffs, and assistant context.
- You want a secure-by-default workflow built around Varlock instead of direct
.envinspection.
Core Principle: Secrets Never Exposed
When working with Claude, secrets must NEVER appear in:
- Terminal output
- Claude's input/output context
- Log files or traces
- Git commits or diffs
- Error messages
This skill ensures all sensitive data is properly protected.
CRITICAL: Security Rules for Claude
Rule 1: Never Echo Secrets
# β NEVER DO THIS - exposes secret to Claude's context
echo $CLERK_SECRET_KEY
cat .env | grep SECRET
printenv | grep API
# β
DO THIS - validates without exposing
varlock load --quiet && echo "β Secrets validated"
Rule 2: Never Read .env Directly
# β NEVER DO THIS - exposes all secrets
cat .env
less .env
Read tool on .env file
# β
DO THIS - read schema (safe) not values
cat .env.schema
varlock load # Shows masked values
Rule 3: Use Varlock for Validation
# β NEVER DO THIS - exposes secret in error
test -n "$API_KEY" && echo "Key: $API_KEY"
# β
DO THIS - Varlock validates and masks
varlock load
# Output shows: API_KEY πsensitive β βββββ
Rule 4: Never Include Secrets in Commands
# β NEVER DO THIS - secret in command history
curl -H "Authorization: Bearer sk_live_xxx" https://api.example.com
# β
DO THIS - use environment variable
curl -H "Authorization: Bearer $API_KEY" https://api.example.com
# Or better: varlock run -- curl ...
Quick Start
Installation
# Install Varlock CLI
tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT
curl -sSfL https://varlock.dev/install.sh -o "$tmpdir/varlock-install.sh"
cat "$tmpdir/varlock-install.sh" # review the full installer before executing
sh "$tmpdir/varlock-install.sh" --force-no-brew
# Add to PATH (add to ~/.zshrc or ~/.bashrc)
export PATH="$HOME/.varlock/bin:$PATH"
# Verify
varlock --version
Initialize Project
# Create .env.schema from existing .env
varlock init
# Or create manually
touch .env.schema
Schema File: .env.schema
The schema defines types, validation, and sensitivity for each variable.
Basic Structure
# Global defaults
# @defaultSensitive=true @defaultRequired=infer
# Application
# @type=enum(development,staging,production) @sensitive=false
NODE_ENV=development
# @type=port @sensitive=false
PORT=3000
# Database - SENSITIVE
# @type=url @required
DATABASE_URL=
# @type=string @required @sensitive
DATABASE_PASSWORD=
# API Keys - SENSITIVE
# @type=string(startsWith=sk_) @required @sensitive
STRIPE_SECRET_KEY=
# @type=string(startsWith=pk_) @sensitive=false
STRIPE_PUBLISHABLE_KEY=
Security Annotations
| Annotation | Effect | Use For |
|---|---|---|
@sensitive |
Redacted in all output | API keys, passwords, tokens |
@sensitive=false |
Shown in logs | Public keys, non-secret config |
@defaultSensitive=true |
All vars sensitive by default | High-security projects |
Type Annotations
| Type | Validates | Example |
|---|---|---|
string |
Any string | @type=string |
string(startsWith=X) |
Prefix validation | @type=string(startsWith=sk_) |
string(contains=X) |
Substring validation | @type=string(contains=+clerk_test) |
url |
Valid URL | @type=url |
port |
1-65535 | @type=port |
boolean |
true/false | @type=boolean |
enum(a,b,c) |
One of values | @type=enum(dev,prod) |
Safe Commands for Claude
Validating Environment
# Check all variables (safe - masks sensitive values)
varlock load
# Quiet mode (no output on success)
varlock load --quiet
# Check specific environment
varlock load --env=production
Running Commands with Secrets
# Inject validated env into command
varlock run -- npm start
varlock run -- node script.js
varlock run -- pytest
# Secrets are available to the command but never printed
Checking Schema (Safe)
# Schema is safe to read - contains no values
cat .env.schema
β¦
FAQ
What are 'environment variables'?
They are like sticky notes for your program where you can store information like passwords or API keys, instead of writing them directly in the code. Varlock helps manage these notes securely.
Why shouldn't I show my passwords or API keys?
Showing these details can allow malicious actors to steal access to your accounts or data. It's like leaving your house key in plain sight for everyone.
What is a `.env.schema` file?
It's a file that describes what sensitive information your project needs and how it should be (e.g., if it's a password or a URL). It doesn't contain the actual values, just the rules, making it safe to view.
Details
Original description by the author
Secure-by-default environment variable management for Claude Code sessions.
Popularity
- GitHub stars
- 48k
- Ranking position
- #6094
- License
- MIT
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
00-andruia-consultant
48kHelps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
007
48kLets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
10-andruia-skill-smith
48kHelps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
20-andruia-niche-intelligence
48kLets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.