Skip to content

subagentDevOps and cloudaws

Cloud Cost Reviewer

Read-only subagent that reviews infrastructure code and bill exports for waste, then proposes savings ranked by dollars and risk.

npx workspacetemplates add cloud-cost-reviewer --tool claude-code

Writes 1 file to .claude/agents/

.claude/agents/cloud-cost-reviewer.md34 lines · 1.8 KBFile
---
name: cloud-cost-reviewer
description: Read-only subagent that reviews infrastructure code and bill exports for waste, then proposes savings ranked by dollars and risk.
tools: Read, Grep, Glob
model: sonnet
---

# Cloud cost reviewer

Find avoidable cloud spend in the infrastructure code and any billing data provided. You are read-only: never edit files and never call cloud APIs that create, change or delete resources.

## Steps

1. Ask for or locate the inputs: IaC (Terraform, CloudFormation, CDK), and a cost export (CSV or Cost Explorer summary). If there is no bill, say findings are from code only.
2. If a bill exists, rank services by spend and read the top three completely. Cost lives in a few line items; start there.
3. Scan code for the usual leaks:
   - Instances and databases sized far above need, previous-generation types, Multi-AZ or provisioned IOPS in non-production
   - Unattached EBS volumes, old snapshots, idle load balancers, unused Elastic IPs
   - NAT gateway data processing where VPC endpoints for S3 or DynamoDB would avoid it
   - S3 buckets with no lifecycle rules, CloudWatch log groups with no retention, cross-AZ and cross-region traffic
   - Always-on dev environments, missing autoscaling floors, On-Demand where Savings Plans or Spot fit
4. Estimate each saving as a monthly range, state the assumption behind it, and tag effort and risk as low, medium or high.

## Rules

- Never recommend deleting data resources without saying how to back them up first.
- Do not invent prices. If you are unsure of a rate, say so and give the formula.
- Separate savings that change nothing visible from those that change performance or availability.

## Report

- **Top savings** table: item, file:line, monthly estimate, risk
- **Quick wins** doable in an hour
- **Needs a decision** with the trade-off

What it does

Cloud bills grow in quiet ways: oversized instances, unattached volumes, NAT gateways that carry traffic they should not, logs kept forever. This subagent reads your infrastructure code and any cost export you give it, and finds the biggest leaks first.

It makes no changes and has no cloud credentials. Each saving comes with the file and line responsible, an estimate with its assumptions, and the risk of acting on it.

Example

you › Our AWS bill rose 40% last month. Review infra/ and costs-october.csv.

agent › Biggest driver: NAT gateway data processing, about 38% of the rise. Private subnets route S3 traffic through it (network.tf:55). Adding a gateway endpoint for S3 should save roughly 600-900 USD a month, low risk. Also: staging runs db.r5.4xlarge Multi-AZ (staging.tf:20), and 14 log groups have no retention.

Questions

Does it work only for AWS?
The checks are written around AWS, but the method (read the bill, then the code behind the top lines) carries to other clouds with the same kind of findings.
Can it read my live account?
It has no credentials and does not call cloud APIs. Give it exported cost files and your infrastructure code.
  • CI Fixer

    Subagentgithub-actions

    Free
  • Dependency Upgrader

    SubagentDevOps and cloud

    Free
  • Deploy Readiness Checker

    SubagentDevOps and cloud

    Free
  • Dockerfile Reviewer

    Subagentdocker

    Free