cost-optimization

cost-optimization is a skill for Claude Code, Codex from rampstackco/claude-skills. It costs 101 tokens per session (2,658 once invoked), scanned A, original, MIT.

A framework for reviewing and reducing cloud, infrastructure, and software subscription costs while considering reliability and delivery speed.

In plain words
What is it for?
Use it for regular cost reviews, budget cuts, vendor renewals, infrastructure rightsizing, or evaluating consolidation during a provider migration.
Why use it?
It helps identify unused resources, oversized services, duplicate tools, and contract opportunities before spending grows further.

Skill for Claude CodeCodex

Part of the rampstack-skills plugin — 103 skills shipped together

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 skills/rampstackco/claude-skills/cost-optimization
Any agent
npx skills add rampstackco/claude-skills --skill cost-optimization
Clone the repo
git clone --depth 1 https://github.com/rampstackco/claude-skills

Made for: Claude Code, Codex.

Or install rampstack-skills, the plugin that ships this one along with the rest of its 103 skills.

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-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/rampstackco/claude-skills/cost-optimization.svg)](https://agentmods.dev/skills/rampstackco/claude-skills/cost-optimization)
Your own site
<a href="https://agentmods.dev/skills/rampstackco/claude-skills/cost-optimization"><img src="https://agentmods.dev/badge/skills/rampstackco/claude-skills/cost-optimization.svg" alt="Measured on agentmods" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,658 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.00101 $0.02658
Opus 5 $0.00051 $0.01329
Sonnet 5 $0.00020 $0.00532
Haiku 4.5 $0.00010 $0.00266

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

Security

Grade A, and why

cost-optimization 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 5d 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.

skills/cost-optimization/SKILL.md · 346 lines

How it starts

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

Cost Optimization

Audit cloud, SaaS, and infrastructure spend. Cut what's not earning its keep. Rightsize what's oversized. Negotiate what's negotiable. Without breaking what works.


When to use

  • Quarterly or annual cost review
  • Finance flags rising spend
  • Vendor contract renewal coming up
  • Budget cut required
  • New leadership wants the numbers
  • Migrating between providers (cost is part of the case)
  • Audit before scaling significantly (catch waste before it scales)

When NOT to use

  • Active incident response (use incident-response)
  • Performance issues that happen to involve infrastructure (use performance-optimization)
  • Vendor evaluation for a new purchase (use vendor-evaluation)
  • Personnel or org costs (out of scope for this skill)

Required inputs

  • Current cost (monthly, ideally for the last 12 months)
  • Cost broken down by service or vendor
  • Inventory of cloud resources (instances, databases, storage, etc.)
  • Inventory of SaaS subscriptions
  • Owners per cost line (who decided to spend this, who uses it)
  • Constraints (compliance, performance, contract terms)

The framework: 5 levers

Every cost optimization opportunity falls into one of these levers.

Lever 1: Eliminate

Stop paying for things that aren't used.

  • Idle resources (instances, databases, environments running but unused)
  • Subscriptions where no one logs in
  • Duplicate tools (multiple tools doing the same job)
  • Old projects still incurring cost
  • Test environments that should have been torn down
  • Forgotten domains, backups, snapshots, logs

This is usually the largest opportunity in the first audit. Often 10-30% of spend.

Lever 2: Rightsize

Pay for what you actually use, not what you provisioned for the worst case three years ago.

  • Oversized instances (CPU and memory utilization low)
  • Over-provisioned databases (storage and throughput far above usage)
  • Over-purchased SaaS seats
  • Premium plans where standard would suffice
  • High-availability setups for non-critical systems

Read the full file on GitHub · 346 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 346 lines · 101 tokens per session scan A 5589fd8d9c40

Subscribe to this mod's changes

cost-optimization is a skill published in the GitHub repository rampstackco/claude-skills (814 stars, last pushed 7d ago), licensed MIT. It adds 101 tokens to every session and 2,658 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 skills, from other repositories

business-investment-advisor

../../../finance/business-investment-advisor/skills/business-investment-advisor/SKILL.md.

alirezarezvani/claude-skills · 0 tokens

r2-upload

Upload files to Cloudflare R2, AWS S3, or any S3-compatible storage (like MinIO) and generate secure, time-limited presigned download links with configurable expiration, typically set to 5 minutes. Use when the user needs to upload a file to cloud storage and get a shareable link, or mentions R2, S3, presigned URLs…

zebbern/claude-code-guide · 89 tokens

offensive-cloud

Cloud security attack methodology covering AWS, Azure, and GCP. Includes credential harvesting (IMDS, /.aws, env vars, leaked CI secrets, instance roles), enumeration with cloud-specific tools (pacu, ScoutSuite, Prowler, ROADtools, gcpenum), privilege escalation paths (IAM PassRole, AssumeRole chains, Lambda/Functions…

SnailSploit/Claude-Red · 238 tokens

aws-penetration-testing

This skill should be used when the user asks to "pentest AWS", "test AWS security", "enumerate IAM", "exploit cloud infrastructure", "AWS privilege escalation", "S3 bucket testing", "metadata SSRF", "Lambda exploitation", or needs guidance on Amazon Web Services security assessment.

zebbern/claude-code-guide · 67 tokens

pwn-aws-budgets

Drive PWN::AWS::Budgets from pwneval.

0dayInc/pwn · 21 tokens

cost-estimator

Estimate AWS costs for CDK projects using real-time pricing data. Use when calculating infrastructure costs, generating pricing reports, or analyzing CDK resource costs before deployment.

aws-samples/sample-agent-skills-for-builders · 36 tokens