terramate-io avatar

Terraform Best Practices

A comprehensive IaC guidebook from Terramate covering 37 rules across everything from state management and security to module design and testing. It's organized by priority, so you can focus on the critical stuff first (remote backends, credential handling, workspace isolation) before worrying about performance tuning. Each rule includes wrong and right code examples, which is helpful when you're reviewing PRs or setting up team standards. The taxonomy is solid, using prefixes like `security-`, `module-`, and `state-` to keep things organized. Best used when establishing conventions for a team or when you need to justify why something should be done a certain way. It's opinionated but pragmatic, which is exactly what you want from a style guide.

skills.sh installs
410
GitHub stars
35
last updated
Aug 21, 2026

Install

$ npx -y skills add terramate-io/agent-skills --skill terraform-best-practices --agent claude-code

Installs into .claude/skills of the current project.

Files

Terraform Best Practices

Comprehensive optimization guide for Terraform and Infrastructure as Code, maintained by Terramate. Contains 37 rules across 10 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

  • Writing new Terraform modules or configurations
  • Implementing infrastructure patterns (AWS, GCP, Azure, etc.)
  • Reviewing code for security and reliability issues
  • Refactoring existing Terraform/OpenTofu code
  • Optimizing state management and performance
  • Setting up team workflows and governance

Rule Categories by Priority

Sponsors

Details

Repository
github.com/terramate-io/agent-skills
Categories
Security, DevOps & CI/CD, Documentation, Code Review & Quality, AI & Agent Building, Cloud & Infrastructure
First seen
Jun 3, 2026

More from terramate-io/agent-skills

All 2

Recommended

More Security
1secondsky avatarclaude-code-bash-patternssecondsky/claude-skillsClaude Code Bash tool patterns with hooks, automation, git workflows. Use for PreToolUse hooks, command chaining, CLI orchestration, custom commands, or encount408skills.sh installs
2jezweb avatarfastmcpjezweb/claude-skillsBuild MCP servers in Python with FastMCP to expose tools, resources, and prompts to LLMs. Supports storage backends, middleware, OAuth Proxy, OpenAPI integratio406skills.sh installs
3mrgoonie avatarrepomixmrgoonie/claudekit-skillsPackage entire code repositories into single AI-friendly files using Repomix. Capabilities include pack codebases with customizable include/exclude patterns, ge406skills.sh installs
4dpearson2699 avatarpasskit-walletdpearson2699/swift-ios-skillsIntegrate Apple Pay payments and Wallet passes using PassKit. Use when adding Apple Pay buttons, creating payment requests, handling payment authorization, addi401skills.sh installs
5microsoftdocs avatarazure-functionsmicrosoftdocs/agent-skillsExpert knowledge for Azure Functions development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, se398skills.sh installs
6asif2bd avatartoken-optimizerasif2bd/openclaw-token-optimizerOpenClaw Token Optimizer v3.2.0 — practical cost-control toolkit for OpenClaw agents. Lazy context loading, Sonnet/Opus-aware routing, heartbeat scheduling, loc397skills.sh installs