Terraform Skill (diagnose-first IaC guidance)
A diagnose-first Terraform/OpenTofu companion that classifies the failure mode, applies version-aware guards, and always ships validation and rollback steps.
Dev & CodingIntermediate★ 2,376⑂ 217AI score 9/10Last updated: Jul 3, 2026
What it does
- Forces context capture first: runtime (
terraformvstofu), exact version, providers, state backend, execution path, environment criticality. - Routes symptoms to a failure category — identity churn, secret exposure, blast radius, destroy cascade, CI drift, compliance gaps, testing blind spots, state corruption, provider upgrade/lifecycle risk.
- Enforces a response contract: assumptions, risk category, chosen remediation and tradeoffs, exact validation commands, rollback notes.
- Applies a version-floor table before emitting features (
moved1.1+,import1.5+, native tests 1.6+, mocks 1.7+,removed1.7+, S3 lockfile 1.10+,write_only1.11+). - Bundles opinionated guidance on module hierarchy and layout, variable/output contracts, testing decision matrix,
trivy/checkovscanning, secret handling, and state organization/splitting rules. - Documents terraform-ls capabilities (goToDefinition, findReferences) plus an explicit degradation path to
rg+ Read when LSP isn't available.
Who it's for
- DevOps and platform engineers running multi-environment Terraform/OpenTofu.
- Teams authoring or reviewing reusable modules who need consistent contracts and release checks.
- Anyone building IaC CI/CD (GitHub Actions, GitLab CI, Atlantis) or fighting local-vs-CI plan drift.
- Operators doing risky work: backend migrations, stuck locks, large refactors, provider removals.
Example uses
- "I deleted one item from a list and half my resources are being recreated" → diagnosed as
countindex churn, with afor_eachmigration plan andmovedblocks so plan shows zero destroys. - "Is passing a DB password as a variable safe?" → explains that
sensitive = trueonly masks output while the value persists in state, then rewrites using a secret manager lookup orwrite_onlyon 1.11+. - "Can I just target-destroy this one resource?" → runs
terraform plan -destroyfirst, lists implicit dependents pulled in via locals/for_each, and requires explicit confirmation before proceeding.
· · · 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)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude 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.
- Open a terminal.
- Clone the repository:
git clone https://github.com/antonbabenko/terraform-skill.git - Create the skills directory:
mkdir -p ~/.claude/skills - Copy the whole skill folder (the
references/files carry most of the depth):cp -r terraform-skill/skills/terraform-skill ~/.claude/skills/ - Verify
~/.claude/skills/terraform-skill/containsSKILL.mdand areferences/directory. - Restart Claude Code and try a prompt like "review this Terraform module" or "migrate my state to an S3 backend" — the skill should activate automatically.
- Optional: for semantic navigation, install
terraform(ortofu) andterraform-lson your PATH and runterraform initonce in the project directory.
View source on GitHub ↗License: NOASSERTION