baselane-sh

Claude Secret Guard Kit — Development skill for Claude Code

Development community

Block Claude Code from reading, echoing, or committing your secrets.

How to install Claude Secret Guard Kit

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

What Claude Secret Guard Kit does

Block Claude Code from reading, echoing, or committing your secrets. Read-deny rules + shell filename guard + credential-value guard, one-command install.

Alternatives in Development

  • CORS — Scan an endpoint for CORS misconfiguration — arbitrary-origin reflection, null-origin trust, credential exposu 4.5k ★
  • Voice Guard — Use to check ONE already-written piece of copy against a voice guide before it ships — it spawns ONE fresh sib 130 ★
  • Replicate — Demonstrate-first replication of a paper's method before committing to a build 61 ★

README

Claude Secret Guard Kit

Stop Claude Code from reading, echoing, or committing your secrets. One command.

Claude Code is powerful in auto/accept mode, but it will happily `cat` your `.env`, pull a private key into context (which is then sent to the model and saved in the local transcript), or write a token into a logline or commit. This kit adds six layers of protection so that does not happen by accident.

What it does

Layer Covers Mechanism
1. Read block Read tool opening .env, *.pem, *.key, id_rsa, secrets.json, ... native permissions.deny rules
2. Shell guard cat / grep / cp / scp of those same files secret-filename-guard hook (PreToolUse Bash)
3. Value guard Live credential values (AWS, GitHub, Anthropic, OpenAI, Google, Slack, Stripe, JWTs, DB URLs with a password, npm, SendGrid, Twilio, GCP service accounts, Azure, Hugging Face, private keys) pasted, written, or committed secret-guard hook (PreToolUse + UserPromptSubmit)
4. Commit guard Secrets already sitting in files when you git commit: scans the staged diff (and unstaged tracked changes with -a) for credential values and secret-named files secret-commit-guard hook (PreToolUse Bash)
5. Env and exfil guard env / printenv dumps, echo $SECRET_VAR, /proc/*/environ, and curl / wget / nc sending a $variable, an @file, or piped content to a remote host env-exfil-guard hook (PreToolUse Bash)
6. Output guard A credential that lands in a tool result (a cat, a log, a Read). Cannot un-read it, but tells the model not to repeat, store, or commit it, names the source, and asks you to rotate secret-output-guard hook (PostToolUse Bash, Read)

All guards share one pattern list, `hooks/secret-patterns.sh`, so a shape added there is caught everywhere. Layer 1 hard-blocks. Layers 2 to 5 pause and ask you to confirm, so normal work (like a recursive `gre