policy-lang-terraform

Define and enforce Terraform/OpenTofu coding standards for module structure and naming.

1|Updated Oct 5, 2025
One-click install
npx skills add https://github.com/simon-downes/agent-workspace --skill policy-lang-terraform
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: policy-lang-terraform
Source: https://github.com/simon-downes/agent-workspace/tree/main/skills/policy-lang-terraform
Command: npx skills add https://github.com/simon-downes/agent-workspace --skill policy-lang-terraform

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Terraform/OpenTofu projects often suffer from inconsistent structure, naming, and tooling, making maintenance and collaboration hard across teams.

Core Features & Use Cases

  • Establishes standard file layouts (providers.tf, README.md, variables.tf, outputs.tf) and enforces naming conventions for Terraform modules.
  • Recommends tooling and commands (tofu fmt, tofu validate) to ensure code quality and consistency across environments.
  • Guides module creation and versioning practices to support production-grade infrastructure.

Quick Start

Audit a Terraform/OpenTofu repository against the standards defined in this Skill to ensure file naming, structure, and tooling usage are consistent across modules and environments.

Frequently Asked Questions about policy-lang-terraform

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

FAQPage Schema
How do I enforce consistent Terraform coding standards across multiple projects?

Terraform module structure standards specify required file layouts such as providers.tf, variables.tf, and outputs.tf to eliminate inconsistent project layouts. This ensures maintainable infrastructure by enforcing naming conventions and predictable file organization across multiple environments.

What is the best way to standardize OpenTofu module structure and file naming?

Standardizing OpenTofu module structure involves applying required file layouts like providers.tf, variables.tf, and outputs.tf alongside enforced naming conventions. This approach eliminates inconsistent project structures and supports production-grade infrastructure maintenance.

Does this coding standards approach work for both Terraform and OpenTofu tooling?

Yes, these coding standards apply to both Terraform modules and OpenTofu tooling across multiple projects. The standards recommend tooling commands like tofu fmt and tofu validate to ensure code quality and consistency across both platforms.

How do I audit an existing Terraform repository against organization-wide coding standards?

You audit a Terraform repository by checking its file naming, module structure, and tooling usage against defined steering file configurations and frontmatter requirements. This quick start process identifies structural inconsistencies and validates module versioning practices.

What Terraform lint and format commands should I use to maintain code quality?

To maintain Terraform code quality, you should use tofu fmt and tofu validate commands as recommended by the coding standards. These tools enforce formatting and validate configurations to ensure consistency and maintainability across your infrastructure environments.