Environment Setup
- Find all env var usages:
grep -rn "process\.env\.\|Deno\.env\.get\|env\." src/ --include="*.ts" --include="*.js" | grep -oE "process\.env\.[A-Z_]+" | sort -u
- Check existing
.env* files:
ls .env* 2>/dev/null
cat .env.example 2>/dev/null
- For each env var found:
- What is it used for?
- Is it required or optional?
- What's a safe example value?
- Any format constraints? (URL, UUID, comma-separated, etc.)
- Generate/update
.env.example:
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/mydb
# Auth
JWT_SECRET=your-secret-key-min-32-chars
JWT_EXPIRES_IN=7d
# External APIs (optional)
STRIPE_SECRET_KEY=sk_test_...
- Generate a startup validation script
src/lib/env.ts using zod or envalid to fail fast if required vars are missing.
Use this skill with your AI agent:
Open on Skill Issue to copy, download, or add to your library.
Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.