infra-as-code

infra-as-code is a skill for Claude Code, Codex from orlando-japan/claude-code-setting. It costs 34 tokens per session (1,131 once invoked), scanned A, original, MIT.

A practice for managing servers, cloud resources, and deployment configuration as code stored in version control. Infrastructure means the computing resources an application runs on, such as networks, databases, and Kubernetes resources.

In plain words
What is it for?
Use it when provisioning or cleaning up infrastructure with tools such as Terraform, OpenTofu, Pulumi, CloudFormation, Kubernetes manifests, Helm, or Kustomize.
Why use it?
It makes infrastructure changes reviewable, repeatable, and reversible instead of leaving important setup hidden in manual console clicks or in one person's knowledge.

Skill for Claude CodeCodex

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/orlando-japan/claude-code-setting/infra-as-code
Any agent
npx skills add orlando-japan/claude-code-setting --skill infra-as-code
Clone the repo
git clone --depth 1 https://github.com/orlando-japan/claude-code-setting

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 infra-as-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/orlando-japan/claude-code-setting/infra-as-code.svg)](https://agentmods.dev/skills/orlando-japan/claude-code-setting/infra-as-code)
Your own site
<a href="https://agentmods.dev/skills/orlando-japan/claude-code-setting/infra-as-code"><img src="https://agentmods.dev/badge/skills/orlando-japan/claude-code-setting/infra-as-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,131 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.00034 $0.01131
Opus 5 $0.00017 $0.00566
Sonnet 5 $0.00007 $0.00226
Haiku 4.5 $0.00003 $0.00113

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

Security

Grade A, and why

infra-as-code 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.

templates/extra/skills/infra-as-code/SKILL.md · 115 lines

How it starts

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

Infrastructure as code

Infra changes through code review and version control, not through clicking in the cloud console. Anything else drifts into "only Alice knows how this cluster was set up."

Principles

  • Everything in version control. Every resource that exists in prod should exist in code. If it's manual, fix it.
  • Declarative over imperative. Describe the desired state; let the tool figure out the diff. (Terraform, Pulumi with state, CloudFormation, Kubernetes manifests.)
  • Reviewable. Every change goes through a PR. Plan output is visible to reviewers.
  • Reproducible. From an empty account, the code should reconstruct the infrastructure.
  • Rollback-able. Revert a commit, reapply, get the old state back.

Tool choice

  • Terraform / OpenTofu — dominant, cloud-agnostic, mature, HCL syntax. State file is load-bearing.
  • Pulumi — real programming languages, good for teams that hate HCL. State model similar to Terraform.
  • CloudFormation / CDK — AWS-native, tight integration, less cloud-agnostic.
  • Kubernetes manifests / Helm / Kustomize — for k8s-specific resources.

Pick one primary, be consistent. Mixing creates drift.

Structure

Modules

Extract repeatable patterns into modules: "a web service," "a VPC with public/private subnets," "a Postgres instance with backups."

  • Inputs are small, named, typed.
  • Outputs are what callers need to wire into other modules.
  • Modules should be stable. Breaking changes = new version.

Environments

  • Separate state per environment. Don't share state between dev and prod.
  • Same code, different inputs. The same module used for dev and prod with different parameters (size, region, replicas).
  • Dev is not a stripped-down prod. It should exercise the same code path.

Directory layout (typical)

infra/
├── modules/
│   ├── web-service/
│   ├── database/
│   └── vpc/
├── environments/
│   ├── dev/
│   ├── staging/
│   └── prod/
└── README.md

Read the full file on GitHub · 115 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 · 115 lines · 34 tokens per session scan A 0baf5cbdd21c

Subscribe to this mod's changes

infra-as-code is a skill published in the GitHub repository orlando-japan/claude-code-setting (2 stars, last pushed 3mo ago), licensed MIT. It adds 34 tokens to every session and 1,131 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.

Related

Other skills, from other repositories

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

Cloud Security & Container Hardening

AWS/Azure/GCP security auditing, container and Kubernetes hardening, Infrastructure as Code scanning, and cloud compliance assessment.

Masriyan/Claude-Code-CyberSecurity-Skill · 30 tokens

pulumi-migrate-from-discovered-stack

Migrate a CloudFormation or ARM stack into a Pulumi stack, sourced from a stack that Pulumi Cloud's Discovery feature has already found and exposed via the discovered-stacks API. Load this skill when the user has a discovered stack in Pulumi Cloud and wants to bring its resources under Pulumi management. Do NOT load…

pulumi/agent-skills · 115 tokens

pulumi-component

Guide for authoring Pulumi ComponentResource classes. Use when creating reusable infrastructure components, designing component interfaces, setting up multi-language support, or distributing component packages.

pulumi/agent-skills · 36 tokens

pulumi-overview

Use this skill for any task that creates, modifies, inspects, or destroys cloud infrastructure or SaaS configuration, from one-off CLI operations to full multi-resource projects, across providers in the Pulumi ecosystem. A typical project spans many providers (AWS or Azure or GCP, Kubernetes, Cloudflare, Auth0…

pulumi/agent-skills · 210 tokens

pulumi-best-practices

Load when the user is writing, reviewing, or debugging Pulumi TypeScript/Python programs; asks about Output or apply() usage; wants to create ComponentResource classes; needs to refactor resources without destroying them (aliases); is setting up secrets or config; or is configuring a pulumi preview/up CI workflow.…

pulumi/agent-skills · 92 tokens