cost-optimization

cost-optimization is a skill for Claude Code from wshobson/agents. It costs 48 tokens per session (1,664 once invoked), scanned A, original, MIT.

A guide to reducing spending on cloud infrastructure across AWS, Azure, Google Cloud, and Oracle Cloud. It explains how to track usage, adjust resource sizes, and choose suitable pricing plans.

In plain words
What is it for?
Use it to review cloud bills, right-size resources, remove idle infrastructure, set budget alerts, and compare reserved, spot, or committed-use pricing.
Why use it?
It helps find wasted spending from oversized, idle, or poorly managed cloud resources while keeping required performance. It also provides a structure for budgets, tagging, and cost oversight.

Skill for Claude Code

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

Part of the cloud-infrastructure plugin — 8 skills, 3 agents shipped together

not rated 43krepo +162 2d ago A scan Socket: passSnyk: passSkillSpector: pass 48 tokens original MIT

Good fit Use it to review cloud bills, right-size resources, remove idle infrastructure, set budget alerts, and compare reserved, spot, or committed-use pricing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wshobson/agents/cost-optimization
About the project

Agentic Plugin Marketplace is a collection of reusable plugins, agents, skills, commands, and rules for coding-agent tools including Claude Code, Codex CLI, Cursor, OpenCode, Antigravity CLI, and GitHub Copilot. It is for developers assembling agentic workflows across multiple harnesses from shared Markdown sources, and the catalogue entries are examples or subsets of those workflow components.

wshobson/agents · 43,225 stars · on GitHub · sethhobson.com

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 wshobson/agents --skill cost-optimization
Clone the repo
git clone --depth 1 https://github.com/wshobson/agents

Made for: Claude Code.

Or install cloud-infrastructure, the plugin that ships this one along with the rest of its 8 skills, 3 agents.

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/wshobson/agents/cost-optimization/github.svg)](https://agentmods.dev/skills/wshobson/agents/cost-optimization)
Your own site
<a href="https://agentmods.dev/skills/wshobson/agents/cost-optimization"><img src="https://agentmods.dev/badge/skills/wshobson/agents/cost-optimization/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cost-optimization

Your own site · 80×15
<a href="https://agentmods.dev/skills/wshobson/agents/cost-optimization"><img src="https://agentmods.dev/badge/skills/wshobson/agents/cost-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,664 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. Third-party audits
  • Socket pass 15 Sept 2026
  • Snyk pass 15 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00048 $0.01664
Opus 5.5 $0.00019 $0.00666
Sonnet 5.5 $0.00010 $0.00333
Haiku 4.5 $0.00005 $0.00166

Measured 3mo ago against content hash ee0bd8b8054a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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.

Origin

Copies of this mod

8 near-identical copies found in the catalogue:

plugins/cloud-infrastructure/skills/cost-optimization/SKILL.md · 314 lines

How it starts

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

Cloud Cost Optimization

Strategies and patterns for optimizing cloud costs across AWS, Azure, GCP, and OCI.

Purpose

Implement systematic cost optimization strategies to reduce cloud spending while maintaining performance and reliability.

When to Use

  • Reduce cloud spending
  • Right-size resources
  • Implement cost governance
  • Optimize multi-cloud costs
  • Meet budget constraints

Cost Optimization Framework

1. Visibility

  • Implement cost allocation tags
  • Use cloud cost management tools
  • Set up budget alerts
  • Create cost dashboards

2. Right-Sizing

  • Analyze resource utilization
  • Downsize over-provisioned resources
  • Use auto-scaling
  • Remove idle resources

3. Pricing Models

  • Use reserved capacity
  • Leverage spot/preemptible instances
  • Implement savings plans
  • Use committed use discounts

4. Architecture Optimization

  • Use managed services
  • Implement caching
  • Optimize data transfer
  • Use lifecycle policies

AWS Cost Optimization

Reserved Instances

Savings: 30-72% vs On-Demand
Term: 1 or 3 years
Payment: All/Partial/No upfront
Flexibility: Standard or Convertible

Savings Plans

Compute Savings Plans: 66% savings
EC2 Instance Savings Plans: 72% savings
Applies to: EC2, Fargate, Lambda
Flexible across: Instance families, regions, OS

Spot Instances

Savings: Up to 90% vs On-Demand
Best for: Batch jobs, CI/CD, stateless workloads
Risk: 2-minute interruption notice
Strategy: Mix with On-Demand for resilience

S3 Cost Optimization

resource "aws_s3_bucket_lifecycle_configuration" "example" {
  bucket = aws_s3_bucket.example.id

  rule {
    id     = "transition-to-ia"
    status = "Enabled"

    transition {
      days          = 30
      storage_class = "STANDARD_IA"
    }

    transition {
      days          = 90
      storage_class = "GLACIER"
    }

    expiration {
      days = 365
    }
  }
}

Azure Cost Optimization

Reserved VM Instances

  • 1 or 3 year terms
  • Up to 72% savings
  • Flexible sizing
  • Exchangeable

Read the full file on GitHub · 314 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. 3mo ago First seen · 314 lines · 48 tokens per session scan A ee0bd8b8054a

Subscribe to this mod's changes

cost-optimization is a skill published in the GitHub repository wshobson/agents (43,225 stars, last pushed 2d ago), licensed MIT. It adds 48 tokens to every session and 1,664 once invoked, about $0.0002 per session on Opus 5.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-09-03.

Related

cost-optimization compared with skills from other repositories

cost-optimization next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cost-optimizationwshobson/agentsSkill43k2d agoMITA48Claude Code
relay-deploytonone-ai/tononeSkill85todayMITA48Claude Code
forge-costtonone-ai/tononeSkill85todayMITA58Claude Code
forge-infratonone-ai/tononeSkill85todayMITA53Claude Code
forge-recontonone-ai/tononeSkill85todayMITA53Claude Code
flux-recontonone-ai/tononeSkill85todayMITA48Claude Code
forge-audittonone-ai/tononeSkill85todayMITA54Claude Code