treybae

Claude Secret Guard — Development skill for Claude Code

Development community

Your shell holds the keys to production.

How to install Claude Secret Guard

This entry records only its repository, not the path inside it, so there is no exact command to give. Open treybae/claude-secret-guard and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude Secret Guard does

Your shell holds the keys to production. secret-guard stops Claude Code from reading, printing or leaking them: it blocks risky commands and file reads, and redacts secrets from tool output before Claude sees them.

Alternatives in Development

  • Identify Assumptions Existing — Identify risky assumptions across Value, Usability, Viability, Feasibility 7.8k ★
  • Agentic Coding Practices — Agentic coding practices: what agents changed in how software gets built, and what still holds up 353 ★
  • Pi Warden — Zero-key runtime guardrails for Pi, Claude Code, and Codex — blocks destructive commands and secret exfiltrati 199 ★

README

secret-guard: a pixel-art three-headed dog standing guard on a gold key

secret-guard

Your shell holds the keys to production: cloud credentials, GitHub and Vault tokens, kubeconfigs, API keys in dotfiles. Claude Code's auto mode makes agents fast because they act without asking, but that also means one stray `cat ~/.zshrc` or `vault kv get` can put a live credential into an AI transcript. Turning auto mode off is safe but slow. secret-guard gives you both: it blocks commands and file reads that expose credentials, redacts secrets from anything a tool returns before Claude sees it, and logs what it did in `/secret-guard`. Install it once, keep auto mode on.

It does four things, in every permission mode, including auto and inside subagents:

  1. Blocks shell commands that touch credential files. Any command that mentions ~/.zshrc, ~/.zprofile, ~/.zshenv, ~/.zlogin, ~/.bashrc, ~/.bash_profile, ~/.profile, ~/.netrc, ~/.vault-token, ~/.git-credentials, ~/.npmrc, ~/.pypirc, ~/.terraformrc, ~/.terraform.d/credentials.tfrc.json, ~/.docker/config.json, or anything in ~/.aws, ~/.ssh, ~/.kube, ~/.gnupg, ~/.azure, ~/.config/op, ~/.config/gh or ~/.config/gcloud. That includes $HOME/..., absolute paths, and relative spellings after cd ~.
  2. Blocks environment dumps and commands that print secrets. env, printenv, export -p, declare -x and a bare set, plus:
    • op read, op item get --reveal, op run --no-masking
    • vault read, vault kv get, vault token lookup / create, vault print token, vault login
    • aws configure get / export-credentials, aws sts get-session-token, aws ecr get-login-password on its own, aws secretsmanager get-secret-value, aws ssm get-parameter --with-decryption
    • gh auth token, gh auth status --show-token
    • kubectl get secret … -o yaml|json|jsonpath|go-template