/guardrails:local-secretsfrom guardrails
Keeps secrets out of repositories by storing names in source and values in the OS keychain. Provides shell scripts to get, set, and forget credentials.
Ships in guardrails. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A repository stores the name of a value, never the value. password,
api_key, token, client_secret, an account email, a DB user — all of them
are referenced by name and resolved at run time. This holds for private repos
too: history is forever, clones spread, and a private repo can be made public
by one click.
DB_PASSWORD="$(scripts/secret-get.sh LOCAL_DB_PASSWORD)" || exit 1
secret-get.sh prints the value on success. When nothing is stored it exits 1
and prints the exact command to ask for — do not invent a value, do not fall
back to a default, and do not put the value in the source file.
Ask the person to run it themselves, so the value goes from their keyboard to the keychain without passing through the conversation:
! <plugin>/scripts/secret-set.sh LOCAL_DB_PASSWORD
It prompts on their terminal, does not echo, and stores the value in the login keychain. After that every later run resolves it silently — nobody is asked twice.
If the person instead types a value into the chat, store it immediately with
secret-set.sh <NAME> --stdin and then say plainly that a value typed into the
conversation is also written to the session transcript on disk, so it should be
rotated if it matters.
Authentication failing is a signal the stored value is stale, not a reason to retry it:
scripts/secret-forget.sh LOCAL_DB_PASSWORD
Then ask for a fresh one exactly as above. Never loop on a failing credential — several wrong attempts lock accounts.
.env.example listing names with empty or obviously fake values.Anything else — a real address, a real key, a working password, a personal login — is a finding the pre-commit secret scan is meant to block, and a reviewer must treat as blocking.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub kulykivska/claude-plugins --plugin guardrails