Best of

Best Terraform agent skills for Claude Code, Codex and other agents

Checked by CookiesForAI on : the 5 listed items were checked on that day.

The short answer

For plan checks that run on every pull request, start with HashiCorp's terraform-test, which writes repeatable plan-mode tests; for reviewing the HCL itself, use terraform-style-guide. None of the 5 skills reads terraform plan output for you, and we read their instructions but did not run them on a Terraform project.

For repeatable plan-mode tests, start with HashiCorp's terraform-test, which turns checks a reviewer might make by eye into assertions that can run on every pull request. For a checklist that reviews the HCL itself, start with terraform-style-guide. No skill we list reads terraform plan output for you, and we did not run these skills on a Terraform project. We compared 5 skills, four from HashiCorp's own repository and Anton Babenko's community terraform-skill, on fit to reviewing Terraform changes, how concrete the guidance is, which agents the publisher documents, and license. Facts checked on and .

NameBest forMade byLicenseNotesChecked
Terraform testChecking plans automatically with plan-mode tests in CIHashiCorpMPL-2.0925 stars
Terraform style guideReviewing Terraform code in a pull requestHashiCorpMPL-2.0925 stars
Refactor moduleModule refactors that must plan with no changesHashiCorpMPL-2.0925 stars
Terraform policyTurning review rules into Terraform Policy, or leaving SentinelHashiCorpMPL-2.0925 stars
Terraform skillA reviewed plan as a required gate before any production applyAnton BabenkoApache-2.02,460 stars

What our tests show

We asked Claude "Is there an agent skill that helps my coding agent review Terraform plans?" in Claude Code on . All 6 search runs, on three Claude models, searched the web. Sites whose pages were opened or linked in the 6 search runs: skills.lc 5 of 6, explainx.ai 2 of 6. This measures how Claude found such skills, not how well any skill here works.

Read the study

Sites whose pages Claude opened or linked, in 6 search runs

  1. skills.lc5 of 6
  2. explainx.ai2 of 6

Our own runs; the questions, method and raw data are in the study linked above.

Source: CookiesForAI, October 2026, 6 runs

Reuse this chart

Free to reuse with credit (CC BY 4.0). Download SVG

Embed code
<figure><img src="https://cookiesforai.app/charts/best-terraform-agent-skills--tested.svg" alt="Sites whose pages Claude opened or linked, in 6 search runs: skills.lc 5 of 6, explainx.ai 2 of 6."><figcaption>Source: CookiesForAI, Sites whose pages Claude opened or linked, in 6 search runs, https://cookiesforai.app/best/best-terraform-agent-skills</figcaption></figure>

Which one to pick

If you needTake
plan checks that run in CI without a humanTerraform test
an agent to review a Terraform pull requestTerraform style guide
a module refactor that must plan with no changesRefactor module
to move review rules or Sentinel policies to Terraform PolicyTerraform policy
a reviewed plan as a gate before any production applyTerraform skill

terraform-test: the closest thing to automated plan review

terraform-test is HashiCorp's agent skill for writing and running Terraform's built-in tests, for teams that want plan checks repeated on every pull request instead of kept in a reviewer's head. Its strength for plan review is plan mode: a run block with command = plan creates nothing, and assert blocks then check resource counts, tags, conditional resources and outputs against what the plan would build. The skill names those files *_unit_test.tftest.hcl so CI can run them on every pull request, and a reference file gives ready GitHub Actions and GitLab CI pipelines. Its limit is that it checks only what you thought to assert: it does not read an existing plan and point out an unexpected destroy or replacement. Mock providers, which let tests run without cloud credentials, need Terraform 1.7.0 or newer. The skill folder was last changed on . See Terraform test.

terraform-style-guide: a checklist for reviewing Terraform code

