Zum Inhalt springen
Skillpedia
Sicherheit48k · #6094

varlock

Was er macht

Varlock ist ein Tool, das dir hilft, sensible Informationen (wie Passwörter und API-Keys) in deinen Programmierprojekten zu verwalten. Es sorgt dafür, dass diese Daten nicht versehentlich in Logs oder im Befehlsverlauf auftauchen, und macht deinen Code so sicherer.

Wann du ihn nutzt

  • ✓Wenn du in einem Projekt Passwörter oder API-Keys brauchst.
  • ✓Wenn du deinen Code oder Befehlsverlauf mit anderen teilst.
  • ✓Wenn du sicherstellen willst, dass vertrauliche Informationen nicht in Fehlermeldungen auftauchen.

Link zum Skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/varlock/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/varlock/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Wie kann ich prüfen, ob mein API-Key richtig eingerichtet ist, ohne ihn preiszugeben?”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Varlock arbeitet mit Regeln, die festlegen, wie sensible Informationen behandelt werden. Das Tool kann prüfen, ob die nötigen Werte vorhanden sind, und die eigentlichen Werte in jeder Ausgabe unkenntlich machen, sodass sie nicht sichtbar werden.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von 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 .env inspection.

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


…
Häufige Fragen

Was sind 'Environment Variables'?

Das sind wie Haftnotizen für dein Programm, auf denen du Informationen wie Passwörter oder API-Keys ablegst, anstatt sie direkt in den Code zu schreiben. Varlock hilft dir, diese Notizen sicher zu verwalten.

Warum sollte ich Passwörter oder API-Keys nicht zeigen?

Wenn diese Daten offen sichtbar sind, können Angreifer sich Zugriff auf deine Konten oder Daten verschaffen. Das ist, als würdest du deinen Wohnungsschlüssel für alle sichtbar liegen lassen.

Was ist eine `.env.schema`-Datei?

Das ist eine Datei, die beschreibt, welche sensiblen Informationen dein Projekt braucht und wie sie aussehen müssen, zum Beispiel ob es sich um ein Passwort oder eine URL handelt. Sie enthält nicht die eigentlichen Werte, sondern nur die Regeln, und ist deshalb unbedenklich einsehbar.

Details

Originalbeschreibung des Autors

Secure-by-default environment variable management for Claude Code sessions.

repo: sickn33/agentic-awesome-skills

Beliebtheit

GitHub-Sterne
48k
Platz im Ranking
#6094
Lizenz
MIT
Aktualisiert
15.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills