ops-infra-code

ops-infra-code is a skill for Claude Code, Codex from christopherlouet/claude-base. It costs 33 tokens per session (2,383 once invoked), scanned A, original, MIT.

A guide to managing infrastructure as code with Terraform or OpenTofu. Infrastructure as code means defining servers and cloud resources in versioned configuration files.

In plain words
What is it for?
Use it to create modules, configure state backends, set up infrastructure tests, structure environments, and connect changes to CI/CD.
Why use it?
It helps teams build repeatable environments, review infrastructure changes, and organise settings across development, staging, and production.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/christopherlouet/claude-base/ops-infra-code.svg)](https://agentmods.dev/skills/christopherlouet/claude-base/ops-infra-code)
Your own site
<a href="https://agentmods.dev/skills/christopherlouet/claude-base/ops-infra-code"><img src="https://agentmods.dev/badge/skills/christopherlouet/claude-base/ops-infra-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,383 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.00033 $0.02383
Opus 5 $0.00016 $0.01192
Sonnet 5 $0.00007 $0.00477
Haiku 4.5 $0.00003 $0.00238

Measured yesterday against content hash 4badbb75661a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

ops-infra-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 yesterday.

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.

.claude/skills/ops-infra-code/SKILL.md · 299 lines

How it starts

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

Infrastructure as Code (Terraform / OpenTofu)

Complete guide for Terraform and OpenTofu covering modules, tests, CI/CD and production patterns. Based on terraform-best-practices.com and Anton Babenko's enterprise experience.

When to use this Skill

Activate this skill to:

  • Create Terraform/OpenTofu configurations or modules
  • Set up the test infrastructure for IaC
  • Choose between testing approaches (validate, plan, frameworks)
  • Structure multi-environment deployments
  • Implement CI/CD for infrastructure-as-code
  • Review or refactor existing Terraform/OpenTofu projects

Do not use for:

  • Basic syntax questions (Claude already knows)
  • Provider-specific API reference (use the documentation)
  • Cloud questions unrelated to Terraform/OpenTofu

Core Principles

1. Module Hierarchy

Type When to use Scope
Resource Module Logical group of connected resources VPC + subnets, Security group + rules
Infrastructure Module Collection of resource modules Several modules in a region/account
Composition Complete infrastructure Spans multiple regions/accounts

Hierarchy: Resource -> Resource Module -> Infrastructure Module -> Composition

2. Directory Structure

environments/        # Configurations per environment
├── prod/
├── staging/
└── dev/

modules/            # Reusable modules
├── networking/
├── compute/
└── data/

examples/           # Usage examples (also serve as tests)
├── complete/
└── minimal/

3. Naming Conventions

Resources:

# Good: Descriptive and contextual
resource "aws_instance" "web_server" { }
resource "aws_s3_bucket" "application_logs" { }

# Good: "this" for singleton resources (only one of this type)
resource "aws_vpc" "this" { }
resource "aws_security_group" "this" { }

# Avoid: Generic names for non-singletons
resource "aws_instance" "main" { }

Variables:

# Prefix with context
var.vpc_cidr_block          # Not just "cidr"
var.database_instance_class # Not just "instance_class"

Read the full file on GitHub · 299 lines

Files

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.

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. yesterday First seen · 299 lines · 33 tokens per session scan A 4badbb75661a

Subscribe to this mod's changes

ops-infra-code is a skill published in the GitHub repository christopherlouet/claude-base (5 stars, last pushed yesterday), licensed MIT. It adds 33 tokens to every session and 2,383 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

ci-cd-pipeline-builder

../../../engineering/skills/ci-cd-pipeline-builder/SKILL.md.

alirezarezvani/claude-skills · 0 tokens

hns-workflow-ci-loop

Unified CI watch + auto-fix loop skill. Polls gh pr checks after /moai sync PR creation, classifies required vs auxiliary failures, attempts safe automated patches (max 3 iterations), and escalates semantic failures to the user. Use for CI loop workflow — NOT for general loop iteration patterns (see…

modu-ai/moai-adk · 76 tokens

moai-ref-secops

DevSecOps, container, and API operational defensive security reference: CI/CD pipeline hardening, secret scanning, IaC misconfiguration detection, SAST/DAST integration, container image scanning, Kubernetes RBAC hardening, container-escape defense, runtime threat detection, OWASP API Top 10 operational defense, WAF…

modu-ai/moai-adk · 201 tokens

devops-cloud

DevOps, cloud infrastructure, and platform engineering. Use when working with AWS, GCP, Azure, Kubernetes, Terraform, CI/CD pipelines, or infrastructure as code.

travisjneuman/.claude · 38 tokens

github-actions

Use when authoring or fixing GitHub Actions CI/CD — workflows under .github/workflows, triggers, job matrix, caching, token permissions, OIDC cloud deploys, environment gates, reusable workflows. NOT the Dockerfile or image build strategy (that is docker), NOT the branching model (that is git-workflow), NOT release…

ericrisco/rsc-harness · 81 tokens

neon

Use when you have picked Neon (serverless Postgres) and need to connect correctly from a serverless or edge runtime, wire database branching into dev, preview and CI, or stop being burned by scale-to-zero cold starts and pooler limits — including choosing HTTP versus WebSocket connections and pooled versus direct…

ericrisco/rsc-harness · 93 tokens