terraform-style-guide is HashiCorp's agent skill for writing and reviewing Terraform HCL to HashiCorp's published style conventions, for anyone who wants an agent's pull request reviews to apply the same rules every time. Its strength is a closing checklist of ten items: terraform fmt and terraform validate pass, files follow the standard split into terraform.tf, providers.tf, main.tf, variables.tf, outputs.tf and locals.tf, every variable has a type and description, versions are pinned, sensitive values are marked and no credentials are hardcoded. A SECURITY.md in the same folder covers encryption and keeping secrets out of state. Its limit is that it reviews code, not changes: it says nothing about which resources a plan will replace or destroy, and mentions *.tfplan files only as something never to commit. The folder was last changed on , and hashicorp/agent-skills had 880 GitHub stars on . See Terraform style guide.

refactor-module: refactors that must plan with no changes

refactor-module is HashiCorp's agent skill for splitting a large Terraform configuration into reusable modules, for teams whose main.tf has grown a copied block per subnet or environment. It is the one HashiCorp skill here that makes the plan the pass mark: its success criteria include no resource recreation and no plan differences after the move, and it tells the agent to save the plan to a file, inspect it with terraform show, and apply only if it shows no changes. It writes moved blocks for Terraform 1.1 and newer, or terraform state mv commands for older versions, and lists addresses with terraform state list rather than printing state, which holds sensitive values in plain text. Its limit is scope: plan checking appears only as the last step of a refactor, not as a review of an arbitrary change. The folder was last changed on . See Refactor module.

terraform-policy: review rules written down as policy

terraform-policy is HashiCorp's agent skill for Terraform Policy, the HCL policy language checked by the tfpolicy CLI, for teams that want a review rule such as "Block EC2 instances without encryption" enforced by policy rather than repeated in every review. Its strength is care about versions: before giving instructions the agent checks the installed tfpolicy version, because the skill keeps separate guidance for the 0.2.x and 0.3.x lines, which differ on points such as whether mock resources in .policytest.hcl files must declare attributes. It also converts single .sentinel policies and whole Sentinel libraries. Its limit is depth in the main file: the SKILL.md is a router of under 500 words that sends the agent to two reference guides, and nothing works without the tfpolicy CLI installed. It writes and tests policies; it does not review a plan. The folder was last changed on , the most recent of the four HashiCorp skills. See Terraform policy.

terraform-skill: a reviewed plan as a gate before any apply

terraform-skill is Anton Babenko's agent skill for writing, testing and reviewing Terraform and OpenTofu, for teams that want each agent answer to name its risk and a way back. Its strength for plan review is two fixed rules: the agent may not recommend a production apply without a reviewed plan artifact and an approval, and may not run a destroy before terraform plan -destroy has listed every resource it would delete. Each answer ends with the commands that validate the change, such as terraform plan -out, and how to roll back a change to state. Its limit is that it does not read a saved plan file for you: it shows how to export one with terraform show -json and leaves the reading to the agent and to you. It is a personal project, not HashiCorp's; its LICENSE file says Apache-2.0 while GitHub's license field shows NOASSERTION. The repository had 2,394 GitHub stars on . See Terraform skill.

Is there an agent skill that reviews terraform plan output?

HashiCorp does not publish one. On hashicorp/agent-skills held 20 skills, 16 for Terraform and 4 for Packer, and none is built to read terraform plan output and report on it. In our October 2026 field study we asked six AI assistants "Is there an agent skill that helps my coding agent review Terraform plans?" and the answers did not agree. ChatGPT gave three different first picks in three runs. Gemini named Anton Babenko's terraform-skill first in all three of its runs. Perplexity, Google AI Mode and Grok each gave a different mix of community skills, HashiCorp's skills and advice to write a custom SKILL.md.

A setup that works with the skills above today: save the plan with terraform plan -out, render it with terraform show, and ask the agent to review that output with terraform-style-guide loaded, the same commands refactor-module uses for its own check.

A community Terraform skill we do not list yet

