env-secrets
Skill2 starsChanged 35 days agoMITView on GitHub
Keep API keys and passwords out of code, git and chat. Scans the project and its git history for leaked keys, blocks commits that contain one, and walks the owner through replacing a leaked key. Use when the user says "I leaked my API key", "check for leaked keys", "scan for secrets", after anyone pastes a key into a chat, or before making a repo public.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- carlosedm10/skillstheir own version, first seen Aug 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- carlosedm10/skills★ 1same 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 repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/app-foundation/template/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- skills/app-foundation/template/CLAUDE.mdCLAUDE.md
- app-foundationSkill
- auth-loginSkill
- db-backupSkill
- db-connectSkill
- deploy-cloudflareSkill
- domain-setupSkill
- email-sendSkill
- file-uploadSkill
- github-vercel-deploySkill
- launch-kitSkill
- ops-dashboardSkill
- pay-checkoutSkill
- pay-subscriptionSkill
- pay-webhookSkill
- uptime-alertSkill
- warehouse-siteSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
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
- could be automatic: a setting could enforce it
- Distinctive: line 20
Don't use the key. Don't repeat it back.
- Very specific: line 49
Never ask for a key in chat, never type one into a form, never write one into a file other than .env.local on the owner's machine.
- Very specific: line 50
When code needs a key, write process.env.NAME, add the name (no value) to .env.example, and tell the owner where to set it.
- Very specific: line 51
Before making a repo public: npm run secrets:scan -- --history.
≈ “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
env-secrets
Goal: secret keys only ever live in two places, Vercel environment variables (for the live site) and .env.local (on the owner's computer, never committed). Follow ../../STACK.md.
The owner may not know what an API key is. Explain it this way: "An API key is your house key for a service. Whoever has it can act as you there: send email from your domain, spend your credit."
When the owner has just pasted a key into the chat
- Don't use the key. Don't repeat it back.
- Say plainly: deleting the message doesn't help. The fix is to revoke that key and create a new one.
- Walk them through
references/rotate.mdfor that provider. The new key goes straight into Vercel (Sensitive), not into the chat. - Then continue the original task.
Install the guard
node <skill-dir>/scripts/apply.mjs --dir "<project>"It adds:
scripts/secret-scan.mjsandnpm run secrets:scan.githooks/pre-commit, turned on bygit config core.hooksPath .githooks. Everynpm installre-enables it viaprepare, so teammates get it too..env*in.gitignore(keeping.env.example)
It also records the install, commits, and runs a full scan including git history. Exit 0 means clean.
What the scanner catches: Resend, Stripe live, OpenAI, Anthropic, GitHub, Google (OAuth secret + API key), AWS, Slack, private keys, database URLs with a password, *_SECRET/TOKEN/API_KEY = "…" assignments, committed .env files, and a .gitignore that doesn't ignore .env. Keys are printed masked (re_DEM••••00).
When it finds something
- Revoke and replace the key (see
references/rotate.md). Removing it from the file is not enough if it was ever committed or shared. - Move the value to Vercel → Settings → Environment Variables (Sensitive), or
.env.locallocally. - Change the code to
process.env.NAME. - A false positive (an example value)? Add
secret-scan: allowas a comment on that line.
Rules for you (the agent)
- Never ask for a key in chat, never type one into a form, never write one into a file other than
.env.localon the owner's machine. - When code needs a key, write
process.env.NAME, add the name (no value) to.env.example, and tell the owner where to set it. - Before making a repo public:
npm run secrets:scan -- --history.
Tell the user (short)
"The project is clean. From now on a commit with a key in it is stopped automatically, and npm run secrets:scan checks everything any time." If anything leaked, name the provider and the one action: revoke and replace.
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.

