refactor-module

Installation
SKILL.md

Terraform Module Refactoring - Decision Expert

Assumption: You know Terraform syntax. This covers when to modularize vs keep inline.

NEVER

  • Never modularize on first usage — wait for the third real instance; premature abstraction locks in the wrong seam.
  • Never expose module variables 1:1 with resource arguments — that's not abstraction, it's indirection (the Leaky Abstraction trap).
  • Never refactor inline resources to a module without running terraform state mv first — Terraform will plan to destroy and recreate every resource.
  • Never create a module for frequently-changing code — module API changes cascade across all consumers.
  • Never skip terraform state pull > backup.tfstate before any state migration.

The Core Decision

Related skills

More from acedergren/agentic-tools

Installs
23
GitHub Stars
13
First Seen
Feb 14, 2026