refactor-module

Transform monolithic Terraform configurations into reusable, maintainable modules following HashiCorp's module design principles…

hashicorp 752 ↓ 4.1k MPL-2.0 updated 1mo ago
Claude Code
View source ↗

What it does

  • Clear interface contracts (variables and outputs)
  • Proper encapsulation and abstraction
  • Versioning and documentation
  • Testing frameworks
  • Migration path for existing state
  • Existing Terraform configuration to refactor
  • Understanding of resource dependencies

Requirements & configuration

  • Run Block: Defines a single test scenario with optional variables, provider configurations, and assertions. Each test file requires at least one run block.

Derived from the skill's own SKILL.md documentation · extracted 2026-07-23

Transform monolithic Terraform configurations into reusable, maintainable modules following HashiCorp's module design principles and community best practices.

Source

Repository: https://github.com/hashicorp/agent-skills

refactor-module FAQ

What does the refactor-module skill do?

Transform monolithic Terraform configurations into reusable, maintainable modules following HashiCorp's module design principles and community best practices. Clear interface contracts (variables and outputs) Proper encapsulation and abstraction

What does refactor-module require?

Run Block: Defines a single test scenario with optional variables, provider configurations, and assertions. Each test file requires at least one run block.

How do I install refactor-module?

Run: npx -y skills add https://github.com/hashicorp/agent-skills --skill refactor-module --agent claude-code — the source lives at github.com/hashicorp/agent-skills.

Maintain refactor-module?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

[refactor-module on getagentictools](https://getagentictools.com/skills/hashicorp-agent-skills-refactor-module?ref=badge)
npx agentictools info skills/hashicorp-agent-skills-refactor-module

The second line is the CLI lookup for this page — handy in READMEs and docs.