- Home
- Skills
- Supercent Io
- Skills Template
- Environment Setup
environment-setup_skill
- Shell
24
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill supercent-io/skills-template --skill environment-setup- SKILL.md7.6 KB
- SKILL.toon547 B
Overview
This skill configures and manages development, staging, and production environments for your application. It helps create and maintain .env templates, per-developer overrides, and environment-specific config files while enforcing validation and secret handling. Use it to centralize environment settings, prevent leaked secrets, and integrate with container deployment.
How this skill works
The skill scans and generates standard .env files (.env.example, .env.local, .env.production) and enforces a .gitignore policy that prevents committing secrets. It validates required variables at startup using a type-safe schema and throws clear errors for missing or invalid values. It also maps environment variables into structured config objects and supports Docker Compose integration for containerized development.
When to use it
- Starting a new project and defining required environment variables
- Separating and managing dev, staging, and production settings
- Onboarding team members with consistent per-developer .env.local files
- Ensuring runtime validation of secrets and critical config values
- Integrating environment settings into Docker or CI/CD pipelines
Best practices
- Keep a .env.example committed with all required keys and sensible defaults; never commit actual secret values
- Add .env, .env.local, and environment-specific secret files to .gitignore or store them in a secrets manager
- Validate runtime environment variables with a schema library (e.g., Zod or pydantic) and fail fast on invalid/missing values
- Use environment-specific config modules to isolate logging, CORS, and rate-limit settings
- Prefer a secrets manager (AWS Secrets Manager, Vault) for production credentials and inject them into the runtime environment
Example use cases
- Create .env.example to list APP_URL, DATABASE_URL, Redis, SMTP, JWT secrets, and third-party API keys
- Use a schema validator to enforce JWT secret length, numeric ports, and URL formats at application start
- Provide per-developer .env.local for local database and debug logging settings that never get committed
- Switch configs automatically based on NODE_ENV to change logging level, CORS origins, and rate limiting in production
- Inject DATABASE_URL and other secrets via Docker Compose or CI secrets for reproducible deployments
FAQ
Keep all secret files (.env, .env.production, .env.local) listed in .gitignore and commit only .env.example. For production, use a secrets manager and inject variables at deploy time.
What if a required environment variable is missing?
The skill validates variables on startup and exits with a clear message showing which keys are missing or invalid. Add defaults in the template where safe or provide the values via your secrets store.