Back to skills

refactor-module

infrastructure

Transforms monolithic Terraform configurations into reusable modules following HashiCorp's module design principles. Handles interface design, encapsulation, state migration, documentation, and test s

Setup & Installation

npx skills add https://github.com/hashicorp/refactor-module --skill refactor-module
or paste the link and ask your coding assistant to install it
https://github.com/hashicorp/refactor-module
View on GitHub

What This Skill Does

Transforms monolithic Terraform configurations into reusable modules following HashiCorp's module design principles. Handles interface design, encapsulation, state migration, documentation, and test scaffolding. Works with local, private, and public module registries. Manually refactoring Terraform state is error-prone and requires careful ordering of moved blocks, plan verification, and dependency mapping that this skill handles systematically.

When to use it

  • Working with refactor module functionality
  • Implementing refactor module features
  • Debugging refactor module related issues