env-config
Skill0 starsChanged 3 months agoMITView on GitHub
Design and manage application configuration across environments. Covers environment variable conventions, startup validation, config parity checks, and .env.example maintenance.
- Reads credentials
4 other projects use a version of this.
Adopted by
Most recently taken up by
- AnyOrgName/php-skillstheir own version, first seen Nov 8, 2026
- mrhlaingbwardev/agentic-hacking-skillstheir own version, first seen Nov 8, 2026
- jars-demo/jars-skillstheir own version, first seen Oct 25, 2026
- AutumnsGrove/ClaudeSkillstheir own version, first seen Oct 26, 2025
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- mrhlaingbwardev/agentic-hacking-skills★ 347same name
- AutumnsGrove/ClaudeSkills★ 30same name
- AnyOrgName/php-skills★ 4same name
- jars-demo/jars-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 repository44 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- a11y-auditSkill
- ai-engineerSkill
- api-clientSkill
- changelog-enforcerSkill
- code-cleanup-guardianSkill
- code-reviewerSkill
- contract-testSkill
- db-migrateSkill
- dep-auditSkill
- devops-automatorSkill
- error-observabilitySkill
- frontend-designSkill
- git-commit-helperSkill
- github-issues-managerSkill
- git-issue-syncSkill
- git-protocolSkill
- handoffSkill
- incident-responseSkill
- init-projectSkill
- karpathy-guidelinesSkill
- market-researcherSkill
- parallel-agent-git-isolationSkill
- product-strategistSkill
- pr-workflowSkill
- rapid-builderSkill
- release-managerSkill
- resumeSkill
- scrutinizeSkill
- shadcn-uiSkill
- skill-builderSkill
- sprint-plannerSkill
- state-machine-diagramsSkill
- state-managementSkill
- surveySkill
- system-architectSkill
- tech-docsSkill
- unstuckSkill
- ux-design-systemSkill
- ux-researchSkill
- webapp-testingSkill
- web-dev-fundamentalsSkill
- workflow-optimizerSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
1
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
- Very specific: line 74
Every variable in .env must exist in .env.example (with empty or default value)
- Distinctive: line 87
Verify staging mirrors production config structure:
“Common” is measured: kept by at least 6 in 10 of the 4 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
Environment & Configuration Manager
Environment Variable Design
Naming Convention
[APP]_[CATEGORY]_[NAME]
APP_DB_HOST=localhost
APP_DB_PORT=5432
APP_REDIS_URL=redis://localhost:6379
APP_STRIPE_SECRET_KEY=sk_test_...
APP_LOG_LEVEL=info
APP_FEATURE_NEW_CHECKOUT=trueRequired vs. Optional
// Required — fail fast at startup if missing
const DB_HOST = requireEnv('APP_DB_HOST');
// Optional — use sensible default
const LOG_LEVEL = process.env.APP_LOG_LEVEL || 'info';
const PORT = parseInt(process.env.PORT || '3000', 10);Startup Validation Pattern
function validateConfig(): Config {
const errors: string[] = [];
const required = ['DATABASE_URL', 'SESSION_SECRET', 'API_KEY'];
for (const key of required) {
if (!process.env[key]) errors.push(`Missing required: ${key}`);
}
const port = parseInt(process.env.PORT || '3000', 10);
if (isNaN(port) || port < 1 || port > 65535) {
errors.push(`Invalid PORT: ${process.env.PORT}`);
}
if (errors.length > 0) {
console.error('Configuration errors:\n' + errors.map(e => ` - ${e}`).join('\n'));
process.exit(1);
}
return { /* validated config object */ };
}.env File Management
.env.example Template
# Database
APP_DB_HOST=localhost # Required — local or cloud DB host
# External Services
APP_STRIPE_SECRET_KEY= # Required — get from Stripe dashboard
# Application
APP_LOG_LEVEL=info # debug | info | warn | errorRules
.envis ALWAYS in.gitignore— never committed.env.exampleis ALWAYS committed — documents all variables- Every variable in
.envmust exist in.env.example(with empty or default value) - Comments in
.env.exampleexplain where to get each value - Mark required vs. optional clearly
Environment Parity
Configuration per Environment
| Variable | Development | Staging | Production |
| LOG_LEVEL | debug | info | warn |
| API keys | test keys | test keys | production keys |
Parity Check
Verify staging mirrors production config structure:
- Same env vars defined (different values expected)
- Same services connected (different instances)
- Same feature flags available (different states OK)
Feature Flags
// Simple boolean flags from env vars
const FEATURES = {
newCheckout: process.env.APP_FEATURE_NEW_CHECKOUT === 'true',
betaApi: process.env.APP_FEATURE_BETA_API === 'true',
};
// Usage
if (FEATURES.newCheckout) { /* new path */ }Anti-Patterns
- Hardcoded values that differ between environments (URLs, ports, keys)
- Reading
process.envdeep inside business logic (read at startup, pass as config) - Environment-specific
ifstatements in code (if (NODE_ENV === 'production')) - Secrets in docker-compose.yml, CI config, or Dockerfiles
- Using
NODE_ENVfor anything other than framework behavior
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

