AI Skill MartBrowse skillsPromptsProgramsLearnWhat is a Skill?
 
← Back to list

Terraform Skill (diagnose-first Terraform/OpenTofu guide)

A diagnose-first skill for writing, reviewing and debugging Terraform/OpenTofu code, tests, CI pipelines and state operations with version-aware guardrails.

Dev & CodingIntermediate★ 2,455⑂ 227AI score 9/10Last updated: Oct 24, 2026

What it does

  • Captures execution context first: terraform vs tofu, exact version, providers, state backend, execution path (local/CI/Cloud/Atlantis), environment criticality.
  • Classifies the symptom via a failure-mode routing table: identity churn, secret exposure, blast radius, destroy cascade, CI drift, compliance gaps, testing blind spots, state corruption, provider upgrade/lifecycle risk, provisioner misuse.
  • Loads only the matching reference file (code-patterns.md, state-management.md, testing-frameworks.md, ci-cd-workflows.md, security-compliance.md, code-intelligence-lsp.md, quick-reference.md) instead of dumping everything.
  • Ends every answer with a Response Contract: assumptions & version floor, risk category addressed, chosen remediation & tradeoffs, exact validation commands, rollback notes.
  • Applies feature guards by version: moved (1.1+), import (1.5+), native test (1.6+), mock providers (1.7+), S3 native lockfile (1.10+), write_only (1.11+).
  • Hard safety rules: never apply to prod without a reviewed plan artifact; never destroy without plan -destroy plus explicit confirmation; never -auto-approve a destroy.

Who it's for

  • DevOps and platform engineers running AWS/Azure/GCP infrastructure as code.
  • Module authors who need consistent variable/output contracts, naming and release checklists.
  • Teams building IaC pipelines in GitHub Actions, GitLab CI or Atlantis.
  • Operators about to migrate backends, split state, or recover from a stuck lock.

Example uses

  1. "My refactor makes plan recreate 10 resources" → diagnosed as identity churn; migrates count to for_each, generates moved blocks, and verifies a 0-destroy plan.
  2. "Move production state to S3" → recommends use_lockfile on 1.10+ or DynamoDB locking below it, with backup, validation and rollback steps.
  3. "My tftest for S3 encryption rules keeps failing" → explains that set-type blocks can't be indexed with [0] and computed values need command = apply.
  4. "CI plan differs from my local plan" → pins runtime/providers, commits .terraform.lock.hcl, and applies the reviewed plan artifact instead of re-planning.

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/antonbabenko/terraform-skill/HEAD/skills/terraform-skill/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on AI Skill Mart.
Copy the skills/terraform-skill folder from the GitHub repo antonbabenko/terraform-skill into my ~/.claude/skills/antonbabenko-terraform-skill/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/antonbabenko/terraform-skill.git /tmp/terraform-skill && mkdir -p ~/.claude/skills && cp -r /tmp/terraform-skill/skills/terraform-skill ~/.claude/skills/

⚠ This is a third-party skill. Check the source repository before installing.

  1. Open a terminal.
  2. Clone the repo: git clone https://github.com/antonbabenko/terraform-skill.git
  3. Create the skills directory: mkdir -p ~/.claude/skills
  4. Copy the whole folder so the reference docs come along: cp -r terraform-skill/skills/terraform-skill ~/.claude/skills/
  5. Verify: ls ~/.claude/skills/terraform-skill — you should see SKILL.md and a references/ directory.
  6. Restart Claude Code, then ask something like "review this Terraform module" to trigger the skill.
  7. (Optional) Have terraform or tofu on PATH with terraform init run, plus tflint, trivy and checkov installed for the validation and security stages.
View source on GitHub ↗License: NOASSERTION