terraform-style-guide

Generate and validate Terraform HCL code against HashiCorp style conventions.

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/MrAlexisCord/chatbot-prototype --skill terraform-style-guide-mralexiscord
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-style-guide
Source: https://github.com/MrAlexisCord/chatbot-prototype/tree/main/.agents/skills/terraform-style-guide
Command: npx skills add https://github.com/MrAlexisCord/chatbot-prototype --skill terraform-style-guide-mralexiscord

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures your Terraform HCL code adheres to HashiCorp's official style conventions and best practices, improving readability, maintainability, and reducing errors.

Core Features & Use Cases

  • Code Generation: Generates Terraform HCL code following established style guides.
  • Code Review: Provides a checklist and guidelines for reviewing Terraform configurations.
  • Best Practices Enforcement: Enforces naming conventions, file organization, and security principles.
  • Use Case: When starting a new Terraform project or refactoring existing code, use this Skill to generate a well-structured and compliant configuration.

Quick Start

Use the terraform-style-guide skill to generate a basic Terraform configuration for an AWS VPC.

Frequently Asked Questions about terraform-style-guide

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

FAQPage Schema
How do I generate Terraform HCL code that follows HashiCorp's official style conventions?

To generate compliant Terraform HCL code, use a style guide skill that enforces HashiCorp's official naming conventions, file organization, and security principles during code generation. This ensures your infrastructure configurations remain readable and maintainable.

What are the best practices for organizing variables and outputs in Terraform configurations?

Best practices for Terraform variables and outputs involve enforcing strict naming conventions, standardizing file organization, and applying security hardening principles. Using a dedicated style guide ensures these definitions are consistently structured across your infrastructure.

Can I use this style guide to review and validate existing Terraform configurations?

Yes, you can validate existing Terraform configurations using the included code review checklist and validation tools. This process checks your HCL code against established style conventions and security principles to identify areas needing refactoring.

Does this Terraform style guide support dynamic resource creation and provider configuration?

Yes, the Terraform style guide supports dynamic resource creation, provider configuration, and version pinning. It generates and validates HCL code to ensure your infrastructure provisioning adheres to established best practices.

What is the best way to enforce security hardening and version control in Terraform IaC?

The best way to enforce security hardening and version control in Terraform IaC is to apply a comprehensive style guide. It validates your HCL code against established security principles, version pinning rules, and provider configuration standards.

When should I use a Terraform style guide for my infrastructure as code projects?

You should use a Terraform style guide when starting a new infrastructure as code project or refactoring existing HCL configurations. It ensures your code adheres to official conventions, reducing errors and improving maintainability.