terraform-modules

terraform-modules is a skill for Claude Code from arjunprabhulal/devops-skills. It costs 109 tokens per session (1,321 once invoked), scanned A, original, MIT.

A Terraform module design guide for building reusable infrastructure configurations with clear inputs and outputs. Terraform modules package infrastructure code so it can be reused without exposing every internal detail.

In plain words
What is it for?
Use it when deciding what belongs in a module, designing variables and outputs, pinning versions, and judging whether an abstraction is ready.
Why use it?
It helps prevent copy-pasted configurations and abstractions that hide assumptions or add complexity without being useful.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the devops-skills plugin — 56 skills shipped together

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.

agentmods
npx agentmods add skills/arjunprabhulal/devops-skills/terraform-modules
Any agent
npx skills add arjunprabhulal/devops-skills --skill terraform-modules
Clone the repo
git clone --depth 1 https://github.com/arjunprabhulal/devops-skills

Made for: Claude Code.

Or install devops-skills, the plugin that ships this one along with the rest of its 56 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/arjunprabhulal/devops-skills/terraform-modules.svg)](https://agentmods.dev/skills/arjunprabhulal/devops-skills/terraform-modules)
Your own site
<a href="https://agentmods.dev/skills/arjunprabhulal/devops-skills/terraform-modules"><img src="https://agentmods.dev/badge/skills/arjunprabhulal/devops-skills/terraform-modules.svg" alt="Measured on agentmods" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,321 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00109 $0.01321
Opus 5 $0.00055 $0.00660
Sonnet 5 $0.00022 $0.00264
Haiku 4.5 $0.00011 $0.00132

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

Security

Grade A, and why

terraform-modules 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.

skills/iac/terraform-modules/SKILL.md · 118 lines

How it starts

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

Terraform Modules

A module is a promise: call it with these inputs and it gives you these outputs, and you never need to read its internals to trust it. That promise only holds if the interface is deliberately designed, not just whatever variables happened to exist when the code was extracted from a working root module.

The failure mode isn't usually too few modules — it's modules built too early, from a single use case, whose interface is a guess dressed up as an abstraction.

A module's job is to hide detail behind an interface, not to hide detail behind a maze.

1. Wait for the third repetition before you extract

The first time you write a VPC config, it's a root module. The second time, resist the urge — you don't yet know which parts vary and which are load-bearing constants. By the third real call site, the variance is visible: you know what actually needs to be a parameter versus what was just an artifact of one environment's choices.

  • Extracting from one example bakes in that example's assumptions as if they were general requirements.
  • Extracting from three exposes the real interface — the inputs that differ are the ones that need to be variables; everything else can be a sane default or hardcoded.

Done when: the module's variable list was derived from comparing multiple real call sites, not authored speculatively for cases that don't exist yet.

2. Design the interface like a public API, not an implementation detail

Every variable and output is a contract with every future caller. A module with forty required variables and no defaults isn't flexible — it's a burden that guarantees every caller gets it slightly wrong.

variable "environment" {
  type        = string
  description = "Deployment environment: dev, staging, or prod."
  validation {
    condition     = contains(["dev", "staging", "prod"], var.environment)
    error_message = "environment must be dev, staging, or prod."
  }
}
  • Give every variable a description and, where possible, a sane default — required inputs should be the genuinely essential ones, not everything the resource block happens to expose.
  • Validate inputs at the module boundary rather than letting a bad value surface as a cryptic provider error three resources deep.
  • Expose outputs callers actually need, not every attribute of every internal resource — a wide output surface leaks implementation and makes refactors breaking changes.

Read the full file on GitHub · 118 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 · 118 lines · 109 tokens per session scan A 51139f40df3e

Subscribe to this mod's changes

terraform-modules is a skill published in the GitHub repository arjunprabhulal/devops-skills (3 stars, last pushed 11d ago), licensed MIT. It adds 109 tokens to every session and 1,321 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

google-cloud-solution-guided-gke-ai-migration

Guides the migration of existing AI workloads (Cloud Run, Gemini API, Gemini Enterprise Agent Platform) to self-hosted GKE inference using gcloud and kubectl. Use when the user has an existing AI inference workload (on Cloud Run, the Gemini API, Gemini Enterprise Agent Platform, or a custom VM) and wants to move it to…

google/skills · 157 tokens

agent-platform-tuning

Agent Platform Model Tuning. Use when you need to fine-tune open models or Gemini models using Agent Platform infrastructure. Don't use for model training outside Agent Platform, model deployment to endpoints (use agent-platform-deploy), or managing serving endpoints (use agent-platform-endpoint-management).

google/skills · 64 tokens

agent-platform-deploy

Deploy open models or custom weights from Model Garden to Agent Platform endpoints, check the status of an in-progress deployment operation, or clean up resources by undeploying models and deleting endpoints. Use when asked to actively deploy a model, list the Model Garden CATALOG of available models, check if a…

google/skills · 193 tokens

application-design-center-design-deploy

Processes GCP infrastructure design and deployment workflows within Application Design Center (ADC). Use when: - Designing GCP infrastructure with Terraform. - Validating local HCL. - Performing best-practice plan scans. - Importing templates to Application Design Center (ADC). - Deploying templates. - Troubleshooting…

google/skills · 94 tokens

cloud-logging-cross-project-configuration

Configure and troubleshoot Google Cloud cross-project centralized logging and read-time aggregation. Use when: - Setting up log routing from multiple projects/folders/organizations to a central log bucket. - Creating cross-project log sinks and configuring central log buckets. - Troubleshooting cross-project routing.…

google/skills · 70 tokens

gke-alert-configuration

Configures alerting policies in Terraform for Google Kubernetes Engine (GKE) clusters, workloads, and services using PromQL and Google Cloud Managed Service for Prometheus. Use when writing, analyzing, validating, or deploying Terraform alerting policies to monitor GKE service latency, traffic, error rates using…

google/skills · 120 tokens