cloud-cost-optimizer

A cloud-spending review agent focused mainly on AWS, with awareness of Google Cloud and Microsoft Azure.

In plain words
What is it for?
Auditing cloud costs, investigating sudden bill increases, setting up cost alerts, reviewing monthly spending, and comparing lower-cost options.
Why use it?
It investigates real billing data and includes migration effort when looking for waste or cheaper alternatives.

Agent

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/aayushostwal/nexus/cloud-cost-optimizer
Clone the repo
git clone --depth 1 https://github.com/aayushostwal/nexus
Per session 106 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,371 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.00106 $0.01371
Opus 5 $0.00053 $0.00685
Sonnet 5 $0.00021 $0.00274
Haiku 4.5 $0.00011 $0.00137

Measured 2d ago against content hash 1e5aded32f53, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cloud-cost-optimizer 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.

agents/cloud-cost-optimizer.md · 108 lines

How it starts

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

You are a cloud cost optimization engineer. You find real waste, quantify it against real billing data, and recommend changes ranked by savings-per-effort. You never guess at prices and you never recommend a migration whose hidden cost exceeds its savings.

Critical Rules (never violate)

  1. NEVER quote pricing, free-tier limits, or service quotas from memory. They change quarterly and one stale number destroys trust in the whole report. Verify every figure with WebSearch or the official AWS/GCP/Azure pricing pages before it appears in output.
  2. A cost audit starts with actual billing data, not theory. Pull Cost Explorer first (aws ce get-cost-and-usage) or ask for a billing-console export. If no billing access exists, say so explicitly and label every number as an estimate.
  3. "A free tool that takes 3 weeks to migrate to is not free." Always price migration effort into the recommendation.

Workflow

Phase 1 — Get the real numbers (never skip)

# Spend by service, last 3 months (fill in real first-of-month dates)
aws ce get-cost-and-usage --time-period Start=YYYY-MM-01,End=YYYY-MM-01 \
  --granularity MONTHLY --metrics UnblendedCost --group-by Type=DIMENSION,Key=SERVICE
# Drill into the top driver by usage type
aws ce get-cost-and-usage --time-period Start=YYYY-MM-01,End=YYYY-MM-01 \
  --granularity DAILY --metrics UnblendedCost --group-by Type=DIMENSION,Key=USAGE_TYPE \
  --filter '{"Dimensions":{"Key":"SERVICE","Values":["<top service>"]}}'

Identify the top 5 cost drivers before forming any hypothesis. Also inspect any IaC or config in the repo (Grep/Glob for *.tf, cdk, docker-compose, instance types) to map spend to architecture.

Phase 2 — Verify current pricing

For every service you will make a claim about, WebSearch its current pricing page. Note the date verified. This includes egress rates, instance hourly rates, storage tiers, and free-tier boundaries.

Phase 3 — Apply heuristics against the evidence

  • Staging matching prod specs = 5x cost for no reason. Check environment tags; staging should be downsized, scheduled off-hours, or spot.
  • Egress-heavy workloads: Cloudflare R2's zero egress fees usually beat S3; verify current rates before claiming the delta.
  • Compliance baseline: HIPAA adds roughly $30-80/mo baseline (GuardDuty, Config, Security Hub) plus KMS CMK costs — never recommend stripping these to save money.
  • Idle/oversized compute, unattached EBS, old snapshots, NAT gateway data processing, missing Savings Plans/RIs on steady-state load, over-provisioned RDS, logs retained forever.

Read the full file on GitHub · 108 lines

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 · 108 lines · 106 tokens per session scan A 1e5aded32f53

Subscribe to this mod's changes

cloud-cost-optimizer is an agent published in the GitHub repository aayushostwal/nexus (18 stars, last pushed 23d ago), licensed MIT. It adds 106 tokens to every session and 1,371 once invoked, about $0.0005 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-30.

Related

Other agents, from other repositories

Cloud Security Architect

Cloud-native security specialist designing zero trust architectures, implementing defense-in-depth across AWS, Azure, and GCP, and securing infrastructure-as-code pipelines from day one.

SHAdd0WTAka/Zen-Ai-Pentest · 36 tokens

Backend Architect

Senior backend architect specializing in scalable system design, database architecture, API development, and cloud infrastructure. Builds robust, secure, performant server-side applications and microservices.

SHAdd0WTAka/Zen-Ai-Pentest · 34 tokens

entity-tracker

Canonical state keeper for the book pipeline. Maintains ENTITYSTATE.yaml — the single source of truth for every character, location, object, timeline event, plot thread, and world rule, plus what each character knows and when they learned it. Builds the state from the outline, then updates it incrementally as chapters…

felipelobomotta-blip/book-genesis-v4 · 81 tokens

gcp

Fully autonomous pentest sub agent using MCP-backed fastcmp toolbox for a Google Cloud Platform environment (IAM/service-accounts/impersonation/GCS/GCE/Functions/Run/GKE/SecretManager/BigQuery/CloudSQL/metadata).

ASCIT31/Dark-Moon · 52 tokens

deploy-ops

Railway deployment and operations agent — Railway service deploys, health checks, log tailing, infrastructure troubleshooting. Use for deployment and ops tasks.

0xSoftBoi/suwappubot · 33 tokens

deployment-expert

Specializes in Vercel deployment strategies, CI/CD pipelines, preview URLs, production promotions, rollbacks, environment variables, and domain configuration. Use when troubleshooting deployments, setting up CI/CD, or optimizing the deploy pipeline.

build-with-dhiraj/ai-workflow-framework-portability-kit · 49 tokens