DevOps & SRE Subagents for Claude Code

Let Claude Code help with infrastructure and on-call without letting it run terraform apply or kubectl delete on its own.

DevOps & SRE Subagents for Claude Code product illustration

What it is

Ten Claude Code subagents for infrastructure and on-call work, plus an infra guard hook that makes Claude ask before terraform apply, kubectl delete, helm upgrade or a cloud CLI change, and refuse terraform destroy -auto-approve, namespace deletes and recursive bucket deletes outright. Every reviewer is read-only by design; the agents that write (CI fixer, runbook and postmortem writers) are limited to their own files.

SubagentUse it forTools
incident-triagelive incident: impact, what changed, ranked causes, safest mitigation, status update for the channelread-only + Bash
log-investigatorfirst error, spikes, error groups, one request traced across servicesread-only + Bash
terraform-reviewerplan review before apply: deletes/replacements, IAM wildcards, open security groups, encryption, pinningread-only + Bash
k8s-manifest-reviewerrequests/limits, probes, securityContext, :latest, PDBs, RBAC, exposure (renders Helm/Kustomize first)read-only + Bash
dockerfile-reviewerbase image pinning, non-root, secrets in layers, multi-stage, caching, compose risksread-only + Bash
ci-pipeline-fixerred CI: root cause from the failing log and the smallest fix; hardens GitHub Actions (SHA pinning, permissions, injection)edits CI files
alert-reviewernoisy or useless pages, missing for:, runbook links, SLO burn-rate alertsread-only + Bash
runbook-writerrunbooks under docs/runbooks/ with commands that match your repowrites docs
postmortem-writerblameless postmortem with UTC timeline and action itemswrites one doc
cloud-cost-revieweridle and oversized resources, storage lifecycle, NAT and transfer traps, log retentionread-only + Bash

Separate from our general Claude Code Subagents Pack (code review, tests, debugging): no agent overlaps.

What you get

The screenshot is real output from the kit’s own commands. Tested from a fresh download of this exact zip: ./run_tests.sh ran 10 tests OK on Python 3.13 and 3.10.

Real terminal output from DevOps & SRE Subagents for Claude Code: demo and passing tests

Install

  • As a plugin (agents + guard hook): add this folder to a plugin marketplace, or for a quick test claude --plugin-dir ./devops-sre-subagents. Plugin agents appear as devops-sre-subagents:terraform-reviewer.
  • Agents only, into a project or your user folder: python3 tools/install_agents.py ~/code/infra or python3 tools/install_agents.py --user --only incident-triage,log-investigator.

Then ask, for example: "Use the terraform-reviewer subagent on the plan for infra/prod", or "@incident-triage checkout is returning 502s since 14:10".

Infra guard hook

hooks/hooks.json registers hooks/infra_guard.py as a PreToolUse hook on Bash. It reads the command (including cd x && ..., sudo, VAR=1 cmd and bash -c "...") and answers:

  • ask: terraform/tofu apply, destroy, import, state rm/mv; pulumi up; kubectl delete/apply/patch/scale/drain/rollout restart/exec; helm install/upgrade/uninstall/rollback; aws/gcloud/az create, delete, modify, stop and similar; aws s3 sync --delete; docker prune/push; ansible-playbook without --check; gh workflow run.
  • deny: terraform|tofu apply/destroy -auto-approve, pulumi destroy --yes, kubectl delete namespace|node|pv|crd or --all, aws s3 rm --recursive, aws s3 rb --force, gcloud projects delete, az group delete.
  • Read-only commands (plan, get, describe, logs, --dry-run, helm template, describe-*) pass through.

Settings: DEVOPS_GUARD=off or DEVOPS_GUARD=deny in the environment, or .claude/devops-guard.json in the project: {"mode": "ask", "allow": ["kubectl apply -f k8s/dev"]} (allow entries are command prefixes). Plugin hooks apply to the whole session while the plugin is enabled. Claude Code ignores hooks, mcpServers and permissionMode in plugin agent files, so the guard ships at plugin level.

Tools

  • tools/tfplan_summary.py plan.json: summarizes terraform show -json tfplan. It lists deletes and replacements first, with the attributes forcing each replacement (replace_paths), and flags stateful resources (databases, buckets, volumes, keys, DNS zones). It also shows drift and exits 1 if anything would be destroyed. The terraform-reviewer uses it.
  • tools/lint_agents.py agents --plugin checks every agent file against the documented frontmatter rules.
  • tools/install_agents.py copies agents into .claude/agents/ or ~/.claude/agents/.

./demo.sh shows the linter, the plan summary on examples/plan.json and guard decisions. ./run_tests.sh runs the tests. examples/k8s-deployment.yaml gives the Kubernetes reviewer something to find.

Honest limits

  • These are review and drafting aids, not a security audit or a change-approval process. A human approves every change.
  • The guard matches command text, so a command hidden inside a script file isn't seen. Keep your normal IAM and RBAC least-privilege.

Format and license

Zip, 31 KB, v1.0, 23 files. You may use and modify this kit for your own work and for clients you serve, including paid client work. Not affiliated with or endorsed by Anthropic, HashiCorp or the Kubernetes project.

FAQ

Can the agents change my infrastructure?
The reviewers are read-only. The guard hook asks before infra-changing commands and blocks the catastrophic ones.
Does it work with OpenTofu, Helm and Kustomize?
Yes.
How is it different from the Subagents Pack?
That pack is for application code (review, tests, debugging); this one is infrastructure and on-call, with no overlap.
How do I get the files?
Right after payment, Stripe’s confirmation page shows your download link.
Refunds?
Email hello@youraitools.co within 14 days if it doesn’t work and we can’t fix it.
Can I pay with crypto?
Yes. Pay the same price in USDC or USDT on Base, Ethereum, Arbitrum, Optimism, Polygon or Solana from the "Pay with crypto" button, with no account or KYC. We check the payment on-chain and show your download links as soon as it confirms.

Get DevOps & SRE Subagents for Claude Code

10 Claude Code subagents for DevOps and SRE: incident triage, Terraform plan review, Kubernetes, CI fixes, alerts, postmortems. Guard hook blocks destroy. $19.

Save with a bundle

Pairs well with

Download$19

Data & Analytics Subagents for Claude Code

10 Claude Code subagents for data teams: SQL and dbt review, query tuning, data quality, metrics, A/B tests. SQL guard blocks DROP and unfiltered DELETE. $19.

View Data & Analytics Subagents for Claude Code
Download$29

Docs Search MCP Server

MCP server for your own docs: Markdown, MDX, RST, HTML and llms.txt, searched by section with citations. Read-only, offline, no API keys. Claude, Cursor.

View Docs Search MCP Server
Download$19

Claude Code Safety Hooks

Tested Claude Code hooks as a plugin: block rm -rf and force-push to main, protect .env and lockfiles, catch API keys in files, audit log. $19 once.

View Claude Code Safety Hooks

Related