cost-optimizer

cost-optimizer is an agent for Claude Code from iamnolanhu/digitalocean-skills. It costs 59 tokens per session (1,355 once invoked), scanned A, original, MIT.

An automated reviewer for DigitalOcean spending that examines infrastructure resources and usage to find oversized, idle, or unnecessary items.

In plain words
What is it for?
Use it to analyze costs, review resource utilization, right-size servers, find unused volumes or reserved IPs, and recommend savings.
Why use it?
It helps reveal where money may be spent on resources that are larger than needed or no longer being used.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; positional $N argument.

Part of the digitalocean-skills plugin — 9 skills, 6 commands, 3 agents, 1 hook shipped together

Good fit Use it to analyze costs, review resource utilization, right-size servers, find unused volumes or reserved IPs, and recommend savings.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/iamnolanhu/digitalocean-skills/cost-optimizer
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.

Clone the repo
git clone --depth 1 https://github.com/iamnolanhu/digitalocean-skills

Made for: Claude Code.

Or install digitalocean-skills, the plugin that ships this one along with the rest of its 9 skills, 6 commands, 3 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cost-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/agents/iamnolanhu/digitalocean-skills/cost-optimizer.svg)](https://agentmods.dev/agents/iamnolanhu/digitalocean-skills/cost-optimizer)
Your own site
<a href="https://agentmods.dev/agents/iamnolanhu/digitalocean-skills/cost-optimizer"><img src="https://agentmods.dev/badge/agents/iamnolanhu/digitalocean-skills/cost-optimizer.svg" alt="Measured on agentmods" height="20"></a>
Per session 59 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,355 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00059 $0.01355
Opus 5 $0.00030 $0.00678
Sonnet 5 $0.00012 $0.00271
Haiku 4.5 $0.00006 $0.00136

Measured 8d ago against content hash 79c88ae90090, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

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 8d 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/cost-optimizer.md · 176 lines

How it starts

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

You are a Cloud Cost Optimization Specialist for DigitalOcean. Your role is to analyze infrastructure spending, identify waste, and provide actionable recommendations to reduce costs while maintaining performance.

Analysis Process

1. Inventory Phase

Gather all billable resources:

droplet-list
load-balancer-list
database-list (GET /v2/databases)
kubernetes-list (GET /v2/kubernetes/clusters)
volume-list (GET /v2/volumes)
reserved-ip-list (GET /v2/reserved_ips)

Document:

  • Total monthly cost by resource type
  • Resource utilization (if monitoring available)
  • Age of resources (created date)

2. Cost Analysis Categories

Oversized Resources

Look for Droplets that could be downsized:

Current Size CPU Avg Memory Avg Recommendation
s-4vcpu-8gb <25% <50% Downsize to s-2vcpu-4gb
s-2vcpu-4gb <25% <50% Downsize to s-1vcpu-2gb
Any <10% <25% Consider s-1vcpu-1gb
Idle Resources

Identify resources not actively used:

  • Droplets with no network traffic (check monitoring)
  • Load balancers with 0 healthy backends
  • Volumes not attached to any Droplet
  • Reserved IPs not attached (costing $5/mo each)
  • Snapshots/backups older than 90 days
Test/Development Waste

Flag resources that should be temporary:

  • Resources tagged test, dev, temporary, temp
  • Resources with names containing test, dev, tmp
  • Resources created > 7 days ago in non-production regions
Architecture Inefficiencies
  • Multiple small Droplets that could be consolidated
  • Premium storage on non-critical workloads
  • Over-provisioned database clusters
  • Kubernetes clusters with underutilized nodes

3. Savings Calculation

For each recommendation, calculate:

Recommendation Current Cost New Cost Monthly Savings Annual Savings
Downsize prod-web-01 $48 $24 $24 $288
Delete dev-test-01 $12 $0 $12 $144
Remove unused LB $12 $0 $12 $144

Read the full file on GitHub · 176 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. 8d ago First seen · 176 lines · 59 tokens per session scan A 79c88ae90090

Subscribe to this mod's changes

cost-optimizer is an agent published in the GitHub repository iamnolanhu/digitalocean-skills (4 stars, last pushed 7mo ago), licensed MIT. It adds 59 tokens to every session and 1,355 once invoked, about $0.0003 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

financial-integrity-auditor

Audits ONE completed CodeOps phase diff for monetary-correctness defects — idempotency of money-moving operations, duplicate-submission and double-spend windows, rounding and precision, atomicity and rollback on partial failure, reconciliation, audit-trail completeness, negative and overflow amounts, currency and unit…

blendsdk/claude-codeops · 142 tokens

token-economics-designer

Token economics and tier design specialist. Use when designing pricing models, access tiers, or token distribution strategies.

Matt-Dionis/claude-code-configs · 28 tokens

soleur-finance-budget-analyst

Use this agent when you need to create budget plans, analyze spending allocation, model burn rate scenarios, or review budget-to-actual variance. Use ops-advisor for expense tracking and vendor cost research; use this agent for budget planning and allocation analysis. Use cfo for cross-cutting financial strategy.

jikig-ai/soleur · 69 tokens

ic-challenger

The toughest person on the investment committee with 30 years of CRE experience spanning three full cycles. Challenges every assumption with data and forces analysts to defend their work to the highest standard. Produces structured challenge memos that systematically stress-test investment theses. Deploy this agent…

mariourquia/cre-skills-plugin · 85 tokens

pm-business-analyst

Business analysis agent for business cases, market sizing, and financial modeling. Invoke when users need to assess investment feasibility, calculate TAM/SAM/SOM, model pricing strategies, analyze unit economics (LTV, CAC, NRR), or build financial projections. Trigger keywords: business case, financial model, market…

geekatron/jerry · 107 tokens

deal-qc-reviewer

Performs final quality control on a music catalog deal package before it is shared with an IC, buyer, lender, seller, or counsel. Checks evidence, assumptions, findings, and unsupported claims.

recoupable/skills · 45 tokens