Sponsor Suno AI Music arrow_forward
Slash Command

Terraform Plan Analyze

Analyze terraform plan output for risks and cost impact

Type
Slash Command
GitHub stars
2.8k
License
MIT
Repo last updated
Sep 27, 2026

What Terraform Plan Analyze is

Terraform Plan Analyze is a slash command published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”

A slash command is a reusable prompt saved as a markdown file and run by typing its name after a slash. In Claude Code, custom commands have been merged into skills: a file in .claude/commands/ and a skill folder in .claude/skills/ both create the same kind of command, and existing command files keep working.

Terraform Plan Analyze gives you a repeatable way to run the same instructions without retyping them, optionally with arguments.

How to install Terraform Plan Analyze

Claude Code

  1. Download terraform-plan-analyze.md from the repository.
  2. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md.
  3. Run it by typing / followed by its name.

Claude Cowork

  1. Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it.
  2. In Customize → Skills, click +, then upload the ZIP.
  3. Run it from any task with / and the skill name.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/packages/devops-automation-pack/plugins/05-terraform/commands/terraform-plan-analyze.md, shared under the repository's MIT license. Read the full file on GitHub.

Analyzes terraform plan output to identify risks (resource recreation, data loss, downtime), estimate cost impact, and provide change recommendations.

When to Use This

  • Before applying Terraform changes
  • Reviewing large plan outputs
  • Need cost impact analysis
  • Want to catch risky changes (deletions, recreations)
  • CI/CD pipeline plan review
  • Plan is empty (no changes)

How It Works

You are a Terraform plan analysis expert. When user runs /terraform-plan-analyze or /tpa:

  1. Analyze plan output: Ask user to provide terraform plan output or run:
   terraform plan -out=tfplan
   terraform show -json tfplan
  1. Categorize changes:
  • Create (+): New resources
  • Update (~): Modifications (in-place)
  • Replace (-/+): Recreate resource
  • Delete (-): Resource removal
  1. Identify risks:
  • Critical: Data loss (RDS deletion, S3 bucket)
  • High: Downtime (recreation of production resources)
  • Medium: Configuration changes requiring attention
  • Low: Safe additions or updates
  1. Estimate cost impact:
  • New resources cost (based on resource type/size)
  • Savings from deletions
  • Net change estimate
  1. Provide recommendation:
  • APPROVE: Low risk, proceed with apply
  • ️ REVIEW: Medium risk, review changes carefully
  • BLOCK: High risk, requires manual approval
  • DANGER: Critical risk, do not apply without backup

Output Format

## Plan Analysis Summary

**Total Changes:** [N resources]
- Create: [X]
- Update: [Y]
- Replace: [Z]
- Delete: [W]

## Risk Assessment

###  Critical Risks ([N])
[List of dangerous changes]

###  High Risks ([N])
[List of high-risk changes]

###  Medium Risks ([N])
[List of medium-risk changes]
…

Examples

Example 1: Risky Plan (Database Recreation)

User: /tpa

Plan Output:

Terraform will perform the following actions:

  # aws_db_instance.main must be replaced
-/+ resource "aws_db_instance" "main" {
      ~ arn                    = "arn:aws:rds:us-east-1:..." -> (known after apply)
      - allocated_storage      = 100 -> null
      + allocated_storage      = 200
      ~ endpoint               = "db.xyz.rds.amazonaws.com:5432" -> (known after apply)
      - engine_version         = "14.7" -> null
      + engine_version         = "15.4"  # forces replacement
    }

  # aws_ecs_service.app will be updated in-place
  ~ resource "aws_ecs_service" "app" {
      ~ desired_count = 3 -> 5
    }

Plan: 1 to add, 1 to change, 1 to destroy.

Analysis Output:

## Plan Analysis Summary

**Total Changes:** 2 resources
- Create: 1
- Update: 1
- Replace: 1
- Delete: 1

## Risk Assessment

###  CRITICAL RISKS (1)

**aws_db_instance.main - REPLACEMENT**
- **Risk:** DATABASE RECREATION = DATA LOSS
- **Reason:** Engine version upgrade from 14.7 → 15.4 forces replacement
- **Impact:**
  -  All database data will be lost (unless restored from snapshot)
  -  Downtime during recreation (~10-15 minutes)
…

aws rds create-db-snapshot \ --db-instance-identifier mydb \ --db-snapshot-identifier mydb-pre-upgrade-$(date +%Y%m%d-%H%M%S)


1. **Alternative: Blue/Green Deployment**
   - Create new RDS instance with new version
   - Migrate data manually
   - Update app to point to new instance
   - Delete old instance after verification

2. **Alternative: In-Place Upgrade (if supported)**
   - Check if 14.7 → 15.4 supports in-place upgrade
   - Use AWS Console or CLI for safer upgrade path

### SAFE CHANGES (1)

**aws_ecs_service.app - UPDATE**

- **Change:** Scaling from 3 → 5 tasks
- **Risk:** Low (gradual scale-out)
- **Impact:** Increased costs (~$50/month for 2 additional tasks)
…

Example 2: Safe Plan (Adding Resources)

User: /tpa

Plan Output:


Terraform will perform the following actions:

# aws_s3_bucket.assets will be created

- resource "aws_s3_bucket" "assets" {
  - bucket = "myapp-assets"
  - region = "us-east-1"
    }

# aws_cloudfront_distribution.cdn will be created

- resource "aws_cloudfront_distribution" "cdn" {
  - enabled = true
  - price_class = "PriceClass_100"
    }

Plan: 2 to add, 0 to change, 0 to destroy.
…

Analysis Output:

## Plan Analysis Summary

**Total Changes:** 2 resources
- Create: 2
- Update: 0
- Replace: 0
- Delete: 0

## Risk Assessment

###  SAFE CHANGES (2)

**aws_s3_bucket.assets - CREATE**
- **Risk:** None (new resource)
- **Impact:** $0.023/GB storage + $0.09/GB transfer

**aws_cloudfront_distribution.cdn - CREATE**
- **Risk:** None (new resource)
…

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Terraform Plan Analyze?

Terraform Plan Analyze is a slash command for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Analyze terraform plan output for risks and cost impact

How do I install Terraform Plan Analyze in Claude Code?

Download terraform-plan-analyze.md from the repository. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md. Run it by typing / followed by its name.

Can I use Terraform Plan Analyze in Claude Cowork?

Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it. In Customize → Skills, click +, then upload the ZIP. Run it from any task with / and the skill name.

Is Terraform Plan Analyze safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.