terraform-patterns

terraform-patterns is a skill for Claude Code, Codex from Morningstar202604/awesome-skillkit. It costs 91 tokens per session (3,276 once invoked), scanned A, original, Apache-2.0.

A development aid for designing and reviewing Terraform infrastructure code. Terraform lets you describe cloud and other infrastructure in files so it can be planned and managed consistently.

In plain words
What is it for?
Use it to review Terraform, design or refactor modules, plan state backends and provider settings, check security, and shape CI/CD plan-and-apply workflows.
Why use it?
It helps prevent disorganized modules, insecure settings, exposed secrets, and infrastructure changes that drift from the intended configuration.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: reads .claude/ paths; mentions Claude Code; mentions Codex.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/tf_module_analyzer.py ./modules/vpc.

Good fit Use it to review Terraform, design or refactor modules, plan state backends and provider settings, check security, and shape CI/CD plan-and-apply workflows.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Morningstar202604/awesome-skillkit
agentmods
npx agentmods add skills/morningstar202604/awesome-skillkit/terraform-patterns

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/terraform-patterns/github.svg)](https://agentmods.dev/skills/morningstar202604/awesome-skillkit/terraform-patterns)
Your own site
<a href="https://agentmods.dev/skills/morningstar202604/awesome-skillkit/terraform-patterns"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/terraform-patterns/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-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/morningstar202604/awesome-skillkit/terraform-patterns"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/terraform-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,276 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.00091 $0.03276
Opus 5 $0.00046 $0.01638
Sonnet 5 $0.00018 $0.00655
Haiku 4.5 $0.00009 $0.00328

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

Security

Grade A, and why

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 9d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/tf_module_analyzer.py, scripts/tf_security_scanner.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/programming/infrastructure/terraform-patterns/SKILL.md · 419 lines

How it starts

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

Terraform Patterns

Predictable infrastructure. Secure state. Modules that compose. No drift.

Opinionated Terraform workflow that turns sprawling HCL into well-structured, secure, production-grade infrastructure code. Covers module design, state management, provider patterns, security hardening, and CI/CD integration.

Not a Terraform tutorial — a set of concrete decisions about how to write infrastructure code that doesn't break at 3 AM.


Slash Commands

Command What it does
/terraform:review Analyze Terraform code for anti-patterns, security issues, and structure problems
/terraform:module Design or refactor a Terraform module with proper inputs, outputs, and composition
/terraform:security Audit Terraform code for security vulnerabilities, secrets exposure, and IAM misconfigurations

When This Skill Activates

Recognize these patterns from the user:

  • "Review this Terraform code"
  • "Design a Terraform module for..."
  • "My Terraform state is..."
  • "Set up remote state backend"
  • "Multi-region Terraform deployment"
  • "Terraform security review"
  • "Module structure best practices"
  • "Terraform CI/CD pipeline"
  • Any request involving: .tf files, HCL, Terraform modules, state management, provider configuration, infrastructure-as-code

If the user has .tf files or wants to provision infrastructure with Terraform → this skill applies.


Workflow

/terraform:review — Terraform Code Review

  1. Analyze current state

    • Read all .tf files in the target directory
    • Identify module structure (flat vs nested)
    • Count resources, data sources, variables, outputs
    • Check naming conventions
  2. Apply review checklist

    MODULE STRUCTURE
    ├── Variables have descriptions and type constraints
    ├── Outputs expose only what consumers need
    ├── Resources use consistent naming: {provider}_{type}_{purpose}
    ├── Locals used for computed values and DRY expressions
    └── No hardcoded values — everything parameterized or in locals
    
    STATE & BACKEND
    ├── Remote backend configured (S3, GCS, Azure Blob, Terraform Cloud)
    ├── State locking enabled (DynamoDB for S3, native for others)
    ├── State encryption at rest enabled
    ├── No secrets stored in state (or state access is restricted)
    └── Workspaces or directory isolation for environments
    
    PROVIDERS
    ├── Version constraints use pessimistic operator: ~> 5.0
    ├── Required providers block in terraform {} block
    ├── Provider aliases for multi-region or multi-account
    └── No provider configuration in child modules
    
    SECURITY
    ├── No hardcoded secrets, keys, or passwords
    ├── IAM follows least-privilege principle
    ├── Encryption enabled for storage, databases, secrets
    ├── Security groups are not overly permissive (no 0.0.0.0/0 ingress on sensitive ports)
    └── Sensitive variables marked with sensitive = true
    

Read the full file on GitHub · 419 lines

Files

What ships with it

4 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. 9d ago First seen · 419 lines · 91 tokens per session scan A 8451c44877a8

Subscribe to this mod's changes

terraform-patterns is a skill published in the GitHub repository Morningstar202604/awesome-skillkit (1 stars, last pushed yesterday), licensed Apache-2.0. It adds 91 tokens to every session and 3,276 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

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

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

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

gke-compute-classes

Configures, optimizes, and troubleshoots GKE ComputeClasses. Use when configuring Spot VMs with on-demand fallback, targeting specific accelerators (GPUs/TPUs) or machine families, restricting ComputeClass access, or debugging pending pods related to node pool auto-creation. Do not use for cluster-level Node Auto…

google/skills · 83 tokens

google-cloud-solution-n-tier-serverless-web-app

Assists in designing and implementing secure n-tier serverless web applications and microservices on Google Cloud. Use when users need architecture designs, security checklists, Terraform code, or deployment guidance for multi-tier serverless apps, regional data residency / European sovereignty compliance, zero-trust…

google/skills · 91 tokens

cloud-run-basics

Manages Cloud Run services, jobs, and worker pools. Use when you need to deploy applications responding to HTTP requests (services), run event-triggered or scheduled tasks (jobs), or handle always-on pull-based background processing (worker pools).

google/skills · 53 tokens