Configures environment variables and secrets protection
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.
Type: L3 Worker Category: 7XX Project Bootstrap Parent: ln-730-devops-setup
Configures environment variables for development and production environments.
Creates environment configuration files:
| Input | Source | Description |
|---|
| Project Name | Directory name | Used for database/service naming |
| Backend Port | Stack-dependent | 5000 (.NET), 8000 (Python) |
| Frontend Port | Default | 3000 |
| Database Port | Default | 5432 |
| Detected Vars | Code analysis | Environment variables found in code |
| File | Purpose | Template |
|---|---|---|
.env.example | Documented template | env_example.template |
.env.development | Local development defaults | env_development.template |
.env.production | Production placeholders | env_production.template |
.gitignore (append) | Secrets protection | gitignore_secrets.template |
Scan project for existing environment usage:
process.env, os.environ, Configuration[]Output: List of required environment variables with types
Classify discovered variables:
| Category | Examples | Treatment |
|---|---|---|
| Database | DATABASE_URL, POSTGRES_* | Auto-generate with project name |
| API Config | API_PORT, LOG_LEVEL | Use detected or defaults |
| Security | JWT_SECRET, API_KEY | Placeholder with warning |
| External | REDIS_URL, SMTP_* | Comment out as optional |
Generate environment files from templates:
Append secrets protection to .gitignore:
Documented template with all variables:
Ready-to-use development configuration:
Production placeholder file:
${VARIABLE} syntax for deployment substitution| Practice | Implementation |
|---|---|
| No real secrets | Placeholder values only in templates |
| Gitignore protection | All .env files except .env.example |
| Development warnings | Mark dev secrets as insecure |
| Production guidance | Comments about secrets manager usage |
| Key rotation reminder | Note about regular secret rotation |
Generated files include these security reminders:
Generated files must:
| File | Purpose |
|---|---|
| env_example.template | Documented .env template |
| env_development.template | Development defaults |
| env_production.template | Production placeholders |
| gitignore_secrets.template | .gitignore additions |
Version: 1.1.0 Last Updated: 2026-01-10