Phase 1b: Rename all ~94 commands across 12 plugins to /<noun> <action> sub-command pattern. Git-flow consolidated from 8→5 commands (commit variants absorbed into --push/--merge/--sync flags). Dispatch files, name: frontmatter, and cross-reference updates for all plugins. Phase 2: Design documents for 8 new plugins in docs/designs/. Phase 3: Scaffold 8 new plugins — saas-api-platform, saas-db-migrate, saas-react-platform, saas-test-pilot, data-seed, ops-release-manager, ops-deploy-pipeline, debug-mcp. Each with plugin.json, commands, agents, skills, README, and claude-md-integration. Marketplace grows from 12→20. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2.3 KiB
2.3 KiB
Environment Management Skill
Patterns for managing environment variables across deployment stages.
File Naming Convention
| File | Purpose | Git Tracked |
|---|---|---|
.env.example |
Template with placeholder values | Yes |
.env |
Local development defaults | No |
.env.development |
Development-specific overrides | No |
.env.staging |
Staging environment values | No |
.env.production |
Production secrets and config | No |
.env.example Format
Document every variable with comments:
# Application Settings
APP_NAME=myapp
APP_PORT=8080
APP_DEBUG=false
# Database Configuration
# PostgreSQL connection string
DATABASE_URL=postgresql://user:password@db:5432/myapp
DATABASE_POOL_SIZE=5
# Redis Configuration
REDIS_URL=redis://redis:6379/0
# External Services
# Generate at: https://example.com/api-keys
API_KEY=your-api-key-here
API_SECRET=your-secret-here
Secret Handling Rules
- Never commit secrets to version control
.env.productionand.env.stagingMUST be in.gitignore- Use placeholder values in
.env.example:your-api-key-here,changeme,<required> - For shared team secrets, use a secrets manager or encrypted vault
- Document where to obtain each secret in comments
Docker Compose Integration
Single env_file
env_file:
- .env
Multi-environment
env_file:
- .env
- .env.${DEPLOY_ENV:-development}
Variable Interpolation
Docker Compose supports ${VAR:-default} syntax:
services:
app:
image: myapp:${APP_VERSION:-latest}
ports:
- "${APP_PORT:-8080}:8080"
Environment Diff Checking
When comparing environments, check for:
- Missing variables - Present in .env.example but absent in target
- Extra variables - Present in target but not in .env.example (may be stale)
- Placeholder values - Production still has
changemeoryour-*-here - Identical secrets - Same password used in dev and prod (security risk)
Validation Checklist
- All docker-compose
${VAR}references have corresponding entries - No secrets in
.env.example .gitignoreexcludes.env.productionand.env.staging- Production variables have real values (no placeholders)
- Database URLs point to correct hosts per environment
- Debug flags are
falsein production