Terraform Style Check
Ensures Terraform code adheres to best practices and style guidelines, improving consistency and reducing errors.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add terraform-style-check npx -- -y @trustedskills/terraform-style-check
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"terraform-style-check": {
"command": "npx",
"args": [
"-y",
"@trustedskills/terraform-style-check"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill checks Terraform code for style violations against configurable rules. It identifies and reports deviations from established coding standards, ensuring consistency and readability within infrastructure as code projects. The tool helps maintain a uniform codebase and reduces potential errors arising from inconsistent formatting.
When to use it
- Automated Code Reviews: Integrate into CI/CD pipelines to automatically enforce Terraform style guidelines on every commit.
- Team Onboarding: Ensure new team members adhere to existing coding standards by running checks during onboarding.
- Refactoring Existing Infrastructure: Standardize the style of legacy Terraform codebases through automated analysis and remediation suggestions.
- Pre-Commit Hooks: Implement as a pre-commit hook to prevent developers from committing code that violates style guidelines.
Key capabilities
- Configurable rulesets
- Automated style checking
- Integration with CI/CD pipelines
- Reporting of violations
Example prompts
- "Check the Terraform configuration file
main.tffor style errors." - "Run a style check against the entire Terraform project and report any deviations from the standard ruleset."
- "Analyze this Terraform code snippet and suggest improvements to adhere to best practices."
Tips & gotchas
The skill requires a working Terraform environment to be effective. Ensure that Terraform is installed and configured correctly before using this skill.
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 Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.