secrets-hygiene
Skill0 starsChanged 2 months agoMITView on GitHub
Use when committing, opening a PR, editing configs, or pasting logs. Scan diffs and config for credentials and secrets; never commit API keys, tokens, private keys, or passwords — redact and rotate if exposure is suspected.
- Reads credentials
6 other projects use a version of this.
Adopted by
Most recently taken up by
- aymardkouakou/claude-gh-skillstheir own version, first seen Nov 8, 2026
- chadixearth/graphylooptheir own version, first seen Oct 13, 2026
- novahiz/novahiztheir own version, first seen Oct 11, 2026
- RiyanKothari/riyans-claude-skillstheir own version, first seen Oct 6, 2026
- SkillMedev/security-compliance-hardeningtheir own version, first seen Oct 5, 2026
- BUTTERGANG/CLAUDE-SKILLStheir own version, first seen Jul 30, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- chadixearth/graphyloop★ 3same name
- aymardkouakou/claude-gh-skills★ 1same name
- novahiz/novahiz★ 1same name
- RiyanKothari/riyans-claude-skills★ 1same name
- BUTTERGANG/CLAUDE-SKILLS★ 0same name
- SkillMedev/security-compliance-hardening★ 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 repository9 other files it gives its agents.
- adversarial-reviewSkill
- api-compatSkill
- flaky-test-triageSkill
- incident-hotfixSkill
- perf-measure-firstSkill
- repro-firstSkill
- skill-authorSkill
- test-plan-firstSkill
- yagni-sliceSkill
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
- could be automatic: a setting could enforce it
- Distinctive: line 27
Do not push, force-push, or amend shared history to "hide" a leaked secret without an explicit incident plan (rotation first).
- Distinctive: line 28
Do not print full live secrets into chat, logs, or PR bodies.
- Distinctive: line 32
Before staging, scan the diff and any new config files for secret-shaped values.
- Very specific: line 34
Ensure .gitignore / example env files cannot accidentally track real values.
- Distinctive: line 35
If a secret may already be in history or a remote, stop and plan rotation + scrub with the user.
“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
Secrets Hygiene
When to use
- Preparing a commit, PR, patch, or shareable log/snippet.
- Editing
.envexamples, CI configs, Dockerfiles, Terraform, or Helm values. - The user pastes credentials or asks to "wire up" a third-party API.
When not to use
- Discussing secret-management architecture at a pure design level with no files touched.
- Working exclusively with already-public, non-sensitive sample data clearly marked as fake.
Assumptions
- Access to
git diff/git statusand the working tree. - Ability to search the repo for high-entropy strings and known secret patterns.
- Secret stores (GitHub Actions secrets, Vault, cloud SM) may exist — prefer them over files.
- Do not push, force-push, or amend shared history to "hide" a leaked secret without an explicit incident plan (rotation first).
- Do not print full live secrets into chat, logs, or PR bodies.
Workflow
- Before staging, scan the diff and any new config files for secret-shaped values.
- Move real secrets to the environment or a secret manager; keep only placeholders in git.
- Ensure
.gitignore/ example env files cannot accidentally track real values. - If a secret may already be in history or a remote, stop and plan rotation + scrub with the user.
- Proceed with commit/PR only when the diff is clean of credentials.
Steps
- Diff scan — Review
git diffand untracked files for keys named*SECRET*,*TOKEN*,*PASSWORD*,*_KEY,Authorization, PEM blocks, and connection strings with credentials. - Pattern check — Flag JWTs, AWS-like keys, private key headers (
BEGIN … PRIVATE KEY), and long high-entropy literals in source. - Separate concerns — Real values → env / secret manager. Docs and examples → obviously fake placeholders (
sk_test_…,REPLACE_ME). - Ignore rules — Confirm
.env, key files, and local overrides are ignored; commit.env.examplewithout real values only. - Output hygiene — Redact secrets in logs, screenshots, and PR text. Never echo
printenvwholesale. - Leak response — If exposure is plausible: revoke/rotate first, then discuss history rewrite. Do not assume "delete the file" is enough.
Success criteria
- No live credentials, private keys, or password-bearing URLs appear in the staged diff.
- Examples use placeholders; real secrets live outside version control.
.gitignore(or equivalent) covers local secret files.- Suspected leaks triggered a rotation plan before further pushes.
- Chat/PR output does not contain full secret values.
Out of scope
- Implementing a full company-wide secrets platform.
- Cryptographic key ceremony design beyond basic hygiene.
- Legal/compliance attestation (SOC2 evidence packs).
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.

