cost-optimization

cost-optimization is a skill for Claude Code from sethdford/claude-skills. It costs 25 tokens per session (598 once invoked), scanned A, original, MIT.

A guide for reducing cloud and operational spending while keeping required performance and reliability. It covers services from AWS, Google Cloud, and Azure.

In plain words
What is it for?
Use it to review compute, storage, networking, and managed-service costs; calculate cost per request, transaction, or user; and assess options such as right-sizing, scheduling, reserved capacity, and spot capacity.
Why use it?
It helps find the biggest sources of high cloud bills and compare savings without ignoring service commitments or performance.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the quality-attributes plugin — 1 skill, 3 commands shipped together

Good fit Use it to review compute, storage, networking, and managed-service costs; calculate cost per request, transaction, or user; and assess options such as right-sizing, scheduling, reserved capacity, and spot capacity.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sethdford/claude-skills/cost-optimization
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.

Any agent
npx skills add sethdford/claude-skills --skill cost-optimization
Clone the repo
git clone --depth 1 https://github.com/sethdford/claude-skills

Made for: Claude Code.

Or install quality-attributes, the plugin that ships this one along with the rest of its 1 skill, 3 commands.

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/sethdford/claude-skills/cost-optimization.svg)](https://agentmods.dev/skills/sethdford/claude-skills/cost-optimization)
Your own site
<a href="https://agentmods.dev/skills/sethdford/claude-skills/cost-optimization"><img src="https://agentmods.dev/badge/skills/sethdford/claude-skills/cost-optimization.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 598 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.00025 $0.00598
Opus 5 $0.00013 $0.00299
Sonnet 5 $0.00005 $0.00120
Haiku 4.5 $0.00003 $0.00060

Measured 8d ago against content hash 357557338f9e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 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.

architect/quality-attributes/skills/cost-optimization/SKILL.md · 52 lines

How it starts

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

Cost Optimization

Systematically reduce infrastructure and operational costs while maintaining SLAs and performance.

Context

You are optimizing costs. The user faces high cloud bills or needs to improve unit economics. Read their current infrastructure and cost breakdown.

Domain Context

Based on AWS, Google Cloud, and Azure cost optimization practices:

  • Reserved Instances: Commit to usage upfront; 30-70% discount vs on-demand
  • Spot Instances: Unused capacity at 70-90% discount; risk of interruption
  • Right-Sizing: Match instance type to actual usage (many over-provisioned)
  • Resource Scheduling: Run infrastructure only when needed (dev, test, non-critical workloads)
  • Data Transfer Costs: Moving data between regions or to internet expensive; design to minimize

Instructions

  1. Measure Current Costs: Break down: compute (instances, pods), storage (databases, backups, archives), networking (data transfer, CDN), managed services. Identify top 3 cost drivers.

  2. Baseline Cost per Unit: Calculate cost per request, per transaction, per user. Enables comparing optimizations objectively.

  3. Identify Optimization Opportunities:

    • Compute: Right-size instances, use reserved/spot, schedule non-critical
    • Storage: Archive old data, compress backups, dedup
    • Transfer: Use CDN, minimize cross-region, batch transfers
    • Waste: Unused resources (old databases, unused backups, forgotten VMs)
  4. Model Impact: For each optimization, estimate savings and implementation effort. Prioritize by ROI (savings / effort).

  5. Implement & Monitor: Deploy changes. Measure cost reduction. Re-baseline and repeat.

Anti-Patterns

  • Chasing Lowest Cost: Use cheapest options (spot instances, no redundancy). Result: outages and data loss. Guard: Optimize cost subject to SLA constraints.
  • Over-Provisioning for Safety: Buy 10x capacity to "be safe." Result: wasted money. Guard: Monitor actual usage; right-size to p95 load.
  • Ignoring Total Cost of Ownership: Count compute but not operations. Result: hidden costs. Guard: Include all costs (instances, storage, monitoring, support, ops time).
  • One-Time Optimization: Cut costs once, never revisit. Result: costs creep back up. Guard: Quarterly cost review; treat as ongoing process.

Read the full file on GitHub · 52 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 · 52 lines · 25 tokens per session scan A 357557338f9e

Subscribe to this mod's changes

cost-optimization is a skill published in the GitHub repository sethdford/claude-skills (39 stars, last pushed 6mo ago), licensed MIT. It adds 25 tokens to every session and 598 once invoked, about $0.0001 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

agent-payment-x402

Add x402 payment execution to AI agents — per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents need to pay for APIs, services, or other agents.

majiang213/OpenClaw-MAS · 47 tokens

energy-procurement

Codified expertise for electricity and gas procurement, tariff optimization, demand charge management, renewable PPA evaluation, and multi-facility energy cost management. Informed by energy procurement managers with 15+ years experience at large commercial and industrial consumers. Includes market structure analysis…

majiang213/OpenClaw-MAS · 93 tokens

investor-materials

Create and update pitch decks, one-pagers, investor memos, accelerator applications, financial models, and fundraising materials. Use when the user needs investor-facing documents, projections, use-of-funds tables, milestone plans, or materials that must stay internally consistent across multiple fundraising assets.

majiang213/OpenClaw-MAS · 61 tokens

enterprise-agent-ops

Operate long-lived agent workloads with observability, security boundaries, and lifecycle management.

majiang213/OpenClaw-MAS · 21 tokens

multi-tenant-architecture

Designs tenant isolation, hostname routing, custom-domain lifecycle, and plan limits on Cloudflare or Vercel. Use when asked to "isolate tenant data", "support custom domains", "build a white-label platform", or assess PSL registration. For general module structure use codebase-architecture; for SEO content use…

mblode/agent-skills · 74 tokens

saas-billing

Implement and audit SaaS billing systems, subscription state machines, secure webhooks, and local database synchronization / Implementasi dan audit sistem billing SaaS, state machine langganan, webhook aman, dan sinkronisasi database lokal.

roedyrustam/vibes-plug · 51 tokens