Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/d-padmanabhan/agent-engineering-handbooknpx agentmods add rules/d-padmanabhan/agent-engineering-handbook/180-terraformWrote 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/rules/d-padmanabhan/agent-engineering-handbook/180-terraform)<a href="https://agentmods.dev/rules/d-padmanabhan/agent-engineering-handbook/180-terraform"><img src="https://agentmods.dev/badge/rules/d-padmanabhan/agent-engineering-handbook/180-terraform.svg" alt="Measured on agentmods" height="20"></a>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.00016 | $0.10049 |
| Opus 5 | $0.00008 | $0.05025 |
| Sonnet 5 | $0.00003 | $0.02010 |
| Haiku 4.5 | $0.00002 | $0.01005 |
Grade A, and why
180-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 7d 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 — 1,683 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Terraform Engineering Ruleset - (December 2025)
Audience: engineers writing and reviewing Terraform infrastructure as code Goal: secure-by-default, efficient, modular, and highly maintainable Terraform - without over-engineering
Terraform Philosophy (Core Principles)
Core Principles:
- "Infrastructure as Code, not Infrastructure as Config" - Terraform is code; treat it with same rigor as application code
- "State is the source of truth" - Protect state, version it, back it up, lock it
- "Idempotency is non-negotiable" - Same input should produce same output, safe to run multiple times
- "Modules over copy-paste" - Reusable, composable modules reduce errors and maintenance
- "Validate early, fail fast" - Use validations, preconditions, postconditions to catch errors early
- "Security by default" - Least privilege IAM, encryption everywhere, no secrets in code
- "Explicit over implicit" - Clear dependencies, explicit providers, documented assumptions
- "Plan before apply" - Always review plan output, use saved plans in CI/CD
Applying Terraform Principles:
# BAD: Implicit, insecure, fragile
resource "aws_instance" "web" {
ami = "ami-12345"
instance_type = "t2.micro"
}
# GOOD: Explicit, secure, validated
variable "environment" {
type = string
description = "Deployment environment"
validation {
condition = contains(["dev", "staging", "prod"], var.environment)
error_message = "Environment must be dev, staging, or prod."
}
}
resource "aws_instance" "web" {
ami = data.aws_ami.ubuntu.id
instance_type = var.instance_type
vpc_security_group_ids = [aws_security_group.web.id]
subnet_id = aws_subnet.public["az-a"].id
tags = merge(
local.common_tags,
{
Name = "${var.app}-${var.environment}-web"
}
)
lifecycle {
create_before_destroy = true
prevent_destroy = var.environment == "prod"
}
}
Quick Reference
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.
- 7d ago First seen · 1,683 lines · 16 tokens per session scan A f05de8db2e3e
180-terraform is a cursor rule published in the GitHub repository d-padmanabhan/agent-engineering-handbook (16 stars, last pushed 8d ago), licensed MIT. It adds 16 tokens to every session and 10,049 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.
Other cursor rules, from other repositories
agents-shipgate
Run Agents Shipgate as the deterministic merge gate for AI-generated agent capability changes.
beanstalk-deploy
Robust deployment patterns for Elastic Beanstalk with GitHub Actions, Pulumi, and edge case handling.
workflow-ci
Testing and verification workflow expectations.
agents
Agent engineering standards — Agents (TR-SEC-003).
infra-devops
Infrastructure, Cloud, Terraform, Docker & CI/CD Agent.
n-ci_artifact
A rule for consuming CI artifacts declared by a language plugin. CI, or continuous integration, automatically checks changes; these artifacts are files or patches that the CI system materialises and verifies.