Terraform Style Guide

🏢Official
by hashicorp · vlatest · Repository

Enforces HashiCorp's Terraform style guide to ensure consistent, readable, and maintainable infrastructure code.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add terraform-style-guide npx -- -y @trustedskills/terraform-style-guide
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "terraform-style-guide": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/terraform-style-guide"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

The Terraform Style Guide skill provides standardized formatting and best practices for writing Terraform configuration files. It helps ensure consistency across teams, improves readability, and enforces conventions that align with HashiCorp's official recommendations.

When to use it

  • When multiple developers are working on the same Terraform project and need a shared standard for code style.
  • Before committing Terraform configurations to version control to automatically format them according to best practices.
  • When onboarding new team members who are unfamiliar with Terraform conventions.
  • To maintain clean, readable infrastructure-as-code (IaC) across large or evolving projects.

Key capabilities

  • Enforces consistent formatting of Terraform configuration files.
  • Applies naming conventions for resources and variables.
  • Ensures proper use of comments and documentation within configurations.
  • Aligns with HashiCorp’s official Terraform Style Guide recommendations.

Example prompts

  • "Format my Terraform code according to the HashiCorp style guide."
  • "Check this Terraform configuration for compliance with standard formatting rules."
  • "Apply the Terraform style guide to all modules in this project."

Tips & gotchas

  • Ensure that your environment has the necessary tools (like terraform fmt) installed and configured.
  • This skill works best when used alongside a linter or CI/CD pipeline to enforce style compliance automatically.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
hashicorp
Installs
1.3k

🏢 Official

Published by the company or team that built the technology.