secrets-scan
Skill2 starsChanged 4 months agoMITView on GitHub
Scan the working tree and git history for hardcoded secrets — API keys, tokens, passwords, private keys, connection strings — and report what to rotate and remove. Use when the user says "scan for secrets", "check for leaked credentials", "any hardcoded keys", "did I commit a secret", "find exposed tokens", or "audit for credentials".
- Reads credentials
8 other projects use a version of this.
Adopted by
Most recently taken up by
- mdigital94/vibe-shield-plugintheir own version, first seen Nov 8, 2026
- Smaui94/ClaudeSkillCollectiontheir own version, first seen Nov 8, 2026
- Phaedra-Solutions/cursor-rulestheir own version, first seen Nov 8, 2026
- manastalukdar/ai-devstudiotheir own version, first seen Oct 13, 2026
- NinjaSln-labs/agent-skillstheir own version, first seen Oct 2, 2026
- lglucas/ai-dev-operating-systemtheir own version, first seen Sep 28, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- lglucas/ai-dev-operating-system★ 12same name
- Phaedra-Solutions/cursor-rules★ 4same name
- manastalukdar/ai-devstudio★ 1same name
- NinjaSln-labs/agent-skills★ 1same name
- Jinbae10/skills★ 0same name
- mdigital94/vibe-shield-plugin★ 0same name
- mguttmann/code-audit-suite★ 0same name
- Smaui94/ClaudeSkillCollection★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository68 other files it gives its agents.
- a11ySkill
- api-docsSkill
- audit-logSkill
- benchmarkSkill
- bisectSkill
- cacheSkill
- changelogSkill
- cherry-pickSkill
- ci-setupSkill
- codeownersSkill
- commit-messageSkill
- connection-poolSkill
- contributingSkill
- coverageSkill
- db-migrateSkill
- dead-codeSkill
- debugSkill
- depsSkill
- diagramSkill
- dockerizeSkill
- docstringSkill
- e2eSkill
- env-exampleSkill
- error-handlingSkill
- explainSkill
- feature-flagSkill
- flaky-testSkill
- gitignoreSkill
- graceful-shutdownSkill
- graphqlSkill
- healthcheckSkill
- i18nSkill
- idempotencySkill
- licenseSkill
- lint-fixSkill
- loggingSkill
- migrateSkill
- mockSkill
- onboardSkill
- optimizeSkill
- paginationSkill
- pr-descriptionSkill
- pre-commitSkill
- profileSkill
- prune-branchesSkill
- rate-limitSkill
- readmeSkill
- rebaseSkill
- refactorSkill
- regexSkill
- releaseSkill
- resolve-conflictsSkill
- retrySkill
- review-diffSkill
- scaffoldSkill
- security-headersSkill
- seedSkill
- soft-deleteSkill
- sqlSkill
- squashSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Check whether secret-bearing files are tracked: If .env (or similar) is committed, that's a finding on its own — confirm it's in .gitignore …
- Very specific: line 30
Scan history when warranted: Use git log -p -S<token> or git log --all --full-history -- <file> to see if a secret was ever committed, even …
- Very specific: line 31
Rule out false positives: Read each hit in context: placeholders (your-api-key-here, xxx, changeme), example/test fixtures, public keys, …
- Distinctive: line 39
Purge from history: if needed (git filter-repo / BFG) — note this rewrites history and requires coordination.
- Distinctive: line 44
Read each match in context before reporting — distinguish real credentials from placeholders, examples, and public keys.
- Distinctive: line 45
Read-only: do not edit files, rewrite history, or run installs.
- Distinctive: line 47
If the scan comes back clean, say so plainly and note what you checked.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Scan surface
!git ls-files 2>/dev/null | grep -viE '\.(png|jpg|jpeg|gif|svg|ico|woff2?|ttf|lock)$' | head -50 || ls 2>/dev/null
!ls .env .env.* .gitignore 2>/dev/null
!git log --oneline -5 2>/dev/null
Instructions
Scan this project for hardcoded secrets and credentials (focused on $ARGUMENTS if a path was given). Cover the working tree, and check git history when the user asks or when a tracked .env-style file is found.
Method
- Grep for high-signal patterns across tracked files. Look for:
- Cloud/provider keys —
AKIA[0-9A-Z]{16}(AWS),AIza[0-9A-Za-z_-]{35}(Google),ghp_/gho_/github_pat_(GitHub),sk-/sk-ant-(OpenAI/Anthropic),xox[baprs]-(Slack),glpat-(GitLab), Stripesk_live_/rk_live_. - Generic assignments —
(api[_-]?key|secret|token|password|passwd|pwd|access[_-]?key|client[_-]?secret)\s*[:=]\s*['"][^'"]{8,}. - Private keys —
-----BEGIN (RSA |EC |OPENSSH |PGP )?PRIVATE KEY-----. - Connection strings with embedded credentials —
(postgres|mysql|mongodb|redis|amqp)(\+srv)?://[^:@\s]+:[^@\s]+@. - JWTs —
eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\..
- Cloud/provider keys —
- Check whether secret-bearing files are tracked. If
.env(or similar) is committed, that's a finding on its own — confirm it's in.gitignoreand flag it forgit rm --cached. - Scan history when warranted. Use
git log -p -S<token>orgit log --all --full-history -- <file>to see if a secret was ever committed, even if since removed — it still needs rotating. - Rule out false positives. Read each hit in context: placeholders (
your-api-key-here,xxx,changeme), example/test fixtures, public keys, and.env.exampletemplates are not leaks. Don't cry wolf.
Output
For each real finding: the file:line, what kind of secret it is, and whether it's in the working tree, history, or both. Then a prioritized remediation list:
- Rotate first — any secret that was ever committed must be treated as compromised and rotated at the provider, regardless of removal.
- Remove from code — move it to an env var / secret manager; add the file to
.gitignore. - Purge from history if needed (
git filter-repo/ BFG) — note this rewrites history and requires coordination.
Rules
- Never print full secret values in your output — show a masked preview (first/last few chars) so the user can locate it without re-leaking it.
- Read each match in context before reporting — distinguish real credentials from placeholders, examples, and public keys.
- Read-only: do not edit files, rewrite history, or run installs. Recommend the commands; let the user run them.
- Removing a secret from the current code does not un-leak it — always tell the user to rotate anything that was committed.
- If the scan comes back clean, say so plainly and note what you checked.
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.

