env-config
Installation
SKILL.md
Environment Variable Configuration
Set up environment variables with validation, documentation, and secure handling across environments. If target names a service (Supabase, Stripe, etc.), scope to that service's vars. Otherwise, set up the full env system.
Step 1: File Structure
Create these files in the project root:
| File | Purpose | Committed to git? |
|---|---|---|
.env.local |
Local development overrides. Highest priority. | No |
.env.development |
Defaults for next dev |
Yes (no secrets) |
.env.production |
Defaults for next build |
Yes (no secrets) |
.env.example |
Template documenting every variable | Yes |
.env.test |
Test environment overrides | Yes (no secrets) |
Load order (Next.js)
Next.js loads env files in this order (later files override earlier):