From devops-skills
Analyzes terraform/tofu plan output for risks, security issues, and potential service disruptions. Required before any apply operation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/devops-skills:terraform-plan-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Analyze terraform plan output using parallel agents for comprehensive risk assessment. **Never auto-apply** - always present findings and require explicit approval.
Analyze terraform plan output using parallel agents for comprehensive risk assessment. Never auto-apply - always present findings and require explicit approval.
Announce at start: "I'm using the terraform-plan-review skill to analyze these changes safely."
Before running any plan:
Check AWS Profile
aws sts get-caller-identity
Identify Environment
# Initialize if needed
terraform init
# Generate plan file (required for JSON parsing)
terraform plan -out=plan.out
# Convert to JSON for analysis
terraform show -json plan.out > plan.json
Launch these agents in a single message with multiple Task calls:
Task 1:
description: "Analyze plan risks"
prompt: |
Analyze this Terraform plan for risks and impact.
Environment: [env name]
Account: [account id]
Plan JSON:
[plan.json content]
Focus on destruction, modification risks, and cascade effects.
subagent_type: "terraform-plan-analyzer"
Task 2:
description: "Security review plan"
prompt: |
Review this Terraform plan for security implications.
Environment: [env name]
Plan JSON:
[plan.json content]
Focus on IAM, network, encryption, and compliance.
subagent_type: "security-reviewer"
Task 3:
description: "Check historical patterns"
prompt: |
Analyze git history for patterns related to these resources.
Resources being changed: [list from plan]
Look for similar past changes, incidents, and outcomes.
subagent_type: "historical-pattern-analyzer"
CRITICAL: All three Task calls in ONE message for parallel execution.
Agent prompts should include:
Collect results from all agents and create a unified report:
## Plan Analysis Summary
### Risk Level: [CRITICAL/HIGH/MEDIUM/LOW]
### Changes Overview
- Resources to create: X
- Resources to update: Y
- Resources to destroy: Z
### Risk Analysis (terraform-plan-analyzer)
[Summary of risks identified]
### Security Analysis (security-reviewer)
[Summary of security implications]
### Pattern Analysis (historical-pattern-analyzer)
[Any similar past changes and their outcomes]
### Required Approvals
- [ ] User acknowledges destruction of X resources
- [ ] User confirms this is the correct environment
- [ ] User approves proceeding with apply
Present the analysis to the user and wait for explicit approval:
"Based on my analysis, this plan has [RISK LEVEL] risk. [Summary of key findings].
Do you want me to proceed with
terraform apply? Please respond with 'approve' to continue."
NEVER proceed without explicit "approve" from user.
If and only if user explicitly approves:
terraform apply plan.out
Monitor output and report results.
Before analysis, query memory for:
After completion, store:
Before presenting to user, verify:
npx claudepluginhub joshuarweaver/cascade-code-devops-misc-1 --plugin lgbarn-devops-skillsReviews Terraform and Deployment Manager changes targeting GCP — blast radius analysis, destroy detection, cross-project impact, state conflicts, org policy drift, and rollback completeness.
Diagnoses Terraform/OpenTofu failures (identity churn, secrets, blast radius, CI drift, state corruption) with version-aware guards and a structured response contract.
Reviews Terraform PRs with 8-category checklist on structure, state safety, security, naming, modules, variables, providers, and CI/CD. Outputs Approved/Needs Changes/Blocked verdict for PR reviews, pre-merge checks, and audits.