terraform-style-check

Enforce HashiCorp Terraform style guidelines for infrastructure code.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/jaypatrick/skills --skill terraform-style-check-jaypatrick
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-style-check
Source: https://github.com/jaypatrick/skills/tree/main/terraform-style-check
Command: npx skills add https://github.com/jaypatrick/skills --skill terraform-style-check-jaypatrick

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate Terraform configurations that adhere to HashiCorp's official style conventions and best practices, reducing code drift and improving maintainability.

Core Features & Use Cases

  • Enforce indentation, naming conventions, and variable descriptions
  • Recommend and organize a standard file structure (variables.tf, main.tf, outputs.tf, etc.)
  • Enforce version pinning and security best practices across configurations
  • Validate configurations with common tooling guidance and reviews

Quick Start

Generate a compliant Terraform module for a simple VPC example following the style guide.

Frequently Asked Questions about terraform-style-check

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

FAQPage Schema
How do I enforce HashiCorp Terraform style guidelines for consistent infrastructure code?

To enforce Terraform style guidelines, you apply rules for two-space indentation, descriptive variable names with types and descriptions, and version pinning. This ensures consistency and safety across infrastructure configurations.

What is the recommended file structure for organizing Terraform configurations?

The recommended Terraform file structure organizes configurations into standard files like variables.tf, main.tf, and outputs.tf. This organization improves maintainability and reduces code drift across modules.

How do I ensure security best practices are applied when creating Terraform modules?

To ensure security best practices in Terraform, enforce secure defaults, version pinning, and outputs with descriptions. This applies to creating, reviewing, and maintaining infrastructure code.

Can I use this approach to validate existing Terraform configurations during code reviews?

Yes, you can validate existing Terraform configurations by checking for common tooling guidance and reviewing against style conventions. This covers file organization, variable naming, and resource layout.

What's the best way to generate a compliant Terraform module for a simple VPC?

The best way to generate a compliant Terraform module is to follow the style guide for a simple VPC example. This enforces naming conventions, indentation, and standard file structures.

Why does my Terraform configuration need descriptive variable names and types?

Terraform configurations need descriptive variable names and types to improve consistency and safety. This practice ensures maintainability and aligns with official style conventions.