managing-environment-configurations
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".
- License 许可
- MIT
- 最近更新
- 2026-07-13
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- managing-environment-configurations
- tags
- [ "devops", "environment-configurations" ]
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- 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".
- allowed-tools
- Read, Write, Edit, Grep, Glob, Bash(cmd:*)
- compatible-with
- claude-code, codex, openclaw
03 SKILL.md 正文
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
- Access to all target environments (dev, staging, production)
- Configuration management tool or pattern identified (dotenv, ConfigMaps, SSM, Consul)
- Version control for configuration files (separate repo or encrypted in application repo)
- Encryption tool for sensitive values (
sops,age,sealed-secrets, or cloud KMS) - Understanding of which values differ between environments vs. which are shared
Instructions
- Audit existing configuration: scan for
.envfiles,config/directories, Kubernetes ConfigMaps, and hardcoded values in source code - Classify each configuration value: public (non-sensitive, varies per env), secret (credentials, API keys), and static (same across all envs)
- Extract hardcoded values into externalized configuration with a clear naming convention (
APP_DATABASE_HOST,APP_REDIS_URL) - Create environment-specific configuration files:
.env.development,.env.staging,.env.production - Encrypt sensitive values using
sopswith cloud KMS orsealed-secretsfor Kubernetes - Generate Kubernetes ConfigMaps and Secrets from environment files for cluster-based deployments
- Set up configuration validation: schema checks to ensure all required variables are present before deployment
- Implement promotion workflow: changes go to dev first, then promote to staging after testing, then to production with approval
- Add configuration drift detection: compare running environment against source-of-truth on a schedule
Output
- Environment-specific configuration files (
.env.*,config/*.yaml) - Kubernetes ConfigMap and Secret manifests per environment
- Configuration schema/validation script to catch missing variables
- SOPS-encrypted secret files with
.sops.yamlrules - CI/CD pipeline steps for configuration validation and deployment
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
- "Create an environment configuration system using
.envfiles for a Node.js app with SOPS encryption for secrets and validation that all required vars are set." - "Generate Kubernetes ConfigMaps and Secrets from environment files for dev, staging, and production namespaces."
- "Set up a configuration promotion workflow: edit in dev, validate in CI, promote to staging via PR, deploy to production with approval gate."
Resources
- 12-Factor App config: https://12factor.net/config
- SOPS encryption: https://github.com/getsops/sops
- Kubernetes ConfigMaps: https://kubernetes.io/docs/concepts/configuration/configmap/
- Sealed Secrets: https://github.com/bitnami-labs/sealed-secrets
- Consul KV: https://developer.hashicorp.com/consul/docs/dynamic-app-config/kv
04 同仓库更多 Skills
zustand-store-creator
Create zustand store creator operations. Auto-activating skill for Frontend Development. Triggers on: zustand store creator, zustand store creator Part of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like "zustand store creator", "zustand creator", "zustand".
zero-trust-config-helper
Configure with zero trust config helper operations. Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like "zero trust config helper", "zero helper", "zero".
zapier-integration-helper
Assist with zapier integration helper operations. Auto-activating skill for Business Automation. Triggers on: zapier integration helper, zapier integration helper Part of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like "zapier integration helper", "zapier helper", "zapier".
yaml-config-validator
Validate yaml config validator operations. Auto-activating skill for DevOps Basics. Triggers on: yaml config validator, yaml config validator Part of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like "yaml config validator", "yaml validator", "yaml".
xvary-stock-research
Thesis-driven equity analysis from public SEC EDGAR and market data; /analyze, /score, /compare workflows with bundled Python tools (Claude Code, Cursor, Codex).
xss-vulnerability-scanner
Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals. Triggers on: xss vulnerability scanner, xss vulnerability scanner Part of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like "xss vulnerability scanner", "xss scanner", "xss".