env-file-auditor
Skill48 starsChanged 17 days agoMITView on GitHub
Compares a .env file with its .env.example template and reports missing keys, undocumented extra keys, empty values and example files that contain real looking secrets. Use when the user asks why an app fails on startup with missing configuration, or wants to check environment files before committing.
- Reads credentials
In this repository15 other files it gives its agents.
- api-endpoint-testerSkill
- changelog-generatorSkill
- commit-message-writerSkill
- csv-profilerSkill
- dockerfile-linterSkill
- json-diffSkill
- log-analyzerSkill
- meeting-notes-to-actionsSkill
- pr-description-writerSkill
- python-code-smellsSkill
- readme-doctorSkill
- secure-code-reviewSkill
- skill-authorSkill
- sql-query-reviewerSkill
- todo-extractorSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is 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.
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
- Very specific: line 18
Before committing, to make sure .env.example has no real credentials.
- Distinctive: line 19
After adding configuration, to check that the template documents every key.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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 file auditor
Keeps .env and .env.example in step and stops secrets from leaking into the example file.
When to use
- An app crashes with "missing environment variable" and the user is not sure which one.
- Before committing, to make sure
.env.examplehas no real credentials. - After adding configuration, to check that the template documents every key.
How to run
python scripts/audit_env.py .env .env.exampleThe first argument is the real file, the second is the template.
Output
JSON with:
missing: keys in the template that the real file does not define.extra: keys in the real file that the template does not document.empty: keys that are defined but have no value in the real file.suspicious_example_keys: keys in the template whose value looks like a real secret (long, mixed characters, on a name that contains KEY, SECRET, TOKEN or PASSWORD).
The exit code is 1 when anything is reported. Values are never printed, only key names.
After running
Fix suspicious_example_keys first: replace the value with a placeholder such as changeme, and rotate the
secret if the file was ever committed. Then add extra keys to the template and ask the user for missing values.
Errors
A missing file exits with code 2.
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.

