secrets-check
Skill1 starsChanged 5 months agoMITView on GitHub
On-demand full-repo secret sweep — scan the working tree, staged changes, and git history for leaked keys, tokens, and credentials. The manual complement to the automatic scan-secrets PreToolUse hook, for auditing a repo before making it public or after a scare. Trigger phrases "check for secrets", "am I leaking anything", "scan the repo for secrets".
- Reads credentials
In this repository16 other files it gives its agents.
- catchupSkill
- claude-mdSkill
- context-budgetSkill
- db-querySkill
- debug-fixSkill
- eval-agentSkill
- explainSkill
- fix-issueSkill
- incident-ruleSkill
- pr-reviewSkill
- refactorSkill
- setup-projectSkill
- shipSkill
- tddSkill
- test-writerSkill
- trace-agentSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Confirm ignore hygiene first: Check .gitignore covers .env, .env.*, *.pem, *.key, secrets/, *.pfx, credential files.
- Distinctive: line 22
Scan tracked files (working tree): Search for high-signal patterns — do NOT print matched values in full, mask the middle:
- Distinctive: line 23
NOT print matched values in full, mask the middle:
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
secrets-check
Trigger: "check for secrets" / "am I leaking anything" / "scan the repo for secrets"
Standing rules: ../_conventions.md.
The scan-secrets hook guards new writes; this is the whole-repo audit. Report
every hit honestly — a false negative here can leak a key. Never print a real
secret value in full; mask it.
Steps
- Confirm ignore hygiene first. Check
.gitignorecovers.env,.env.*,*.pem,*.key,secrets/,*.pfx, credential files. If.envis NOT ignored, that's finding #1 — flag it loud. - Scan tracked files (working tree). Search for high-signal patterns — do
NOT print matched values in full, mask the middle:
- Anthropic:
sk-ant-keys. - OpenAI:
sk-/sk-proj-keys. - AWS:
AKIA[0-9A-Z]{16}access key ids. - GitHub:
ghp_/gho_/ghs_tokens. - Slack:
xoxb-/xoxp-tokens. - Google:
AIza[0-9A-Za-z_\-]{35}. - Private keys:
-----BEGIN (RSA |EC |OPENSSH )?PRIVATE KEY-----. - Generic:
password/secret/token/api_keyassigned a quoted literal (not aos.environ[...]/os.getenv(...)reference). - Connection strings with inline credentials (
://user:pass@host).
- Anthropic:
- Scan staged changes.
git diff --cachedfor anything about to be committed. - Scan history (the dangerous one).
git log -pgrep for the same patterns, or run a dedicated tool if available (gitleaks detect,trufflehog). A key removed from HEAD but still in history is still leaked. If found, say plainly: the key must be rotated AND history rewritten — removal from HEAD is not enough. - Report (terse): findings by severity —
location: <pattern> (masked)— history hits first. For each: the required action (rotate the key + where to move it to an env var). If clean, say the repo is clean across tree, staged, and history — and only because you scanned all three.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

