terraform-best-practices

terraform-best-practices is a skill for Claude Code, Codex from terramate-io/agent-skills. It costs 67 tokens per session (1,206 once invoked), scanned A, original, MIT.

Súbor odporúčaní pre písanie, kontrolu a úpravu Terraformu a OpenTofu, nástrojov na opis a správu cloudovej infraštruktúry pomocou kódu. Pokrýva organizáciu projektu, stav, bezpečnosť, moduly, poskytovateľov a výkon.

In plain words
What is it for?
Používa sa pri tvorbe a kontrole Terraform modulov, nastavovaní infraštruktúry v AWS, GCP alebo Azure, správe stavových súborov a refaktoringu konfigurácie.
Why use it?
Pomáha odhaliť vzory, ktoré môžu viesť k bezpečnostným problémom, ťažkej údržbe alebo nespoľahlivému spravovaniu infraštruktúry.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Používa sa pri tvorbe a kontrole Terraform modulov, nastavovaní infraštruktúry v AWS, GCP alebo Azure, správe stavových súborov a refaktoringu konfigurácie.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/terramate-io/agent-skills/terraform-best-practices
Install

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.

Any agent
npx skills add terramate-io/agent-skills --skill terraform-best-practices
Clone the repo
git clone --depth 1 https://github.com/terramate-io/agent-skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for terraform-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/terramate-io/agent-skills/terraform-best-practices/github.svg)](https://agentmods.dev/skills/terramate-io/agent-skills/terraform-best-practices)
Your own site
<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.

agentmods 80×15 button for terraform-best-practices

Your own site · 80×15
<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>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,206 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk pass 15 Feb 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.01206
Opus 5 $0.00034 $0.00603
Sonnet 5 $0.00013 $0.00241
Haiku 4.5 $0.00007 $0.00121

Measured 12d ago against content hash ac4bbe5fa92f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

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 12d 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.

skills/terraform-best-practices/SKILL.md · 127 lines

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 control
  • org-workspaces - One workspace per environment per configuration
  • org-access-control - Control who can change what infrastructure
  • org-change-workflow - Formal process for infrastructure changes
  • org-audit-logging - Track all infrastructure changes

2. State Management (CRITICAL) - 3 rules

  • state-remote-backend - Always use remote state backends
  • state-locking - Enable state locking to prevent corruption
  • state-import - Import existing infrastructure into Terraform

3. Security Best Practices (CRITICAL) - 3 rules

  • security-no-hardcoded-secrets - Never hardcode secrets in code
  • security-credentials - Use proper credential management (OIDC, Vault, IAM roles)
  • security-iam-least-privilege - Follow least privilege principle

Read the full file on GitHub · 127 lines

Files

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.

Changes

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.

  1. 12d ago First seen · 127 lines · 67 tokens per session scan A ac4bbe5fa92f

Subscribe to this mod's changes

terraform-best-practices is a skill published in the GitHub repository terramate-io/agent-skills (34 stars, last pushed 7mo ago), licensed MIT. It adds 67 tokens to every session and 1,206 once invoked, about $0.0003 per session on Opus 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.

Related

Other skills, from other repositories

review-configuration

Config, env, wrangler review. USE WHEN: user runs /review-configuration or explicitly asks for this review. DO NOT USE WHEN: implementing features or fixing bugs unless the user asked for a review.

louisbrulenaudet/monorepo-template · 46 tokens

terraform-iac

Terraform and OpenTofu infrastructure as code best practices - generate HCL configurations, module patterns, state management, CI/CD workflows, and cloud provider templates for AWS, GCP, Azure.

chainlesschain/chainlesschain · 41 tokens

tf-plan-review

Analyze Terraform plans for risk before you apply. Classifies every change as safe, moderate, dangerous, or critical. Detects destroys, IAM changes, data-loss risks, and blast radius. Entirely read-only — never runs apply.

cacheforge-ai/cacheforge-skills · 51 tokens

workers-best-practices

Reviews and authors Cloudflare Workers code against production best practices. Load when writing new Workers, reviewing Worker code, configuring wrangler.jsonc, or checking for common Workers anti-patterns (streaming, floating promises, global state, secrets, bindings, observability). Biases towards retrieval from…

louisbrulenaudet/monorepo-template · 72 tokens

cost-optimization

Optimize cloud costs across AWS, Azure, GCP, and OCI through resource rightsizing, tagging strategies, reserved instances, and spending analysis. Use when reducing cloud expenses, analyzing infrastructure costs, or implementing cost governance policies.

wshobson/agents · 48 tokens

istio-traffic-management

Configure Istio traffic management including routing, load balancing, circuit breakers, and canary deployments. Use when implementing service mesh traffic policies, progressive delivery, or resilience patterns.

wshobson/agents · 40 tokens