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 tmj-90/gaffer --skill terraform-patternsgit clone --depth 1 https://github.com/tmj-90/gafferWrote 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/tmj-90/gaffer/terraform-patterns)<a href="https://agentmods.dev/skills/tmj-90/gaffer/terraform-patterns"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/terraform-patterns/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/tmj-90/gaffer/terraform-patterns"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/terraform-patterns.svg" alt="Reviewed on agentmods" width="80" 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.00067 | $0.01469 |
| Opus 5.5 | $0.00027 | $0.00588 |
| Sonnet 5.5 | $0.00013 | $0.00294 |
| Haiku 4.5 | $0.00007 | $0.00147 |
Grade A, and why
terraform-patterns 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 1mo 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 — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Write predictable, secure Terraform
Terraform changes real infrastructure, and its state file is a shared, lock-protected
database that also holds secrets in plaintext. Follow HashiCorp's style guide and module
guidance; verify with fmt and validate (the factory's safety hook refuses
terraform test in an agent session, so it runs in CI or by a human); never apply from
an agent session.
Layout (HashiCorp style guide)
terraform.tf # terraform { required_version, required_providers }
providers.tf # provider blocks — ROOT modules only
backend.tf # backend config — root only
main.tf # resources and data sources (split by concern when large: network.tf …)
variables.tf # alphabetical; type, description, default?, sensitive?, validation
outputs.tf # alphabetical; description, value, sensitive?
locals.tf
modules/<name>/ # local child modules, same layout minus providers/backend
Names are descriptive snake_case nouns without the type (aws_instance.web_api, not
aws_instance.web-api-instance).
Procedure
- Read what exists.
search_lorefor backend, naming, tagging and module conventions. Read the root modules,.terraform.lock.hcl, CI jobs and any policy (tflint, checkov, trivy config). Extend the existing module style. - Design the module interface. One module = one coherent concern. Every variable has
typeanddescription; optional ones have a sensibledefault; secrets setsensitive = true;validationblocks only for real invariants. Outputs are the minimum callers need, each with adescription. Child modules declarerequired_providerswith a minimum version (>=) and never containproviderblocks; the root pins providers (~>or exact) and commits.terraform.lock.hcl. - Write resources safely.
for_eachkeyed by stable names for collections of distinct things;countonly for on/off. Index-shiftingcountlists destroy and recreate resources.- Stateful resources (databases, buckets, KMS keys) get
lifecycle { prevent_destroy = true }. - Refactors use
movedblocks (andremoved/importblocks) instead of manualterraform state mv, so the plan shows no destroy. - Least-privilege IAM (no
"*"actions or resources without a written reason), encryption at rest and in transit, no public buckets, no0.0.0.0/0on admin ports. - Tags via provider
default_tagswhere supported: environment, owner, managed-by.
- State and locking. Remote backend with locking and encryption; for S3 use
use_lockfile = true(Terraform ≥ 1.11; DynamoDB locking is deprecated). Separate state per environment (directory or workspace), and restrict who can read state —sensitivehides values in plan output, not in state. Share data across states with data sources orterraform_remote_stateoutputs, not whole-state access. - Respect the lock. Never pass
-lock=false. Neverterraform force-unlockunless you have proven the holder process is gone (not merely slow or paused) — breaking a live holder's lock is the concurrent-writer bug that lost acknowledged writes in live runs, and here it corrupts state. Use-lock-timeout=5min CI instead. - Credentials. From the environment or OIDC/dynamic credentials — never in
.tf,.tfvarscommitted to git, or provider blocks. - CI. On PR:
fmt -check,validate,terraform test, security scan, andplanposted for review. Apply only from the protected default branch, one run per state at a time. - Verify (below), evidence each acceptance criterion with the
record-evidenceskill, then stop. Do not runplan,applyordestroy: they reach the cloud with whatever ambient credentials the host holds (~/.aws, gcloud). If an AC needs a real plan, state in evidence that a human must run it, ormark_ticket_blocked.
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.
- 1mo ago Changed · +5 lines fe11985b84b4
- 2mo ago Changed · +36 lines ae0e9ba14549
- 2mo ago First seen · 63 lines · 67 tokens per session scan A 589cad757a18
terraform-patterns is a skill published in the GitHub repository tmj-90/gaffer (1 stars, last pushed yesterday), licensed Apache-2.0. It adds 67 tokens to every session and 1,469 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-09-03.
terraform-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| terraform-patternstmj-90/gaffer | Skill | 1 | yesterday | Apache-2.0 | A | 67 | Claude Code, Codex |
| bulwark-brainstormQBall-Inc/the-bulwark | Skill | 9 | yesterday | MIT | A | 50 | Claude Code |
| plan-creationQBall-Inc/the-bulwark | Skill | 9 | yesterday | MIT | A | 38 | Claude Code |
| test-auditQBall-Inc/the-bulwark | Skill | 9 | yesterday | MIT | A | 0 | Claude Code |
| anthropic-validatorQBall-Inc/the-bulwark | Skill | 9 | yesterday | MIT | A | 40 | Claude Code |
| code-reviewQBall-Inc/the-bulwark | Skill | 9 | yesterday | MIT | A | 61 | Claude Code |
| create-subagentQBall-Inc/the-bulwark | Skill | 9 | yesterday | MIT | A | 42 | Claude Code |