terraform

terraform is a command for Claude Code from d-padmanabhan/agent-engineering-handbook. It costs 13 tokens per session (398 once invoked), scanned A, original, MIT.

A command for creating, changing, or reviewing Terraform configuration. Terraform is a tool for describing and managing cloud and other infrastructure with code.

In plain words
What is it for?
It helps create Terraform modules, modify existing .tf files, and review them for correctness and security. It covers naming, inputs, outputs, validation, and module structure.
Why use it?
It provides project rules for keeping infrastructure changes small, consistent, and safer. It also warns against committing secrets, state files, or generated plan files.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Good fit It helps create Terraform modules, modify existing .tf files, and review them for correctness and security. It covers naming, inputs, outputs, validation, and module structure.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/d-padmanabhan/agent-engineering-handbook/terraform
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.

Clone the repo
git clone --depth 1 https://github.com/d-padmanabhan/agent-engineering-handbook

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/d-padmanabhan/agent-engineering-handbook/terraform.svg)](https://agentmods.dev/commands/d-padmanabhan/agent-engineering-handbook/terraform)
Your own site
<a href="https://agentmods.dev/commands/d-padmanabhan/agent-engineering-handbook/terraform"><img src="https://agentmods.dev/badge/commands/d-padmanabhan/agent-engineering-handbook/terraform.svg" alt="Measured on agentmods" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 398 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.00013 $0.00398
Opus 5 $0.00006 $0.00199
Sonnet 5 $0.00003 $0.00080
Haiku 4.5 $0.00001 $0.00040

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

Security

Grade A, and why

terraform 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 8d 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.

commands/terraform.md · 64 lines

What it actually says

TERRAFORM MODE ACTIVATED

You are now in TERRAFORM MODE. Any work on Terraform MUST follow:

  • rules/180-terraform.mdc (module structure, validation, security)
  • rules/100-core.mdc (minimal, maintainable changes)
  • rules/310-security.mdc (no secrets, least privilege)

Use this command when the user asks to:

  • Create a new Terraform module
  • Modify existing .tf code
  • Review Terraform for correctness/security

Guardrails (mandatory)

  • Use snake_case for variables/outputs/resources.
  • Prefer modules and clear inputs/outputs; avoid hardcoding.
  • Never commit state files, plan artifacts, or secrets.
  • Keep changes minimal and scoped.

Step 0: Determine intent (create vs modify vs review)

Infer intent from the user’s request. If ambiguous, ask ≤3 clarifying questions (target provider, environment, module boundaries).

Create

Produce module-shaped output:

  • main.tf, variables.tf, outputs.tf, README.md (+ examples/ when appropriate)
  • Include validation blocks for inputs where helpful

Modify

  • Prefer minimal diffs
  • Preserve module interface unless explicitly asked to change it

Review

Prioritize:

  • Critical: secrets in variables, overly-permissive IAM, public access exposure, missing encryption, unsafe defaults
  • Recommended: missing validation/docs, inconsistent naming, missing tags/labels
  • Optional: style and readability

Verification (as applicable):

terraform fmt -check -recursive
terraform validate
pre-commit run --all-files

Done condition

End with:

  • Files changed (or “no changes made”)
  • How to validate (fmt/validate/lint) and expected behavior
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. 8d ago First seen · 64 lines · 13 tokens per session scan A bd279836d2bc

Subscribe to this mod's changes

terraform is a command published in the GitHub repository d-padmanabhan/agent-engineering-handbook (16 stars, last pushed yesterday), licensed MIT. It adds 13 tokens to every session and 398 once invoked, about $0.0001 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.