infra-change
Skill2 starsChanged 6 months agoMITView on GitHub
Infrastructure change workflow — Terraform plan/apply, Helm diff/upgrade, Kubernetes manifest changes with mandatory approval gates. Applies DevOps role. Safe-by-default with plan review before any mutation.
In this repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ai-skillsSkill
- analyze-localSkill
- analyze-prodSkill
- analyzeSkill
- architectureSkill
- asset-validationSkill
- blog-postSkill
- bugfixSkill
- cloud-platformsSkill
- code-reviewSkill
- content-creationSkill
- context-engineeringSkill
- create-prSkill
- deployment-proceduresSkill
- deploy-productionSkill
- deploy-stagingSkill
- docsSkill
- feature-devSkill
- geo-writerSkill
- humanizerSkill
- marketing-operationsSkill
- marketingSkill
- ml-pipelineSkill
- planSkill
- pre-commitSkill
- productSkill
- project-initSkill
- prompt-engineeringSkill
- qaSkill
- releaseSkill
- run-testsSkill
- security-scanSkill
- seo-reviewSkill
- social-media-managerSkill
- test-localSkill
- test-strategySkill
- ui-ux-designSkill
- worktree-isolationSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 11 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Read AGENTS.md at the project root to identify:
- Distinctive: line 24
Ask the user (or extract from parent workflow context):
- Distinctive: line 31
If Risk = HIGH or Environment = production:
- Distinctive: line 44
Before making changes, capture the current state:
- Distinctive: line 84
Run format and validate:
- Distinctive: line 164
Only after the user explicitly approves:
- Distinctive: line 182
Never auto-run apply/upgrade commands
- Distinctive: line 184
If the plan changed since review — re-run Step 5
- Distinctive: line 188
After applying, verify the changes took effect:
- Distinctive: line 203
If production — monitor SLIs for 5–10 minutes after apply.
- Distinctive: line 207
Document the rollback before considering the change complete:
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Infrastructure Change
Safe infrastructure change workflow for Terraform, Helm, and Kubernetes. Every mutation requires explicit user approval after reviewing the plan/diff. Applies Agent(devops-engineer) for all steps.
⚠️ SAFETY: No apply, upgrade, delete, or scale command runs without explicit user APPROVE.
0. Gather Context
Read AGENTS.md at the project root to identify:
- Infrastructure tools in use (Terraform, Helm, kubectl, Pulumi)
- Cloud platform (GCP, Azure, AWS)
- Environment structure (dev, staging, production)
- State backend and workspace conventions
1. Define the Change
Ask the user (or extract from parent workflow context):
- What needs to change? (resource scaling, new service, config update, network change, secret rotation)
- Which tool? Terraform, Helm, kubectl, or combination
- Environment: dev / staging / production
- Risk level: Low (config), Medium (scaling, new resource), High (destroy, DB, auth, prod)
If Risk = HIGH or Environment = production:
⚠️ HIGH-RISK INFRASTRUCTURE CHANGE
Destructive actions require explicit "APPROVE" before execution.
Affected: [list resources/services]2. Apply Roles
Apply Agent(devops-engineer). For production changes, also apply Agent(sre-engineer) for SLO impact assessment. For cloud infrastructure design (landing zones, networking topology, IAM), consult Agent(cloud-architect). For CI/CD pipeline architecture changes, consult Agent(devops-architect).
3. Review Current State
Before making changes, capture the current state:
3a. Terraform State (if applicable)
// turbo
terraform validate
terraform fmt -check -recursiveReview relevant .tf files and current state:
// turbo
terraform plan -out=tfplan3b. Helm State (if applicable)
// turbo
helm list -n <namespace>
helm get values <release-name> -n <namespace>3c. Kubernetes State (if applicable)
// turbo
kubectl get deployments,services,ingress -n <namespace>
kubectl get pods -n <namespace> -o wideRecord: Current resource counts, versions, replicas, config values as baseline.
4. Implement Changes
Make the infrastructure code changes following Agent(devops-engineer) standards:
For Terraform:
- Modify
.tffiles as needed - Run format and validate:
// turbo
terraform fmt -recursive
terraform validateFor Helm:
- Modify
values.yamlor chart templates - Lint the chart:
// turbo
helm lint <chart-path>For raw Kubernetes manifests:
- Modify YAML files
- Validate with dry-run:
kubectl apply --dry-run=client -f <manifest>5. Plan Review — MANDATORY BEFORE APPLY
5a. Terraform Plan
terraform plan -out=tfplanPresent the plan summary:
## Terraform Plan Summary
| Action | Count | Resources |
|---------|-------|-----------|
| Add | X | [list] |
| Change | X | [list] |
| Destroy | X | [list] |
⚠️ DESTROY/REPLACE resources:
- [resource] — [reason]
Data loss risk: [yes/no]
Estimated cost impact: [if applicable]5b. Helm Diff
helm diff upgrade <release> <chart-path> -n <namespace> -f <values-file>Present the diff summary:
## Helm Diff Summary
| Object | Action | Key Changes |
|--------|--------|-------------|
| Deployment/X | changed | replicas: 1→2, image: v1→v2 |
| Service/Y | added | port 8080 |
| Secret/Z | changed | keys modified |
⚠️ Critical changes:
- [deployment restart expected]
- [secret reference changed]
Downtime risk: [yes/no]5c. Kubectl Dry-Run
kubectl diff -f <manifest>⚠️ STOP. Present plan/diff summary and request APPROVE before proceeding to Step 6.
6. Apply — REQUIRES EXPLICIT APPROVE
Only after the user explicitly approves:
Terraform:
terraform apply tfplanHelm:
helm upgrade <release> <chart-path> -n <namespace> -f <values-file>Kubectl:
kubectl apply -f <manifest>Rules:
- Never auto-run apply/upgrade commands
- User must explicitly type "APPROVE" or equivalent
- If the plan changed since review — re-run Step 5
7. Verify
After applying, verify the changes took effect:
// turbo
kubectl get pods -n <namespace> -o wide
kubectl get events -n <namespace> --sort-by='.lastTimestamp' --field-selector type!=NormalCheck:
- All pods healthy (Running, no CrashLoopBackOff)
- Expected replica counts match
- No warning/error events
- Services responding (health check endpoints)
- Logs clean (no new errors)
If production — monitor SLIs for 5–10 minutes after apply.
8. Rollback Plan
Document the rollback before considering the change complete:
Terraform:
# Revert the .tf file changes and re-apply
terraform plan -out=tfplan-rollback
terraform apply tfplan-rollbackHelm:
helm rollback <release> <previous-revision> -n <namespace>Kubectl:
kubectl rollout undo deployment/<name> -n <namespace>9. Summary
## Infrastructure Change Summary
- **Change**: [what was changed]
- **Tool**: [Terraform / Helm / kubectl]
- **Environment**: [dev / staging / production]
- **Risk**: [low / medium / high]
- **Plan reviewed**: [yes — summary of add/change/destroy]
- **Applied**: [yes/no — with APPROVE]
- **Verification**: [pass/fail]
- **Rollback plan**: [documented above]
- **Next steps**: [monitoring, follow-up changes]Integration
- Roles:
Agent(devops-engineer)(primary),Agent(sre-engineer)(review),Agent(cloud-architect)(cloud design review),Agent(devops-architect)(CI/CD pipeline architecture) - Preceded by:
/plan(infra work stream),/architecture(cloud architecture design) - Followed by:
/deploy-staging,/deploy-production
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

