pre-push-secret-scan
Skill1 starsChanged 10 days agoMITView on GitHub
Scan a project folder for accidentally committed secrets (API keys, tokens, private keys, passwords) before pushing to GitHub or sharing code. Use whenever the user is about to publish a repo, push or zip code, asks 'is it safe to share this', or mentions leaked keys, .env files, or credentials in code.
- Reads credentials
In this repository26 other files it gives its agents.
- adr-writerSkill
- api-design-reviewSkill
- changelog-generatorSkill
- chart-selectorSkill
- code-reviewSkill
- commit-and-pr-writerSkill
- csv-profilerSkill
- debugging-playbookSkill
- docker-best-practicesSkill
- email-drafterSkill
- executive-summarySkill
- incident-postmortemSkill
- meeting-actionsSkill
- okr-writerSkill
- plain-language-editorSkill
- prd-writerSkill
- prompt-improverSkill
- readme-writerSkill
- refactoring-guideSkill
- resume-tailorSkill
- security-reviewSkill
- source-evaluatorSkill
- sql-optimizerSkill
- study-plan-builderSkill
- test-writerSkill
- my-skill-nameSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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
- Distinctive: line 12
Run the scanner on the project root:
- Distinctive: line 25
Remove it from code; load from environment variables or a secret manager.
- Distinctive: line 26
If it was ever committed, deleting the file is not enough.
- Very specific: line 27
Add prevention: .gitignore for .env*, a committed .env.example with fake values, and a pre-commit hook or CI secret scanner (gitleaks, …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
Pre-push Secret Scan
A defensive check to catch credentials before they become public. Public leaks are scraped by bots within minutes.
Workflow
- Run the scanner on the project root:
python scripts/scan_secrets.py path/to/project
python scripts/scan_secrets.py . --json # machine-readable
python scripts/scan_secrets.py . --no-entropy # fewer false positivesExit code is 1 if findings exist, 0 if clean, so it works in CI or a git pre-push hook.
- Review each finding. Values are always masked in output. Classify as real secret, test fixture, or false positive.
- For every real secret:
- Revoke or rotate it first. Assume it is compromised the moment it was written to a file that may be shared.
- Remove it from code; load from environment variables or a secret manager.
- If it was ever committed, deleting the file is not enough. History must be rewritten (
git filter-repo) or the repo recreated, and rotation remains mandatory.
- Add prevention:
.gitignorefor.env*, a committed.env.examplewith fake values, and a pre-commit hook or CI secret scanner (gitleaks, trufflehog).
What it checks
Cloud and platform keys (AWS, GitHub, Slack, Stripe, Google, Anthropic/OpenAI-style), private key blocks, JWTs, credentials embedded in URLs, hardcoded password=/secret=/token= assignments, and optionally high-entropy strings. It skips .git, node_modules, virtualenvs, build output, and binary files.
Limits
Pattern matching cannot find every secret and will flag some harmless strings. A clean result is not a guarantee. Say so when reporting.
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.

