
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-codeInstalls 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