Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

varlock

БесплатноБез исполняемых скриптовНе проверен

Secure environment variable management with Varlock. Use when handling secrets, API keys, credentials, or any sensitive configuration. Ensures secrets are…

dmno-devот dmno-dev★ 5 020 звёзд на GitHub

Об этом скилле

Varlock

This skill helps securely manage env vars and secrets in your project using varlock.

Docs: https://varlock.dev Repo: https://github.com/dmno-dev/varlock

Varlock uses .env.schema (instead of .env.example) to provide a single source of truth for your project's env vars. Schema info is expressed using @decorator style comments. Sensitive values can be set in git-ignored .env.local files, passed in via the environment, or use functions to load from secure backends like 1Password, Vault, AWS, etc.

Basic .env.schema example:

# @defaultSensitive=false @defaultRequired=infer
# @currentEnv=$APP_ENV
# @generateTsTypes(path=env.d.ts)
# ---

# @type=enum(dev, staging, prod)
APP_ENV=dev

# @type=url
API_URL=https://api.example.com

# Description of this var
# @sensitive @required @type=string(startsWith=sk-)
# @docs(https://xyzapi.com/docs/auth)
XYZ_API_KEY=

Your .env.schema is committed to version control and safe for agents to read and update. The varlock CLI helps load and validate env vars while masking anything sensitive, and can securely inject env vars into commands.

NOTE: If varlock is installed locally via package.json (not as a standalone binary), invoke it via your package manager — e.g., pnpm exec varlock load, bunx varlock load, npm exec varlock load. Check the project's package manager before running CLI commands.

CRITICAL: Security rules

These rules are non-negotiable:

Do not expose secrets

# NEVER do these - exposes secrets to agent context
cat .env
cat .env.local
echo $SECRET_KEY
printenv | grep API

# SAFE alternatives
varlock load --agent    # JSON output, sensitive values redacted
varlock load            # human-readable, sensitive values masked
cat .env.schema         # schema only, no secret values

If the user needs to see a sensitive value, tell them to run varlock reveal VAR_NAME.

File access rules

  • Safe to read and edit: .env.schema and any other git-committed .env files (usually env-specific files like .env.development)
  • Do not read or edit: .env, .env.local, .env.[env].local, or other gitignored value/override files — these may contain unencrypted secrets
  • Do not log or quote raw secret values in code, comments, or chat

Sensitivity rules

  • Items marked @sensitive must not have that decorator removed without confirming with the user
  • Ask the user to edit secret values in their local/gitignored env files or their secret provider (1Password, AWS, etc.) — never fill in secrets yourself

When the user asks to "show me the .env file"

Do not read .env or .env.local directly. Instead run varlock load to show masked values, or read .env.schema to show the schema. Explain that reading env files directly could expose secrets.

When the user asks to "update/set a secret"

Do not write secret values yourself. Tell the user to either:

  1. Update it in their secret provider (1Password, AWS, etc.) and then help them wire it up
  2. Edit the value in their .env.local file manually
  • ideally encrypt it by using varlock(prompt) as the value, then run varlock load to be prompted

Then run varlock load --agent to validate.

File roles

File Role Agent may edit?
.env.schema Schema, defaults, decorators, descriptions Yes
.env.[env] Environment-specific tracked config (e.g. .env.production) Yes
.env, .env.local Local/gitignored values and overrides No — tell user to edit
.env.[env].local Environment-specific local overrides (gitignored) No — tell user to edit
.env.example Legacy example file; migrate into schema Review with user

Ensure .env.schema and tracked env-specific files are not gitignored (!.env.schema, !.env.production, etc. in .gitignore if needed).

Environment-specific files and precedence

When @currentEnv is set in .env.schema (e.g., @currentEnv=$APP_ENV), varlock automatically loads matching environment-specific files. Files are applied in increasing precedence order:

.env.schema < .env < .env.local < .env.[currentEnv] < .env.[currentEnv].local < process.env

For example, if APP_ENV=staging, then .env.staging and .env.staging.local will be loaded automatically if they exist. A value in .env.local overrides one in .env.schema, and process.env always wins.

A bare KEY= sets no value at all, so it does not override a value from a lower-precedence file. Use KEY="" to override with an empty string.

Schema syntax

Root decorators (file header)

Root decorators go in comment blocks at the top of the file, before the first item. A # --- divider usually separates the header from items.

Decorator Purpose If absent
@currentEnv=$VAR Sets which item determines the active environment —
@defaultRequired=bool|infer Default required state for it
Полный SKILL.md на GitHub

Установить varlock в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл varlock?

Secure environment variable management with Varlock. Use when handling secrets, API keys, credentials, or any sensitive configuration. Ensures secrets are never exposed in terminal, logs, or LLM context. Provides guidance around integrating varlock into a project, reading/editing .env.schema and other .env files, using the varlock CLI, adding plugins and framework integrations. Trigger phrases include "environment variable", "env var", "secrets", ".env", "API key", "credentials", "sensitive", "varlock"

Как установить скилл varlock?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл varlock запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить varlock с