terraform-plan-review
Use when analyzing terraform/tofu plan output for risks, security issues, and potential service disruptions. Required before any apply operation.
What this skill does
# Terraform Plan Review
## Overview
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."
## The Process
### Step 1: Verify Environment
Before running any plan:
1. **Check AWS Profile**
```bash
aws sts get-caller-identity
```
- Verify the account ID matches expected environment
- Verify the role/user is appropriate for this operation
- If mismatch: STOP and alert user
2. **Identify Environment**
- Check current directory structure (which environment?)
- Verify backend configuration matches environment
### Step 2: Generate Plan
```bash
# 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
```
### Step 3: Dispatch Parallel Analysis Agents
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:**
- The plan.json content (or path)
- The environment name
- Any relevant context from memory
### Step 4: Aggregate Findings
Collect results from all agents and create a unified report:
```markdown
## 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
```
### Step 5: Approval Gate
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.**
### Step 6: Execute Apply (Only After Approval)
If and only if user explicitly approves:
```bash
terraform apply plan.out
```
Monitor output and report results.
## Risk Categories
### CRITICAL - Requires Extra Scrutiny
- Any resource destruction
- IAM policy changes
- Security group rule modifications
- Database modifications
- Encryption key changes
- Cross-account resource access
### HIGH
- Network configuration changes
- Load balancer modifications
- Auto-scaling changes
- DNS record modifications
### MEDIUM
- Instance type changes
- Tag modifications
- Non-critical configuration updates
### LOW
- Pure additions with no dependencies
- Documentation-only changes
## Common Patterns to Flag
1. **Cascade Deletions**: Resource deletion that triggers other deletions
2. **State Drift**: Plan shows changes that weren't in code
3. **Dependency Chains**: Changes that affect many downstream resources
4. **Security Relaxation**: Rules becoming more permissive
5. **Cost Impact**: Significant size/count changes
## Memory Integration
Before analysis, query memory for:
- Similar changes in this project's history
- Known issues with affected resources
- Past incidents related to this type of change
After completion, store:
- Outcome of this change (success/failure)
- Any issues encountered
- User preferences learned
## Verification Checklist
Before presenting to user, verify:
- [ ] AWS profile matches environment
- [ ] Plan was generated successfully
- [ ] All agents completed analysis
- [ ] Risk level is accurately assessed
- [ ] All destruction operations are highlighted
- [ ] Security implications are documented
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.