Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add terramate-io/agent-skills --skill terraform-best-practicesgit clone --depth 1 https://github.com/terramate-io/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/terramate-io/agent-skills/terraform-best-practices)<a href="https://agentmods.dev/skills/terramate-io/agent-skills/terraform-best-practices"><img src="https://agentmods.dev/badge/skills/terramate-io/agent-skills/terraform-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/terramate-io/agent-skills/terraform-best-practices"><img src="https://agentmods.dev/badge/skills/terramate-io/agent-skills/terraform-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00067 | $0.01206 |
| Opus 5.5 | $0.00027 | $0.00482 |
| Sonnet 5.5 | $0.00013 | $0.00241 |
| Haiku 4.5 | $0.00007 | $0.00121 |
Grade A, and why
terraform-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Organization & Workflow | CRITICAL | org- |
| 2 | State Management | CRITICAL | state- |
| 3 | Security Best Practices | CRITICAL | security- |
| 4 | Module Design | HIGH | module- |
| 5 | Resource Organization | MEDIUM-HIGH | resource- |
| 6 | Variable & Output Patterns | MEDIUM | variable-, output- |
| 7 | Language Best Practices | MEDIUM | language- |
| 8 | Provider Configuration | MEDIUM | provider- |
| 9 | Performance Optimization | LOW-MEDIUM | perf- |
| 10 | Testing & Validation | LOW | test- |
Quick Reference
1. Organization & Workflow (CRITICAL) - 5 rules
org-version-control- All Terraform code in version controlorg-workspaces- One workspace per environment per configurationorg-access-control- Control who can change what infrastructureorg-change-workflow- Formal process for infrastructure changesorg-audit-logging- Track all infrastructure changes
2. State Management (CRITICAL) - 3 rules
state-remote-backend- Always use remote state backendsstate-locking- Enable state locking to prevent corruptionstate-import- Import existing infrastructure into Terraform
3. Security Best Practices (CRITICAL) - 3 rules
security-no-hardcoded-secrets- Never hardcode secrets in codesecurity-credentials- Use proper credential management (OIDC, Vault, IAM roles)security-iam-least-privilege- Follow least privilege principle
What ships with it
38 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- AGENTS.md 158 KB
- rules/language-data-sources.md 5.0 KB
- rules/language-dynamic-blocks.md 6.9 KB
- rules/language-linting.md 4.6 KB
- rules/language-locals.md 4.6 KB
- rules/language-no-heredoc-json.md 3.9 KB
- rules/module-composition.md 3.4 KB
- rules/module-naming.md 4.5 KB
- rules/module-registry.md 4.3 KB
- rules/module-single-responsibility.md 2.8 KB
- rules/module-versioning.md 2.2 KB
- rules/org-access-control.md 4.6 KB
- rules/org-audit-logging.md 5.5 KB
- rules/org-change-workflow.md 12 KB
- rules/org-version-control.md 3.1 KB
- rules/org-workspaces.md 3.5 KB
- rules/output-descriptions.md 3.3 KB
- rules/output-no-secrets.md 4.1 KB
- rules/perf-debug.md 4.9 KB
- rules/perf-parallelism.md 3.0 KB
- rules/provider-version-constraints.md 2.6 KB
- rules/resource-count-vs-foreach.md 2.5 KB
- rules/resource-immutable.md 5.6 KB
- rules/resource-lifecycle.md 6.9 KB
- rules/resource-naming.md 2.7 KB
- rules/resource-tagging.md 4.4 KB
- rules/security-credentials.md 5.0 KB
- rules/security-iam-least-privilege.md 2.6 KB
- rules/security-no-hardcoded-secrets.md 2.6 KB
- rules/state-import.md 4.5 KB
- rules/state-locking.md 1.4 KB
- rules/state-remote-backend.md 1.7 KB
- rules/test-policy-as-code.md 4.3 KB
- rules/test-strategies.md 13 KB
- rules/variable-descriptions.md 2.3 KB
- rules/variable-sensitive.md 3.2 KB
- rules/variable-types.md 3.5 KB
- rules/variable-validation.md 3.2 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 127 lines · 67 tokens per session scan A ac4bbe5fa92f
terraform-best-practices is a skill published in the GitHub repository terramate-io/agent-skills (35 stars, last pushed 9mo ago), licensed MIT. It adds 67 tokens to every session and 1,206 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
terraform-best-practices compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| terraform-best-practicesterramate-io/agent-skills | Skill | 35 | 9mo ago | MIT | A | 67 | Claude Code, Codex |
| terraform-iacchainlesschain/chainlesschain | Skill | 11 | yesterday | none | A | 41 | Claude Code |
| tf-plan-reviewcacheforge-ai/cacheforge-skills | Skill | 10 | 8mo ago | MIT | A | 51 | Claude Code, Codex |
| workers-best-practiceslouisbrulenaudet/monorepo-template | Skill | 19 | 5d ago | Apache-2.0 | A | 25 | Claude Code, Codex |
| istio-traffic-managementwshobson/agents | Skill | 42k | yesterday | MIT | A | 40 | Claude Code |
| go-testingGentleman-Programming/gentle-ai | Skill | 8.4k | yesterday | MIT | A | 26 | Claude Code, Codex |
| ultralytics-platformfcakyon/claude-codex-settings | Skill | 1.2k | yesterday | Apache-2.0 | A | 135 | Claude Code |