IaC Patterns

IaC Patterns is a skill for Claude Code, Codex from niels-emmer/myace. It costs 37 tokens per session (639 once invoked), scanned A, original, MIT.

A set of patterns for writing Terraform and Bicep, tools that define cloud infrastructure in code, with clear modules, naming, tagging, and managed state.

In plain words
What is it for?
It helps create or modify cloud resources, organize networking, compute, data, and identity modules, and review infrastructure plans.
Why use it?
It reduces infrastructure drift, unclear ownership, unreadable configurations, and deployment plans that are difficult to review or reproduce.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for aider. Also seen: mentions Codex; built for aider; mentions OpenCode.

Good fit It helps create or modify cloud resources, organize networking, compute, data, and identity modules, and review infrastructure plans.

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

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 IaC Patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/niels-emmer/myace/iac-patterns/github.svg)](https://agentmods.dev/skills/niels-emmer/myace/iac-patterns)
Your own site
<a href="https://agentmods.dev/skills/niels-emmer/myace/iac-patterns"><img src="https://agentmods.dev/badge/skills/niels-emmer/myace/iac-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 IaC Patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/niels-emmer/myace/iac-patterns"><img src="https://agentmods.dev/badge/skills/niels-emmer/myace/iac-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 639 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.00037 $0.00639
Opus 5 $0.00018 $0.00319
Sonnet 5 $0.00007 $0.00128
Haiku 4.5 $0.00004 $0.00064

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

Security

Grade A, and why

IaC 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 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.

collections/base/devops-engineer/skills/iac-patterns/SKILL.md · 30 lines

How it starts

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

Purpose

Infrastructure-as-code fails in predictable ways: state drift, unreadable modules, resources nobody can name or attribute, and plans nobody actually reads. This skill is the working checklist for authoring Terraform and Bicep that stays reviewable and reproducible over time.

When to use it

Every time you write or modify IaC — a new resource, a module, a state change, or a refactor. Reach for it explicitly when starting work in an unfamiliar codebase or when you're about to introduce a pattern that doesn't match its neighbors.

Steps / checklist

  1. Remote state with locking. State lives in a remote backend (Terraform) or a deployment stack (Bicep) with locking enabled. Local state is not acceptable for anything shared or persistent. Never commit state files.
  2. Module structure. Split by concern (networking, compute, data, identity), not by resource type. A module should encapsulate a deployable unit with a clear interface — inputs, outputs, and invariants — not a grab-bag of related resources.
  3. Naming and tagging. Every resource follows the project's naming convention and carries team + cost-center tags (see the resource-naming skill in the iac-expert collection for a template). Names are deterministic from inputs, not hand-assigned.
  4. Private by default. Every resource starts network-isolated. No public IP, 0.0.0.0/0 ingress, or public bucket ACL without a documented exception.
  5. Managed identity over secrets. Use workload identity (Azure Managed Identity, AWS IAM roles, GCP Workload Identity Federation) over API keys or connection strings. Static secrets only when the target has no identity-federation option.
  6. Plan review discipline. Read the plan output before applying: does it create/destroy resources the task didn't ask for? Is the diff scoped to the change? A plan you haven't read is a plan you haven't approved.
  7. Drift detection. Treat drift as a defect. Prefer plan/validate in CI and scheduled drift checks over discovering divergence at incident time.
  8. Version pinning. Pin provider and module versions. Unpinned providers make builds non-reproducible and plans unpredictable.

Read the full file on GitHub · 30 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 · 30 lines · 37 tokens per session scan A 9b6f67ac2a92

Subscribe to this mod's changes

IaC Patterns is a skill published in the GitHub repository niels-emmer/myace (1 stars, last pushed 2d ago), licensed MIT. It adds 37 tokens to every session and 639 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-09-03.

Related

Other skills, from other repositories

terraform

Terraform infrastructure-as-code workflow patterns: state and environments, module design, safe plan/apply, drift control, and CI guardrails.

bobmatnyc/claude-mpm-skills · 28 tokens

terraform

A guide to Terraform, a tool that describes and manages cloud infrastructure from configuration files. It covers initialization, formatting, validation, planning, applying changes, state inspection, outputs, and HCL syntax.

chaterm/terminal-skills · 8 tokens

terraform-iac

Terraform and OpenTofu infrastructure as code best practices - generate HCL configurations, module patterns, state management, CI/CD workflows, and cloud provider templates for AWS, GCP, Azure.

chainlesschain/chainlesschain · 41 tokens

infrastructure-as-code-guardian

Universal Infrastructure as Code (IaC) agent skill for authoring, securing, and managing cloud infrastructure across Terraform, Pulumi, CloudFormation, Ansible, and Bicep. Provides cross-tool security hardening, state management best practices, cost optimization, drift detection, and CI/CD integration. Covers AWS…

JPeetz/agent-skills · 254 tokens

terraform-iac

Terraform & Infrastructure as Code: Helps write, review, and structure Terraform configurations, modules, state management, and IaC best practices. Use whenever the user mentions 'terraform', 'IaC', 'infrastructure as code', '.tf files', 'HCL', 'terraform module', 'terraform state', 'terraform plan', 'terraform…

camilooscargbaptista/cto-toolkit · 121 tokens

tf-plan-review

Analyze Terraform plans for risk before you apply. Classifies every change as safe, moderate, dangerous, or critical. Detects destroys, IAM changes, data-loss risks, and blast radius. Entirely read-only — never runs apply.

cacheforge-ai/cacheforge-skills · 51 tokens