refactor-module is HashiCorp's agent skill for turning a monolithic Terraform configuration into reusable modules, with typed interfaces, documentation, tests and a state migration that recreates no resources.
HashiCorp agent skills
HashiCorp publishes 4 agent skills listed here, from hashicorp/agent-skills (881 GitHub stars, last push September 28, 2026). HashiCorp's own Terraform and Packer skills, published from the hashicorp GitHub organization; its README says only HashiCorp-internal contributors may contribute.
- terraform-policy is HashiCorp's agent skill for writing Terraform Policy files (.policy.hcl), testing them with .policytest.hcl, and converting Sentinel policies to the new format.
- terraform-style-guide is HashiCorp's agent skill for writing and reviewing Terraform HCL to the official style conventions: file layout, formatting, naming, typed variables, version pinning and a review checklist.
- terraform-test is HashiCorp's agent skill for writing and running Terraform's built-in tests: .tftest.hcl files with run blocks, assertions, expected failures, mock providers and CI pipelines.