env-config
Installation
SKILL.md
Purpose
Prevent misconfigurations from reaching production. Validate environment variables at startup, manage secrets safely, and keep config portable across local dev, CI, and production.
.env File Patterns
File Hierarchy
.envholds shared defaults. Commit this to the repo with safe placeholder values..env.localholds developer-specific overrides. Add to.gitignore..env.production,.env.staging,.env.testhold environment-specific values.- Load order (most frameworks):
.env<.env.local<.env.[environment]<.env.[environment].local.
Naming Conventions
- Prefix variables with the app or service name:
MYAPP_DATABASE_URL, not justDATABASE_URL. - Use SCREAMING_SNAKE_CASE. No dots, no dashes.
- Boolean values: use
true/false, not1/0oryes/no. - Group related variables with a common prefix:
MYAPP_REDIS_HOST,MYAPP_REDIS_PORT.