terraform-conventions

Enforce Terraform file layout, naming, variable, and output conventions.

Updated Jan 18, 2026
One-click install
npx skills add https://github.com/333-333-333/agents --skill terraform-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-conventions
Source: https://github.com/333-333-333/agents/tree/main/skills/terraform-conventions
Command: npx skills add https://github.com/333-333-333/agents --skill terraform-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

Terraform codebases often suffer from inconsistent file layouts, naming, variable handling, and outputs, leading to harder reviews and deployments. This skill provides a centralized set of conventions to maintain clean, predictable infrastructure code across projects.

Core Features & Use Cases

  • Enforces standard file layout for Terraform modules (versions.tf, provider.tf, variables.tf, main.tf, outputs.tf) to ensure consistent structure.
  • Guides naming conventions, variable definitions with explicit types and descriptions, and safe outputs to improve maintainability and security.
  • Use Case: when starting a new Terraform directory or refactoring an existing module, apply the conventions to reduce drift and review overhead.

Quick Start

Create a new Terraform directory and apply the five-file convention (versions.tf, provider.tf, variables.tf, main.tf, outputs.tf) following the patterns and rules described.

Frequently Asked Questions about terraform-conventions

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

FAQPage Schema
What is the standard file layout for Terraform modules to maintain infrastructure as code consistency?

Standard Terraform file layout separates infrastructure definitions into versions.tf, provider.tf, variables.tf, main.tf, and outputs.tf to ensure predictable module organization and reduce codebase drift.

How do I enforce naming conventions and variable rules in Terraform projects?

You can enforce Terraform naming conventions and variable rules by applying centralized checks that require explicit variable types, descriptions, and safe outputs to improve infrastructure code maintainability and security.

What's the best way to structure a new Terraform directory to prevent configuration drift?

The best way to structure a new Terraform directory is to apply a five-file convention pattern immediately, ensuring variables, providers, and resources are logically separated to prevent configuration drift from the start.

When do I need to refactor Terraform code conventions for existing modules?

You need to refactor Terraform code conventions when existing modules suffer from inconsistent file layouts, naming, or variable handling, making infrastructure definitions harder to review and deploy reliably.

Does this Terraform conventions approach require external dependencies to validate code patterns?

No, applying these Terraform conventions requires no external dependencies, as the validation of variable patterns, file layouts, and naming rules is provided entirely through centralized guidance and checks.