/security-guardrails:secret-leak-preflightfrom security-guardrails
Scans staged git diffs and untracked files for secrets (API keys, tokens, private keys) before commit or push. Prevents credential leaks into git history.
Ships in security-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.
Catch secrets before they enter git history or a published artifact. A leaked credential in a commit is a rotation incident even after the file is deleted — history retains it. The preflight is the last cheap moment to stop that.
Scan the staged diff — not the worktree. What gets committed is the staged content:
git diff --cached | rg -n 'AKIA[0-9A-Z]{16}|ghp_[A-Za-z0-9]{36}|github_pat_|sk-[A-Za-z0-9]{20,}|xox[baprs]-|-----BEGIN [A-Z ]*PRIVATE KEY-----'
git diff --cached | rg -in '(api[_-]?key|secret|token|password|bearer)\s*[:=]'
Review untracked files before adding. New environment or credential files are the classic leak:
git status --short
Anything with env, credential, key, or pem in its name gets opened and inspected before any git add.
Check generated artifact directories. Relay turn artifacts and logs can embed tokens captured from tool output; confirm those directories are gitignored and excluded from what is being committed or published.
Spot-check high-entropy strings. Pattern lists miss rotated formats; a long random-looking constant in a diff deserves one deliberate look.
On a hit: stop. Unstage the file, remove the secret, and treat the value as compromised — recommend rotation. If it already exists in history, plan a history purge with the user; never rewrite or force-push history without explicit approval.
State the verdict explicitly. Silence is not a pass — say "no secrets found in staged changes" or list the findings.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub yeaight7/agent-powerups --plugin security-guardrails6 skills in this plugin
/agent-config-security-auditUse when modifying agent config files, committing configuration changes, onboarding a repository with existing agent configs, or running a periodic config hygiene check./filesystem-mcp-guardrailsUse when designing or reviewing filesystem MCP access, path boundaries, allowed roots, method allowlists, and safe local file operations./hook-safety-reviewUse when a hook is about to be enabled or modified -- a hook recipe proposed for activation, a pre/post-tool or lifecycle hook added to agent settings, a git pre-commit hook added to a repo, or a third-party hook snippet pasted in from outside.Other plugins' skills for the same job