secret-scan
Skill1 starsChanged 16 days agoMITView on GitHub
Find leaked API keys, tokens and passwords in files, commits, history or pasted text, and stop your coding agent from writing or committing them. Use when: Check a repository and its full git history before making it public; Block commits that contain API keys with a pre-commit hook; Stop Claude Code from hardcoding a key or committing one.
- Reads credentials
8 other projects use a version of this.
Adopted by
Most recently taken up by
- Vulnetix/pix-ai-coding-assistanttheir own version, first seen Nov 12, 2026
- matheuskotayko/skillstheir own version, first seen Nov 1, 2026
- Quality-Max/free-qa-skillstheir own version, first seen Oct 25, 2026
- KaryawanSurga/tokensaver-plugintheir own version, first seen Oct 8, 2026
- PerryLink/dsh-skill-pack-securitytheir own version, first seen Aug 15, 2026
- KhaledSaeed18/dotclaudetheir own version, first seen Jul 4, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- PerryLink/dsh-skill-pack-security★ 22same name
- Quality-Max/free-qa-skills★ 13same name
- Vulnetix/pix-ai-coding-assistant★ 9same name
- KhaledSaeed18/dotclaude★ 5same name
- kronus-tech/kronus★ 4same name
- KaryawanSurga/tokensaver-plugin★ 1same name
- matheuskotayko/skills★ 0same name
- vbrevik/claude_code_skills★ 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 repository79 other files it gives its agents.
- nex-ai-skillsSkill
- agent-checkpointSkill
- agent-ready-website-converterSkill
- fastapi-repo-security-preflightSkill
- kostprijs-calculatorSkill
- landing-page-conversion-auditSkill
- md-context-writerSkill
- nex-accent-contrast-extSkill
- nex-ada-web-accessibilitySkill
- nex-ai-literacy-packSkill
- nex-auto-sector-packSkill
- nex-belgian-search-trinitySkill
- nex-bom-normalizerSkill
- nex-brand-palette-liteSkill
- nex-clean-copy-extSkill
- nex-clean-page-extSkill
- nex-cold-mail-1-templateSkill
- nex-color-spy-extSkill
- nex-component-library-formatterSkill
- nex-coppa-2026-packSkill
- nex-datasheet-extractorSkill
- nex-einvoice-deSkill
- nex-einvoice-esSkill
- nex-einvoice-frSkill
- nex-einvoice-plSkill
- nex-employee-handbook-usSkill
- nex-eu-accessibility-auditSkill
- nex-eudr-due-diligenceSkill
- nex-eu-hardware-compliance-docsSkill
- nex-favv-food-packSkill
- nex-font-grab-extSkill
- nex-frame-it-extSkill
- nex-full-capture-extSkill
- nex-gdpr-deepeningSkill
- nex-govcon-capture-packSkill
- nex-grant-writer-usSkill
- nex-hipaa-small-practiceSkill
- nex-hoa-management-packSkill
- nex-iso27001-kmo-packSkill
- nex-kinderopvang-adminSkill
- nex-kmo-portefeuille-flowSkill
- nex-landbouw-adminSkill
- nex-life-loggerSkill
- nex-manufacturing-handoff-packSkill
- nex-mcp-client-deliverySkill
- nex-medical-billing-priorauthSkill
- nex-meeting-finderSkill
- nex-offerte-generatorSkill
- nex-one-sector-classifierSkill
- nex-overheidsopdrachten-tenderSkill
- nex-page-watchSkill
- nex-prompt-booster-extSkill
- nex-property-mgmt-usSkill
- nex-receipt-vaultSkill
- nex-riziv-zorgpraktijkSkill
- nex-sales-tax-nexusSkill
- nex-screencast-cleanerSkill
- nex-single-section-htmlSkill
- nex-site-trust-extSkill
- nex-syndicus-vme-packSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
4
Distinctive
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
- Distinctive: line 47
Check a repository and its full git history before making it public
- Distinctive: line 49
Stop Claude Code from hardcoding a key or committing one
- Distinctive: line 51
Check text for keys before pasting it into a chat, ticket or document
- Very specific: line 88
Rewrite history: before publishing, since the repo is going public: git filter-repo --replace-text on a mirror clone (exact commands are in …
- Distinctive: line 104
Add secret-scan: allow on the line, add the fingerprint to .secretscanignore, or create a baseline for an existing repo.
“Common” is measured: kept by at least 6 in 10 of the 6 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
Secret Scan
Free skill by Nex AI. This file is the public guide from Agensi. Scripts, extension source, and templates from the original package are not in this folder.
What it does
One Python file that finds API keys, tokens, private keys and passwords before they reach a commit, a pushed branch, a chat message or a published package. Standard library only, no network: your code and secrets never leave the machine.
secret_scan.py # working tree
secret_scan.py --staged # before a commit
secret_scan.py --diff origin/main # a branch or PR
secret_scan.py --history # every commit, every branch
secret_scan.py package.zip # a package before publishing
secret_scan.py --stdin # text before you paste itRules that fit real projects
- 39 provider-specific rules: Anthropic, OpenAI, AWS, GitHub, GitLab, Stripe, Slack, Google, Groq, Supabase, Databricks, Telegram, Discord, Twilio, SendGrid, npm, PyPI, Hugging Face, Shopify, DigitalOcean, Azure and more
- Tuned heuristics for passwords, connection strings, config values, bearer tokens and committed
.envfiles - Low noise: placeholders,
${VAR},os.environ[...], lockfiles and fixtures handled. Zero failing findings on two real open-source repositories of about 3,000 files - Output is always redacted, with where to rotate each key. JSON and SARIF for GitHub code scanning. Baseline for existing repos
Guard rails
- A git pre-commit hook that keeps your existing hook
- A Claude Code hook that blocks the agent from writing a key into a tracked file, or committing or pushing one (including
git add -A && git commit,git -C, and first pushes), tells it to use an environment variable instead, and cannot be waved through by the agent itself
Includes a remediation playbook (rotate first, then fix, then decide about history) and CI recipes. 102 automated tests; the fake tokens in them are assembled at runtime, so the package itself scans clean.
Built by Nex AI, nex-ai.be
When to use
- Check a repository and its full git history before making it public
- Block commits that contain API keys with a pre-commit hook
- Stop Claude Code from hardcoding a key or committing one
- Scan a package, skill or zip before publishing it
- Check text for keys before pasting it into a chat, ticket or document
Known limitations
Pattern and entropy based: it finds the formats it knows and secret-looking assignments, and does not call providers to check whether a key is live. Skips binaries, files over 2 MB, lockfiles and source maps. History scans cover commits reachable from refs, not stashes or the reflog.
Example
Request
I'm about to make this repo public. Check it for leaked keys first, including old commits.
Result
Not ready to go public yet: 3 secrets found
$ secret_scan.py --history
CRITICAL Anthropic API key
src/llm.py:2 @ 777f163563f4 (Dev)
sk-a************************rS fingerprint d0b5e145ef40a366
rotate: Claude Console, API keys: delete the key and create a new one.
HIGH Slack webhook URL
src/notify.py:1 @ 19b35b09f5ed (Dev)
http************************S7 fingerprint d560ac29ab5a8a8b
MEDIUM Secret-looking config value
config/settings.yml:3 @ 19b35b09f5ed (Dev)
3 finding(s) (git history): 1 critical, 1 high, 1 mediumThe Anthropic key is no longer in the code, but it is still in commit 777f163. Anyone who clones the public repo gets it.
Do this, in this order
- Rotate the Anthropic key in the Claude Console and the Slack webhook in your Slack app settings. Removing them from git does not make them safe.
- Move the values to the environment: I replaced them with
os.environ["ANTHROPIC_API_KEY"],os.environ["SLACK_WEBHOOK_URL"]and${DB_PASSWORD}, added the names to.env.example, and confirmed.envis git-ignored. - Rewrite history before publishing, since the repo is going public:
git filter-repo --replace-texton a mirror clone (exact commands are in references/remediation.md), then push the mirror. - Re-scan:
secret_scan.py --historymust come back clean. - Guard:
secret_scan.py install-hookblocks this at commit time from now on.
Questions
Does it check whether a key is live?
No. That would mean sending your keys to the provider. Treat high and critical findings as live and rotate them.
Gitleaks and TruffleHog already exist. Why this?
They are excellent in CI. This needs nothing installed beyond Python, runs anywhere an agent runs, and comes with the agent hook and the remediation playbook.
What if it flags something that is not a secret?
Add secret-scan: allow on the line, add the fingerprint to .secretscanignore, or create a baseline for an existing repo. In the Claude Code hook, only you can allow high and critical findings.
Built by Nex AI. More skills, including the paid catalog: https://www.agensi.io/creators/ch1n4-g3nd4x
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.

