ops-infra-code

An infrastructure-as-code specialist for Terraform and OpenTofu, tools that define cloud and server infrastructure in configuration files.

In plain words
What is it for?
Use it to create or audit infrastructure modules, organise environments, configure state, and check projects with formatting, validation, testing, and security tools.
Why use it?
It helps inspect infrastructure projects for unsafe patterns, weak state management, missing validation, and other operational risks.

Agent for Claude Code

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 agents/christopherlouet/claude-base/ops-infra-code
Clone the repo
git clone --depth 1 https://github.com/christopherlouet/claude-base

Made for: Claude Code.

Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 296 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 $0.00029 $0.00296
Opus 5 $0.00015 $0.00148
Sonnet 5 $0.00006 $0.00059
Haiku 4.5 $0.00003 $0.00030

Measured 2d ago against content hash ad3e6ea604b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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.

.claude/agents/ops-infra-code.md · 40 lines

What it actually says

Agent OPS-INFRA-CODE

Infrastructure as Code with Terraform/OpenTofu. The ops-infra-code skill provides the detailed patterns.

Workflow

  1. Explore: Find .tf/.tfvars files, analyze the structure
  2. Analyze: Patterns, conventions, anti-patterns, versions
  3. Propose: Migration to modern features, modules, validation, tests

Audit Checklist

  • Separation of environments/modules
  • Standard files (main.tf, variables.tf, outputs.tf, versions.tf)
  • Variables with description and explicit types
  • Remote state with encryption, no secrets in the code
  • Pre-commit hooks, native tests or Terratest, security scanning

Useful Commands

terraform fmt -check -recursive && terraform validate && tflint --recursive
trivy config . && checkov -d .
terraform test && terraform plan -out=tfplan

Attribution

Based on the best practices from terraform-best-practices.com

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. 2d ago First seen · 40 lines · 29 tokens per session scan A ad3e6ea604b8

Subscribe to this mod's changes

ops-infra-code is an agent published in the GitHub repository christopherlouet/claude-base (5 stars, last pushed 2d ago), licensed MIT. It adds 29 tokens to every session and 296 once invoked, about $0.0001 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 agents, from other repositories

cloud-architect

Multi-cloud architecture, cost optimization, serverless vs containers, disaster recovery, and infrastructure design specialist. Use for high-level architecture decisions, cloud migration planning, or cost optimization. Trigger phrases: cloud, AWS, GCP, Azure, serverless, containers, Kubernetes, infrastructure, cost…

travisjneuman/.claude · 69 tokens

deployment-validator

Deployment / SRE for the user-search feature. Owns the load test (task 18), production rollout (task 20), rollback drill (task 22), and migration validation in staging (task 4). Triggers - "run the load test against staging", "begin the 10% production rollout", "execute the rollback drill", "validate the index…

Enovatr-Labs/SpecRoute · 81 tokens

gsd-planner

Creates executable phase plans with task breakdown, dependency analysis, and goal-backward verification. Spawned by /gsd:plan-phase orchestrator.

travisjneuman/.claude · 34 tokens

01-Orchestrator

Master orchestrator for the multi-step Azure platform engineering workflow. Coordinates Requirements, Architect, Design, IaC Plan, IaC Code, Deploy agents with mandatory human approval gates. Routes Bicep or Terraform tracks via decisions.iactool.

jonathan-vella/apex-accelerator · 53 tokens

go-expert

Go concurrency, error handling, stdlib patterns, Chi/Echo web frameworks specialist. Use when writing Go code, designing concurrent systems, or building Go web services. Trigger phrases: Go, Golang, goroutine, channel, Chi, Echo, stdlib, context, error handling, interface, module, go test.

travisjneuman/.claude · 69 tokens

02-Requirements

Researches and captures Azure platform engineering project requirements.

jonathan-vella/apex-accelerator · 13 tokens