terraform-module

terraform-module is a skill for Claude Code from timwukp/agent-skills-best-practice. It costs 72 tokens per session (1,886 once invoked), scanned A, original, MIT.

A guide for creating reusable Terraform modules for AWS infrastructure, with resource definitions, inputs, outputs, version rules, and documentation.

In plain words
What is it for?
Building modules for services such as networks, containers, serverless functions, databases, and storage, while documenting their settings and connections.
Why use it?
It helps organise infrastructure-as-code so the same AWS setup can be configured consistently across environments and projects.

Skill for Claude Code

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

Part of the engineering-skills plugin — 18 skills shipped together

Good fit Building modules for services such as networks, containers, serverless functions, databases, and storage, while documenting their settings and connections.

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

Made for: Claude Code.

Or install engineering-skills, the plugin that ships this one along with the rest of its 18 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-module

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/timwukp/agent-skills-best-practice/terraform-module"><img src="https://agentmods.dev/badge/skills/timwukp/agent-skills-best-practice/terraform-module.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,886 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00072 $0.01886
Opus 5 $0.00036 $0.00943
Sonnet 5 $0.00014 $0.00377
Haiku 4.5 $0.00007 $0.00189

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

Security

Grade A, and why

terraform-module 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 10d 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/skills/terraform-module/SKILL.md · 290 lines

How it starts

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

Terraform Module

Instructions

Step 1: Gather Requirements

Ask:

  1. What AWS resources are needed? (VPC, ECS, Lambda, RDS, S3, CloudFront)
  2. What environment? (dev, staging, production, or multi-environment)
  3. What compliance requirements? (encryption at rest, VPC isolation, logging)
  4. Existing infrastructure to integrate with? (VPC ID, subnets, security groups)
  5. State backend? (S3+DynamoDB, Terraform Cloud, local)

Step 2: Module Structure

Create the standard module layout:

modules/
  my-service/
    main.tf          # Primary resource definitions
    variables.tf     # Input variable declarations
    outputs.tf       # Output value declarations
    versions.tf      # Provider and terraform version constraints
    locals.tf        # Local values and computed expressions
    data.tf          # Data sources
    README.md        # Module documentation

versions.tf (always include):

terraform {
  required_version = ">= 1.5"

  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 5.0"
    }
  }
}

Step 3: Variable Definitions

Define variables with descriptions, types, and validation:

variable "environment" {
  description = "Deployment environment (dev, staging, production)"
  type        = string

  validation {
    condition     = contains(["dev", "staging", "production"], var.environment)
    error_message = "Environment must be dev, staging, or production."
  }
}

variable "service_name" {
  description = "Name of the service, used for resource naming and tagging"
  type        = string

  validation {
    condition     = can(regex("^[a-z][a-z0-9-]{2,28}$", var.service_name))
    error_message = "Service name must be lowercase, start with a letter, 3-29 chars."
  }
}

variable "vpc_config" {
  description = "VPC configuration for the service"
  type = object({
    vpc_id             = string
    private_subnet_ids = list(string)
    public_subnet_ids  = list(string)
  })
}

variable "tags" {
  description = "Additional tags to apply to all resources"
  type        = map(string)
  default     = {}
}

Read the full file on GitHub · 290 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 10d ago First seen · 290 lines · 72 tokens per session scan A b2a49619c7a6

Subscribe to this mod's changes

terraform-module is a skill published in the GitHub repository timwukp/agent-skills-best-practice (10 stars, last pushed 2d ago), licensed MIT. It adds 72 tokens to every session and 1,886 once invoked, about $0.0004 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

ec2

AWS EC2 virtual machine management — instances, security groups, key pairs, AMIs, EBS volumes, Auto Scaling Groups, Spot Instances, Session Manager, placement groups, and instance lifecycle automation. Trigger on ANY of these, even when EC2 isn't named explicitly: - Launching or provisioning: "spin up a server"…

itsmostafa/aws-agent-skills · 320 tokens

cloudformation

AWS CloudFormation infrastructure as code for stack management. Use when writing templates, deploying stacks, managing drift, troubleshooting deployments, or organizing infrastructure with nested stacks.

itsmostafa/aws-agent-skills · 34 tokens

cloudwatch

AWS CloudWatch monitoring for logs, metrics, alarms, and dashboards. Use when setting up monitoring, creating alarms, querying logs with Insights, configuring metric filters, building dashboards, or troubleshooting application issues.

itsmostafa/aws-agent-skills · 43 tokens

ecs

AWS ECS container orchestration for running Docker containers. Use when deploying containerized applications, configuring task definitions, setting up services, managing clusters, or troubleshooting container issues.

itsmostafa/aws-agent-skills · 35 tokens

eks

AWS EKS Kubernetes management for clusters, node groups, and workloads. Use when creating clusters, configuring IRSA, managing node groups, deploying applications, or integrating with AWS services.

itsmostafa/aws-agent-skills · 38 tokens

rds

AWS RDS relational database service for managed databases. Use when provisioning databases, configuring backups, managing replicas, troubleshooting connectivity, or optimizing performance.

itsmostafa/aws-agent-skills · 31 tokens