refactor-terraform

Analyze Terraform/OpenTofu IaC and produce a prioritized refactoring roadmap.

1|Updated Aug 16, 2025
One-click install
npx skills add https://github.com/ReefBytes/Manifest --skill refactor-terraform
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-terraform
Source: https://github.com/ReefBytes/Manifest/tree/main/configs/claude/skills/refactor-terraform
Command: npx skills add https://github.com/ReefBytes/Manifest --skill refactor-terraform

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyze Terraform/OpenTofu IaC to identify security, modularity, and quality gaps, returning a prioritized, actionable refactoring roadmap.

Core Features & Use Cases

  • Surface security shortcomings, module composition issues, and state-management risks in Terraform/OpenTofu codebases.
  • Recommend modular refactors, improved variable usage, backend configuration, and drift mitigation strategies.
  • Provide production-grade roadmaps for teams to implement incremental improvements across environments.

Quick Start

Inspect a repository and generate a prioritized Terraform refactor plan suitable for sprints and releases.

Frequently Asked Questions about refactor-terraform

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify security and modularity issues in my Terraform codebase?

Terraform refactoring involves analyzing infrastructure-as-code to detect security gaps, module composition flaws, and state management risks. It produces a prioritized, actionable roadmap to incrementally improve backend configuration, variable usage, and drift mitigation across production environments.

How do I create a prioritized refactoring roadmap for production OpenTofu environments?

To create a prioritized OpenTofu refactoring roadmap, inspect production infrastructure-as-code to detect security risks and module composition issues. The analysis outputs a sprint-ready remediation plan addressing backend configuration, variable usage, and drift mitigation across environments.

Does this Terraform refactoring approach work with existing module and provider configurations?

Yes, this Terraform refactoring approach evaluates existing modules, providers, and state management setups. It analyzes current backend configurations and variable usage to produce an incremental remediation plan, avoiding the need for a complete infrastructure overhaul.

What is the best way to detect infrastructure drift and state management risks in IaC?

The best way to detect IaC drift and state management risks is to analyze Terraform or OpenTofu codebases for backend configuration and module composition gaps. This surfaces actionable improvements and provides targeted drift mitigation strategies within a prioritized roadmap.

Can I generate a sprint-ready remediation plan for Terraform variable usage and backend configuration?

Yes, you can generate a sprint-ready Terraform remediation plan by analyzing codebases for variable usage and backend configuration issues. The resulting roadmap prioritizes security and modularity improvements for incremental implementation across releases.