CtrlK
BlogDocsLog inGet started
Tessl Logo

refactor-module

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

Install with Tessl CLI

npx tessl i github:hashicorp/agent-skills --skill refactor-module
What are skills?

80

1.05x

Quality

41%

Does it follow best practices?

Impact

84%

1.05x

Average score across 10 eval scenarios

Optimize this skill with Tessl

npx tessl skill review --optimize ./terraform/module-generation/skills/refactor-module/SKILL.md
SKILL.md
Review
Evals

Evaluation results

100%

Refactor S3 Bucket Configuration Into a Module

State migration with moved blocks

Criteria
Without context
With context

Uses moved blocks

100%

100%

Module-prefixed target addresses

100%

100%

For-each key mapping

100%

100%

Count-indexed mapping

100%

100%

65%

Extract Database Resources Into a Reusable Module

Module directory structure and variable design

Criteria
Without context
With context

Module directory path

100%

100%

Separate variable file

100%

100%

Separate outputs file

100%

100%

Typed object variable

0%

0%

Validation block present

0%

0%

All variables have descriptions

100%

100%

75%

Refactor Networking Configuration Into a VPC Module

Resource consolidation and parameterization patterns

Criteria
Without context
With context

for_each on subnets

0%

0%

Tag merge pattern

100%

100%

cidrsubnet for CIDRs

100%

100%

Conditional count on NAT

100%

100%

80%

15%

Decompose a Full-Stack Application Into Modules

Composition patterns and encapsulation boundaries

Criteria
Without context
With context

Multiple focused modules

100%

100%

Inter-module wiring via root

100%

100%

Monitoring stays outside

100%

100%

try() on conditional output

0%

0%

Output map for collections

0%

100%

100%

5%

Create a Production-Ready Security Group Module

Module documentation and testing

Criteria
Without context
With context

README exists in module

100%

100%

README has Usage section with HCL

100%

100%

README has Inputs table

100%

100%

README has Outputs table

100%

100%

Test file uses .tftest.hcl

75%

100%

Test has run and assert blocks

100%

100%

Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.