terraform

terraform is a skill for Claude Code, Codex from SumonMSelim/agentguard. It costs 26 tokens per session (1,068 once invoked), scanned A, original, MIT.

A guide to writing and reviewing Terraform code. Terraform is a tool that describes cloud and other infrastructure in files so it can be managed consistently.

In plain words
What is it for?
Use it when creating or reviewing Terraform state storage, providers, modules, cloud resources, security settings, plans, and tests.
Why use it?
It helps protect infrastructure state and secrets, limit permissions, test changes, and avoid accidental destruction during deployments.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating or reviewing Terraform state storage, providers, modules, cloud resources, security settings, plans, and tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sumonmselim/agentguard/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.

Any agent
npx skills add SumonMSelim/agentguard --skill terraform
Clone the repo
git clone --depth 1 https://github.com/SumonMSelim/agentguard

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/sumonmselim/agentguard/terraform.svg)](https://agentmods.dev/skills/sumonmselim/agentguard/terraform)
Your own site
<a href="https://agentmods.dev/skills/sumonmselim/agentguard/terraform"><img src="https://agentmods.dev/badge/skills/sumonmselim/agentguard/terraform.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,068 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.00026 $0.01068
Opus 5 $0.00013 $0.00534
Sonnet 5 $0.00005 $0.00214
Haiku 4.5 $0.00003 $0.00107

Measured 7d ago against content hash 1ac087977e2d, 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 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.

skills/terraform/SKILL.md · 73 lines

How it starts

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

Terraform

State

  • Remote state always. Local state for throwaway experiments only
  • State backend with locking: S3 + DynamoDB, GCS, or Terraform Cloud/HCP
  • Separate state files per environment (dev, staging, prod). Never share state across envs
  • Encrypt state at rest. Versioning on state bucket enables rollback — never delete old versions without confirming they are not needed
  • Never commit .tfstate or .tfstate.backup to git. Add to .gitignore
  • sensitive = true on all outputs containing secrets, tokens, or credentials. Limits plaintext exposure in logs and state diffs

Security

  • Least privilege for the Terraform runner. Scope to exactly what it creates
  • OIDC / Workload Identity for CI runners. No long-lived access keys
  • Secrets never in .tf files or terraform.tfvars committed to git. Pass via TF_VAR_* env vars, Vault, or secret manager at plan/apply time
  • prevent_destroy = true on critical resources (databases, buckets, KMS keys)
  • plan before every apply. Review the diff. Never auto-apply to production without human approval
  • Pin provider versions with pessimistic constraints: ~> 5.0 locks to 5.x not 6.x. Full pins for production stability
  • required_version in every root module. Prevents silent version drift across team members

Workflow

  • CI pattern: plan on PR (post as comment), apply on merge to main. Never apply from developer laptops in production
  • GitOps orchestration: Atlantis (self-hosted, PR-driven), Spacelift or env0 for team workflows, audit trails, and drift detection
  • terraform fmt -recursive and terraform validate in CI. Fail on violations
  • tflint for provider-specific lint. checkov or tfsec for security misconfigurations. Both in CI pre-apply
  • Infracost in CI to surface cost delta per PR before apply
  • Drift detection: scheduled plan runs that alert on non-empty diffs
  • terraform-docs to auto-generate module README from variables and outputs. Enforce via CI check
  • tfenv for CLI version management. Commit .terraform-version to repo

Read the full file on GitHub · 73 lines

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. 7d ago First seen · 73 lines · 0 tokens per session scan A 1ac087977e2d

Subscribe to this mod's changes

terraform is a skill published in the GitHub repository SumonMSelim/agentguard (56 stars, last pushed 1mo ago), licensed MIT. It adds 26 tokens to every session and 1,068 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.

Related

Other skills, from other repositories

tcapi

A helper for managing Tencent Cloud resources through Tencent Cloud's command-line API tool. Tencent Cloud is a cloud-services provider offering products such as virtual servers, storage, networks, and containers.

TencentCloud/Octop · 68 tokens

limrun-xcode

Build an iOS / Apple app on remote Xcode with lim xcode build instead of local xcodebuild, or run its XCTest suites with lim xcode test, from any environment (Linux, Windows, macOS, VM, container). Use for non-Bazel projects (an .xcodeproj / .xcworkspace, an XcodeGen project.yml with a gitignored project, React Native…

sutchan/Agent-Skills-Hub · 159 tokens

limrun-xcode-bazel

Build a Bazel-based iOS / macOS / Apple app on Limrun's remote build execution (RBE) instead of a local Mac, and install it on a remote iOS simulator. Use when the project is a Bazel workspace (MODULE.bazel / WORKSPACE) building rulesapple / rulesswift targets and the user wants to bazel build it or run it on a…

sutchan/Agent-Skills-Hub · 149 tokens

metago-deploy-engineer

Deployment Engineer - specializes in private/cloud/edge deployments, Helm charts, canary releases, and rollback.

metago-ai/metagolifeform · 27 tokens

metago-ops-engineer

Operations Engineer - specializes in DNS, SSL, reverse proxy, production environment, and CI/CD pipeline configuration.

metago-ai/metagolifeform · 27 tokens

metago-sre-engineer

SRE Engineer - specializes in high availability, backup, disaster recovery, chaos engineering, SLO definition, and runbook generation.

metago-ai/metagolifeform · 32 tokens