Managing environment configurations

From jeremylongshore/claude-code-plugins-plus-skills · View interactive version

Managing environment configurations is an AI agent skill from the GitHub repository jeremylongshore/claude-code-plugins-plus-skills. Implement environment and configuration management with comprehensive guidance and automation. Use when you need to work with environment configuration. Trigger with phrases like "manage environments", "configure environments", or "sync configurations".

How to use this skill

Skill file

Managing Environment Configurations

Overview

Manage application configurations across development, staging, and production environments using .env files, Kubernetes ConfigMaps/Secrets, SSM Parameter Store, and cloud-native configuration services. Enforce consistency, prevent configuration drift, and implement safe promotion workflows between environments.

Prerequisites

Instructions

  1. Audit existing configuration: scan for .env files, config/ directories, Kubernetes ConfigMaps, and hardcoded values in source code
  2. Classify each configuration value: public (non-sensitive, varies per env), secret (credentials, API keys), and static (same across all envs)
  3. Extract hardcoded values into externalized configuration with a clear naming convention (APP_DATABASE_HOST, APP_REDIS_URL)
  4. Create environment-specific configuration files: .env.development, .env.staging, .env.production
  5. Encrypt sensitive values using sops with cloud KMS or sealed-secrets for Kubernetes
  6. Generate Kubernetes ConfigMaps and Secrets from environment files for cluster-based deployments
  7. Set up configuration validation: schema checks to ensure all required variables are present before deployment
  8. Implement promotion workflow: changes go to dev first, then promote to staging after testing, then to production with approval
  9. Add configuration drift detection: compare running environment against source-of-truth on a schedule

Output

Error Handling

| Error | Cause | Solution |

|-------|-------|---------|

| Missing required environment variable | Variable defined in schema but absent from .env file | Add the variable to the environment file; run validation script before deploy |

| SOPS decryption failed | Wrong KMS key or expired credentials | Verify KMS key ARN in .sops.yaml; refresh cloud credentials |

| ConfigMap too large | Kubernetes 1MB ConfigMap size limit exceeded | Split into multiple ConfigMaps or mount as files from a volume |

| Configuration drift detected | Manual changes made directly to running environment | Re-apply configuration from source-of-truth; block direct environment edits |

| Secret exposed in logs | Application logging sensitive config values at startup | Mask secrets in logging output; audit code for accidental secret printing |

Examples

Resources

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.