본문으로 건너뛰기
Skillpedia
보안48k · #6094

varlock

하는 일

Varlock은 프로그래밍 프로젝트에서 비밀번호와 API 키 같은 민감한 정보를 관리하는 도구입니다. 이런 정보가 로그나 명령 기록에 실수로 보이지 않도록 해서 코드를 더 안전하게 지킵니다.

사용하는 경우

  • ✓프로젝트에서 비밀번호나 API 키를 사용해야 할 때.
  • ✓코드나 명령 기록을 다른 사람과 공유할 때.
  • ✓기밀 정보가 오류 로그에 노출되지 않도록 할 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/varlock/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“API 키를 드러내지 않고 제대로 설정되었는지 어떻게 확인하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

Varlock은 민감한 정보를 다루는 규칙을 정하는 방식으로 작동합니다. 필요한 정보가 있는지 검증하고, 모든 출력에서 실제 값을 가려 보이지 않도록 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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


…
자주 묻는 질문

'환경 변수'는 무엇인가요?

비밀번호나 API 키 같은 정보를 코드에 직접 쓰지 않고 저장할 수 있는 프로그램의 '메모지'와 비슷합니다. Varlock은 이 메모지를 안전하게 관리하도록 돕습니다.

비밀번호나 API 키를 보여 주면 안 되는 이유는 무엇인가요?

이런 정보가 노출되면 악의적인 사람이 계정이나 데이터에 접근할 수 있습니다. 집 열쇠를 모두가 보는 곳에 두는 것과 같습니다.

`.env.schema` 파일은 무엇인가요?

프로젝트에 필요한 민감한 정보와 그 형식(예: 비밀번호인지, URL인지)을 설명하는 파일입니다. 실제 값은 들어 있지 않고 규칙만 있어서 보는 것이 안전합니다.

상세 정보

작성자의 원본 설명

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

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#6094
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