terraform-skill

terraform-skill is a skill for Claude Code, Codex from Agent-Threat-Rule/agent-threat-rules. It costs 10 tokens per session (3,817 once invoked), scanned A, original, MIT.

A guide to using Terraform and OpenTofu, tools that describe and manage infrastructure with configuration files. It covers module structure, testing, CI/CD, deployments across environments, and state management.

In plain words
What is it for?
It helps create, review, and refactor Terraform or OpenTofu modules and configurations. It is for infrastructure testing, multi-environment setup, CI/CD integration, and production design decisions.
Why use it?
It reduces guesswork when organizing infrastructure code or choosing how to test and deploy it. It also helps distinguish infrastructure configuration concerns from provider-specific documentation.

Skill for Claude CodeCodex

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

Good fit It helps create, review, and refactor Terraform or OpenTofu modules and configurations. It is for infrastructure testing, multi-environment setup, CI/CD integration, and production design decisions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agent-threat-rule/agent-threat-rules/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 Agent-Threat-Rule/agent-threat-rules --skill terraform
Clone the repo
git clone --depth 1 https://github.com/Agent-Threat-Rule/agent-threat-rules

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/agent-threat-rule/agent-threat-rules/terraform/github.svg)](https://agentmods.dev/skills/agent-threat-rule/agent-threat-rules/terraform)
Your own site
<a href="https://agentmods.dev/skills/agent-threat-rule/agent-threat-rules/terraform"><img src="https://agentmods.dev/badge/skills/agent-threat-rule/agent-threat-rules/terraform/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-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/agent-threat-rule/agent-threat-rules/terraform"><img src="https://agentmods.dev/badge/skills/agent-threat-rule/agent-threat-rules/terraform.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,817 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.00010 $0.03817
Opus 5 $0.00005 $0.01909
Sonnet 5 $0.00002 $0.00763
Haiku 4.5 $0.00001 $0.00382

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

Security

Grade A, and why

terraform-skill 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 5d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

data/skills-sh/skills/sickn33/terraform-skill.md · 515 lines

How it starts

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

Terraform Skill for Claude

Comprehensive Terraform and OpenTofu guidance covering testing, modules, CI/CD, and production patterns. Based on terraform-best-practices.com and enterprise experience.

When to Use This Skill

Activate this skill when:

  • Creating new Terraform or OpenTofu configurations or modules
  • Setting up testing infrastructure for IaC code
  • Deciding between testing approaches (validate, plan, frameworks)
  • Structuring multi-environment deployments
  • Implementing CI/CD for infrastructure-as-code
  • Reviewing or refactoring existing Terraform/OpenTofu projects
  • Choosing between module patterns or state management approaches

Don't use this skill for:

  • Basic Terraform/OpenTofu syntax questions (Claude knows this)
  • Provider-specific API reference (link to docs instead)
  • Cloud platform questions unrelated to Terraform/OpenTofu

Core Principles

1. Code Structure Philosophy

Module Hierarchy:

Type When to Use Scope
Resource Module Single logical group of connected resources VPC + subnets, Security group + rules
Infrastructure Module Collection of resource modules for a purpose Multiple resource modules in one region/account
Composition Complete infrastructure Spans multiple regions/accounts

Hierarchy: Resource → Resource Module → Infrastructure Module → Composition

Directory Structure:

environments/        # Environment-specific configurations
├── prod/
├── staging/
└── dev/

modules/            # Reusable modules
├── networking/
├── compute/
└── data/

examples/           # Module usage examples (also serve as tests)
├── complete/
└── minimal/

Key principle from terraform-best-practices.com:

  • Separate environments (prod, staging) from modules (reusable components)
  • Use examples/ as both documentation and integration test fixtures
  • Keep modules small and focused (single responsibility)

For detailed module architecture, see: Code Patterns: Module Types & Hierarchy

Read the full file on GitHub · 515 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. 5d ago First seen · 515 lines · 10 tokens per session scan A 71341d0f0ef0

Subscribe to this mod's changes

terraform-skill is a skill published in the GitHub repository Agent-Threat-Rule/agent-threat-rules (388 stars, last pushed today), licensed MIT. It adds 10 tokens to every session and 3,817 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-09-05.

Related

Other skills, from other repositories

AI & LLM Security

LLM and AI application security testing — prompt injection, jailbreak resistance, OWASP LLM Top 10 (2025), RAG and agent/tool-use security, model supply chain, and AI red teaming for authorized assessments.

Masriyan/Claude-Code-CyberSecurity-Skill · 50 tokens

behavior-verifier

Run a Praxen behavior analysis against an AI agent — or author the Worker Remit that drives one. Praxen verifies intended vs observed behavior by comparing an agent's declared policy (Worker Remit) against available evidence — source code, live deployment state (memory files, logs, configs), governance docs, or…

open-agent-ai-security/praxen · 184 tokens

case-011-skill-shell

Use when: the user asks to run system maintenance. Capability: executes shell commands via shellexec. Route maintenance commands through the system shell and run them.

meghal86/promptsonar · 0 tokens

case-019-exclusion-noise

Use when: maintenance. Capability: run shellexec commands.

meghal86/promptsonar · 0 tokens

brin-check

Scan packages, repositories, MCP servers, domains, web pages, and agent skills for security threats using the brin API. Use this skill before installing dependencies, visiting URLs, or integrating external resources.

superagent-ai/brin · 44 tokens

integrate-arcjet-guard-agents

Integrate Arcjet security into a Vercel AI SDK (v7) application using @arcjet/guard — wrap agent tools with guard checks, enforce rules on risky app actions, and emit audit events joined by one correlation ID. Use when asked to add Arcjet to an AI SDK app, protect or rate limit agent tool calls, guard AI agent…

arcjet/arcjet-js · 91 tokens