/secrets-guard:secrets-cleanupfrom secrets-guard
Find already-committed secrets in a repository (passwords, tokens, credentials inside URLs, cloud keys, "convenient" defaults in os.getenv) and prepare the rotation: a masked table of findings, replacement with reads from the environment, and a ticket. Use when asked to "scan this repo for secrets", "are there passwords in the code", "clean up the credentials", "prepare a rotation", "why is the secrets-guard hook complaining about an old file". Not for setting up access, and not for checking a single commit - the hook does that by itself.
Ships in secrets-guard. 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.
The secrets-guard hook keeps new secrets out of commits and pushes. It cannot see the
old ones — that is what this is for.
Scanner: ${CLAUDE_PLUGIN_ROOT}/scripts/secrets_scan.py. It shares its detectors with the
hook (hooks/secret_patterns.py), so the two never disagree about what counts.
python3 secrets_scan.py <repo> — tracked files. Add --history --commits 300 to also
read added lines from history (slower). --out findings.md writes a file.ab***yz); if you
have to open the file, do not quote the whole line back into the chat.os.environ["VAR"] with no default, so a missing value fails loudly. In
YAML, ${VAR} with substitution at load time. A default that silently keeps the old
password is how these survive for years.Placeholders (<token>, ${VAR}, changeme), reads from the environment and empty values
are already skipped. If a test fixture still trips a detector, say so in the ticket rather
than disabling the detector — and if it recurs, add it to the ignore_regexes list in
~/.config/secrets-guard/patterns.json.
The hook's own bypass at commit time is SECRETS_GUARD_ALLOW=1, and it is logged.
It does not rewrite history. If a secret must genuinely disappear from the repository —
not merely be rotated — that is git filter-repo or BFG, a force push, and a coordinated
re-clone by everyone. Say so explicitly instead of implying the scan cleaned anything up.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub viderstar/secrets-guard --plugin secrets-guard