LukasNiessen/terrashark had 718 stars on , is MIT, and describes itself as a Terraform skill for Claude Code and Codex. Its SKILL.md, about 400 words, runs a failure-mode workflow (identity churn, secret exposure, blast radius, CI drift, compliance gaps) and also refuses a production apply without a reviewed plan and approval. Like terraform-skill, it makes a reviewed plan a gate inside a wider workflow rather than reading a saved plan file.

It is not in our table because it meets none of our listing rules: it is a personal project, it is below 5,000 stars, and in our runs on only one AI engine maker named it. terraform-skill is listed under the third rule, named by Google, xAI and Anthropic engines in most of their runs. The rules are about provenance, not a judgement of quality.

The other route: HashiCorp's Terraform MCP server

The Terraform MCP server, hashicorp/terraform-mcp-server, gives an agent tools instead of instructions; it had 1,539 GitHub stars on and is MPL-2.0. With an HCP Terraform or Terraform Enterprise token it exposes tools such as get_plan_details, get_plan_logs and get_plan_json_output, so an agent can fetch the plan of a real run and review it. The default toolset is registry lookups only, the run and plan tools need TFE_TOKEN, and tools that change things, such as action_run, also need ENABLE_TF_OPERATIONS. Plans run on a laptop or in plain CI are out of its reach. HashiCorp's README gives setup steps for VS Code, Cursor, Claude Code, Codex CLI, Gemini CLI, Claude Desktop, Amazon Q Developer, Kiro CLI and IBM Bob. We have not listed it in our MCP directory yet.

How we compared

We read the SKILL.md and folder of each of the 4 HashiCorp skills on GitHub on and of terraform-skill on , plus the file list of hashicorp/agent-skills, the SKILL.md of TerraShark, and the Terraform MCP server's README and tool registry. We ranked by four criteria in this order: fit to reviewing Terraform changes, how concrete the guidance is (commands, file names, pass criteria), which agents the publisher documents, and license terms. Stars and last-change dates come from the GitHub API on the same day. We did not run any skill on a real Terraform project, did not measure review quality, and did not connect the MCP server to HCP Terraform.

How to choose

  • If you want plan checks that run without a human, use terraform-test with command = plan runs, and add mock providers on Terraform 1.7.0 or newer so CI needs no cloud credentials.
  • If you want an agent to review a Terraform pull request, load terraform-style-guide; when the change moves resources into modules, add refactor-module so the plan must show no changes.
  • If your runs happen in HCP Terraform or Terraform Enterprise, connect the Terraform MCP server and let the agent fetch the plan JSON of the run under review.
  • If your organization enforces rules with Sentinel today, use terraform-policy to move them to Terraform Policy.
  • If you want a skill whose whole workflow treats a reviewed plan as a gate, use terraform-skill; TerraShark, which we do not list, takes the same approach.

Questions people ask

Is there an agent skill that reviews terraform plan output?

Not a dedicated one from HashiCorp: its 20 skills on include none for that job. terraform-test checks a plan against assertions you write, and the community skills antonbabenko/terraform-skill and TerraShark make a reviewed plan a required step before any production apply. If your runs live in HCP Terraform or Terraform Enterprise, HashiCorp's Terraform MCP server can fetch a run's plan as JSON for an agent to read.

Do HashiCorp's Terraform agent skills work in Codex and Cursor?

Yes. HashiCorp's README documents GitHub Copilot, Claude Code, Codex, Cursor, OpenCode and IBM Bob. The skills CLI installs any single skill with npx skills add hashicorp/agent-skills --skill followed by its name, and Claude Code and Codex can also install HashiCorp's terraform plugin, which holds all 16 Terraform skills.

Can I copy HashiCorp's Terraform skills into a private repository?

Yes. They are MPL-2.0, which allows use in closed source projects. Only if you change the skill files and distribute them must those changed files stay MPL-2.0 and be shared as source; your own Terraform code is not affected.

Sources

Changes to this page

  • : short answer, what our tests show and which-to-pick added.