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.
npx agentmods add skills/justanesta/claude-code-resources/devops-terraform-patternsnpx skills add justanesta/claude-code-resources --skill devops-terraform-patternsgit clone --depth 1 https://github.com/justanesta/claude-code-resourcesWrote 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.
[](https://agentmods.dev/skills/justanesta/claude-code-resources/devops-terraform-patterns)<a href="https://agentmods.dev/skills/justanesta/claude-code-resources/devops-terraform-patterns"><img src="https://agentmods.dev/badge/skills/justanesta/claude-code-resources/devops-terraform-patterns.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00037 | $0.01800 |
| Opus 5 | $0.00018 | $0.00900 |
| Sonnet 5 | $0.00007 | $0.00360 |
| Haiku 4.5 | $0.00004 | $0.00180 |
Grade A, and why
devops-terraform-patterns 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 216 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Terraform Patterns
Core Principles
- Infrastructure as Code — All infrastructure is declared in version-controlled
.tffiles. Manual changes are prohibited; every resource has a single source of truth in code. - State Is Sacred — Remote state with locking prevents corruption. Never edit state files by hand. Use
terraform statecommands for manipulation and always back up before operations. - Modular Design — Reusable modules encapsulate logical groupings of resources. Root modules compose child modules. Pin module versions to avoid surprises.
- Immutable Infrastructure — Prefer replacing resources over mutating them. Use
create_before_destroylifecycle rules for zero-downtime deployments. - Least Privilege Plans — CI pipelines run
planon every PR andapplyonly on merge to main. Human review of plan output is mandatory before any production apply.
Resource and Data Source Patterns
Use for_each over count when resources need stable identity. Data sources fetch existing infrastructure without managing it.
# Fetch existing VPC, create subnets with for_each for stable keys
data "aws_vpc" "main" {
filter {
name = "tag:Environment"
values = [var.environment]
}
}
resource "aws_subnet" "private" {
for_each = var.private_subnets
vpc_id = data.aws_vpc.main.id
cidr_block = each.value.cidr
availability_zone = each.value.az
tags = merge(var.common_tags, {
Name = "${var.project}-private-${each.key}"
Tier = "private"
})
}
See resource-patterns for: lifecycle rules, depends_on usage, count vs for_each trade-offs, dynamic blocks, and provisioner patterns.
Module Design
Modules accept typed inputs, expose outputs, and compose into larger stacks. Keep modules focused on a single concern.
# Root module composing child modules
module "networking" {
source = "git::https://github.com/org/terraform-modules.git//networking?ref=v2.3.1"
environment = var.environment
vpc_cidr = var.vpc_cidr
private_subnets = var.private_subnets
public_subnets = var.public_subnets
}
module "database" {
source = "./modules/rds"
subnet_ids = module.networking.private_subnet_ids
security_group_ids = [module.networking.db_security_group_id]
instance_class = var.db_instance_class
engine_version = var.db_engine_version
}
output "db_endpoint" {
description = "RDS instance endpoint"
value = module.database.endpoint
sensitive = true
}
What ships with it
5 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.
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.
- 3d ago First seen · 216 lines · 37 tokens per session scan A 24cc9fddc652
devops-terraform-patterns is a skill published in the GitHub repository justanesta/claude-code-resources (2 stars, last pushed 4mo ago), licensed MIT. It adds 37 tokens to every session and 1,800 once invoked, about $0.0002 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.
Other skills, from other repositories
cloud-architect
Designs cloud architectures, creates migration plans, generates cost optimization recommendations, and produces disaster recovery strategies across AWS, Azure, and GCP. Use when designing cloud architectures, planning migrations, or optimizing multi-cloud deployments. Invoke for Well-Architected Framework, cost…
rule
Skill "rule" from x-cmd/x-cmd, covering rule — rules to rule, 核心命令, 规则文件格式, 示例 and 验证规则文件格式.
cve
Look up CVE records via x cve — cached, zero-API-key, daily xz TSV. Load for cve, vulnerability id, kev, epss, nvd, cvelist, or security advisory.
azmon-mirroredcatalogs-operations-cli
Brings Azure Monitor, Application Insights, and Log Analytics telemetry into Fabric as Eventhouse external delta tables and correlates it with business data. Use to onboard observability data, judge whether latency or availability affected revenue, or build a Real-Time dashboard and Operations Agent over it.
atmos-auth
Authentication and identity management: providers (SSO/SAML/OIDC/GCP/Atmos Pro), identities, keyring, identity chaining, login/exec/shell/console, and github/sts for private GitHub access.
terraform-search-import
Discover existing cloud resources using Terraform Search queries and bulk import them into Terraform management. Use when bringing unmanaged infrastructure under Terraform control, auditing cloud resources, or migrating to IaC.