infra-env
Installation
SKILL.md
Environment Variables Skill
Conventions and security practices for managing environment variables in Next.js projects.
When to Use This Skill
- Setting up a new project's environment configuration
- Adding new environment variables
- Reviewing security of environment handling
- Creating
.env.exampletemplates - Troubleshooting environment issues
Core Principles
- Never commit secrets -
.env*files with real values stay out of git - Document with examples -
.env.exampleshows structure without values - Prefix client-safe vars - Only
NEXT_PUBLIC_*reaches the browser - Validate at startup - Fail fast if required vars are missing
- Use typed configuration - Type-safe access to environment