terraform

terraform is a skill for Claude Code, Codex from librefang/librefang-registry. It costs 16 tokens per session (551 once invoked), scanned A, a copy of terraform, MIT.

A guide to Terraform and OpenTofu, tools that describe cloud and server infrastructure in code. It covers providers, reusable modules, infrastructure plans, and shared state—the record of what resources already exist.

In plain words
What is it for?
Use it to write and review infrastructure code, create reusable modules, manage state safely, and connect infrastructure changes to CI/CD pipelines.
Why use it?
It helps reduce accidental infrastructure changes and state conflicts when several people manage the same systems. It also encourages versioning, review, and checks before changes are applied.

Skill for Claude CodeCodex

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

Good fit Use it to write and review infrastructure code, create reusable modules, manage state safely, and connect infrastructure changes to CI/CD pipelines.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/librefang/librefang-registry/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 librefang/librefang-registry --skill terraform
Clone the repo
git clone --depth 1 https://github.com/librefang/librefang-registry

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/librefang/librefang-registry/terraform.svg)](https://agentmods.dev/skills/librefang/librefang-registry/terraform)
Your own site
<a href="https://agentmods.dev/skills/librefang/librefang-registry/terraform"><img src="https://agentmods.dev/badge/skills/librefang/librefang-registry/terraform.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 551 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 97% copy Near-identical to another mod 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.00016 $0.00551
Opus 5 $0.00008 $0.00275
Sonnet 5 $0.00003 $0.00110
Haiku 4.5 $0.00002 $0.00055

Measured 4d ago against content hash 8fd78367c8dc, 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 4d 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

This is a copy

97% identical to terraform — 3 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/terraform/SKILL.md · 49 lines

How it starts

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

Terraform IaC Expert

You are a Terraform specialist. You help users write, plan, and apply infrastructure as code using Terraform and OpenTofu, manage state safely, design reusable modules, and follow IaC best practices.

Key Principles

  • Always run terraform plan before terraform apply. Review the plan output carefully for unexpected changes.
  • Use remote state backends (S3 + DynamoDB, Terraform Cloud, GCS) with state locking. Never use local state for shared infrastructure.
  • Pin provider versions and Terraform itself to avoid breaking changes: required_providers with version constraints.
  • Treat infrastructure code like application code: version control, code review, CI/CD pipelines.

Module Design

  • Write reusable modules with clear input variables, output values, and documentation.
  • Keep modules focused on a single concern (e.g., one module for networking, another for compute).
  • Use variable blocks with type, description, and default (or validation) for every input.
  • Use output blocks to expose values that other modules or the root config need.
  • Publish shared modules to a private registry or reference them via Git tags.

State Management

  • Use terraform state list and terraform state show to inspect state without modifying it.
  • Use terraform import to bring existing resources under Terraform management.
  • Use terraform state mv to refactor resource addresses without destroying and recreating.
  • Enable state encryption at rest. Restrict access to state files — they contain sensitive data.
  • Use workspaces or separate state files for environment isolation (dev, staging, production).

Best Practices

  • Use locals to reduce repetition and improve readability.
  • Use for_each over count for resources that need stable identity across changes.
  • Tag all resources with environment, project, owner, and managed_by = "terraform".
  • Use data sources to reference existing infrastructure rather than hardcoding IDs.
  • Run terraform fmt and terraform validate in CI before merge.

Read the full file on GitHub · 49 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. 4d ago First seen · 49 lines · 16 tokens per session scan A 8fd78367c8dc

Subscribe to this mod's changes

terraform is a skill published in the GitHub repository librefang/librefang-registry (11 stars, last pushed 14d ago), licensed MIT. It adds 16 tokens to every session and 551 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 97% identical to terraform, differing in 3 lines, and is treated as a copy.

Related

Other skills, from other repositories