terraform-iac

terraform-iac is a skill for Claude Code from camilooscargbaptista/cto-toolkit. It costs 121 tokens per session (1,311 once invoked), scanned A, original, MIT.

A set of instructions for writing, reviewing, and organizing Terraform files. Terraform is a tool that describes cloud and other infrastructure in configuration files so it can be managed as code.

In plain words
What is it for?
Use it when working with Terraform, infrastructure as code, .tf files, HCL, modules, state, or terraform plan output.
Why use it?
It provides a consistent way to handle infrastructure structure, reusable modules, state, security, and maintainability.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the cto-toolkit plugin — 54 skills, 6 agents, 3 hooks shipped together

Good fit Use it when working with Terraform, infrastructure as code, .tf files, HCL, modules, state, or terraform plan output.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/camilooscargbaptista/cto-toolkit/terraform-iac
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 camilooscargbaptista/cto-toolkit --skill terraform-iac
Clone the repo
git clone --depth 1 https://github.com/camilooscargbaptista/cto-toolkit

Made for: Claude Code.

Or install cto-toolkit, the plugin that ships this one along with the rest of its 54 skills, 6 agents, 3 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/terraform-iac/github.svg)](https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/terraform-iac)
Your own site
<a href="https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/terraform-iac"><img src="https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/terraform-iac/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-iac

Your own site · 80×15
<a href="https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/terraform-iac"><img src="https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/terraform-iac.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 121 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,311 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.
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.00121 $0.01311
Opus 5 $0.00060 $0.00656
Sonnet 5 $0.00024 $0.00262
Haiku 4.5 $0.00012 $0.00131

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

Security

Grade A, and why

terraform-iac 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 10d 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.

terraform-iac/SKILL.md · 140 lines

How it starts

The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Terraform & Infrastructure as Code

You are a senior platform engineer helping design, write, and review Terraform configurations. Focus on modularity, security, and maintainability — infrastructure code is as important as application code.

Project Structure

Standard Layout

infrastructure/
├── modules/                    # Reusable modules
│   ├── networking/
│   │   ├── main.tf
│   │   ├── variables.tf
│   │   ├── outputs.tf
│   │   └── README.md
│   ├── database/
│   ├── compute/
│   └── monitoring/
├── environments/               # Environment-specific configs
│   ├── production/
│   │   ├── main.tf
│   │   ├── terraform.tfvars
│   │   ├── backend.tf
│   │   └── provider.tf
│   ├── staging/
│   └── dev/
├── global/                     # Shared resources (IAM, DNS, etc.)
│   ├── iam/
│   └── dns/
└── scripts/                    # Helper scripts

File Conventions

File Purpose
main.tf Primary resource definitions
variables.tf Input variables with descriptions and validation
outputs.tf Module outputs
locals.tf Local values and computed expressions
provider.tf Provider configuration and version constraints
backend.tf State backend configuration
data.tf Data sources (existing resources, SSM params, etc.)

Module Best Practices

  • One logical concern per module (networking, database, compute — not everything)
  • Never hardcode values — use variables with sensible defaults
  • Always include descriptions on variables and outputs
  • Add validation blocks for input constraints
  • Use locals for computed values and repeated expressions
  • Pin provider versions in the module
  • Include a README with usage examples

For detailed examples of module interfaces, naming conventions, and patterns like conditional resources and for_each, see references/module-examples.md.

State Management

Remote State Concept

Terraform state is a database of all managed resources. Without remote state, teams overwrite each other's work and lose history. Remote state enables:

Read the full file on GitHub · 140 lines

Files

What ships with it

3 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. 10d ago First seen · 140 lines · 121 tokens per session scan A 76f7cace28c6

Subscribe to this mod's changes

terraform-iac is a skill published in the GitHub repository camilooscargbaptista/cto-toolkit (7 stars, last pushed 5mo ago), licensed MIT. It adds 121 tokens to every session and 1,311 once invoked, about $0.0006 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-31.