agentleFS
kryptophonikkryptophonik/SRE-Skills/skills/sre-cloud-cost-review/SKILL.md

sre-cloud-cost-review

Skill4 starsChanged 23 days agoMITView on GitHub

Use for cloud or observability cost reviews and spend spikes: idle/oversized resources, storage sprawl, data transfer, commitments, ingest/retention. Read-only; never deletes or resizes without approval.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Wait for explicit human approval before any prod-changing command, MCP write tool, or external post.

    line 12

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Cloud Cost Review

Safety gates (REQUIRED)

  1. Read-only diagnosis first.
  2. Propose each change with risk (low/med/high) and reversibility.
  3. Wait for explicit human approval before any prod-changing command, MCP write tool, or external post.
  4. Act only as approved, verify, and stop and escalate if anything gets worse.

Full rules: sre-safety-gates. Read-only MCP setup: sre-safety-gates/references/mcp.md.

Workflow

  1. Top spend: by service, account/subscription/project, and tag for the last 30–90 days.
  2. Find waste (read-only):
    • Idle: unattached volumes/disks, unused IPs, idle load balancers, stopped-but-billed resources.
    • Oversized: CPU < 20% p95 over 14 days; Kubernetes requests far above usage.
    • Storage: old snapshots, no lifecycle rules, hot tier for cold data.
    • Transfer: cross-AZ/region chatter, NAT gateway traffic.
    • Observability: high-cardinality metrics, debug logs in prod, long retention.
  3. Commitments: Savings Plans/RIs/CUDs coverage vs. steady baseline.
  4. Rank by monthly savings × confidence; note reliability risk (do not cut N+1 headroom).
  5. Propose changes with owner; execute only after approval.

Read-only commands

# AWS
# Cost Explorer: single endpoint us-east-1; billed per request (cache results); End is exclusive; paginated via NextPageToken
aws ce get-cost-and-usage --profile <profile> --region us-east-1 --time-period Start=<YYYY-MM-01>,End=<YYYY-MM-01> --granularity MONTHLY --metrics UnblendedCost --group-by Type=DIMENSION,Key=SERVICE
# Regional resources: repeat per region
aws ec2 describe-volumes --profile <profile> --region <region> --filters Name=status,Values=available --max-items 200
aws ec2 describe-addresses --profile <profile> --region <region> --query 'Addresses[?AssociationId==null]'
# Azure
# needs the costmanagement extension and Cost Management Reader
az costmanagement query --type ActualCost --timeframe Custom --time-period from=<YYYY-MM-DD> to=<YYYY-MM-DD> --scope /subscriptions/<subscription-id>
az disk list --subscription <subscription-id> --query "[?diskState=='Unattached']" -o table
# GCP
gcloud compute disks list --project=<PROJECT_ID> --filter="-users:*" --limit=100   # unattached disks
gcloud recommender recommendations list --project=<PROJECT_ID> --location=<ZONE> --recommender=google.compute.instance.MachineTypeRecommender
# Kubernetes requests vs usage
kubectl --context <ctx> -n <ns> top pods --sort-by=cpu | head -30

Output

  • Cost report: top spend, waste list with monthly savings estimate, reliability risk, owner, recommended action

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.