cost-optimization

cost-optimization is a skill for Claude Code from camilooscargbaptista/cto-toolkit. It costs 117 tokens per session (1,754 once invoked), scanned A, original, MIT.

A guide to FinOps, the practice of understanding, managing, and improving cloud spending. It covers cost visibility, resource usage, allocation tags, and savings opportunities.

In plain words
What is it for?
Use it to analyze AWS, GCP, or Azure costs, find idle resources, right-size infrastructure, examine data-transfer charges, and set up spending governance.
Why use it?
It helps connect cloud bills to services, teams, products, and environments, making waste and unexpected costs easier to investigate.

Skill for Claude Code

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

Part of the cto-toolkit plugin — 54 skills, 6 agents, 3 hooks shipped together

Good fit Use it to analyze AWS, GCP, or Azure costs, find idle resources, right-size infrastructure, examine data-transfer charges, and set up spending governance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/camilooscargbaptista/cto-toolkit/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 camilooscargbaptista/cto-toolkit --skill cost-optimization
Clone the repo
git clone --depth 1 https://github.com/camilooscargbaptista/cto-toolkit

Made for: Claude Code.

Or install cto-toolkit, the plugin that ships this one along with the rest of its 54 skills, 6 agents, 3 hooks.

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/camilooscargbaptista/cto-toolkit/cost-optimization/github.svg)](https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/cost-optimization)
Your own site
<a href="https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/cost-optimization"><img src="https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/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/camilooscargbaptista/cto-toolkit/cost-optimization"><img src="https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/cost-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,754 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.00117 $0.01754
Opus 5.5 $0.00047 $0.00702
Sonnet 5.5 $0.00023 $0.00351
Haiku 4.5 $0.00012 $0.00175

Measured 1mo ago against content hash 4cc50b891f3d, 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 1mo 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.

cost-optimization/SKILL.md · 197 lines

How it starts

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

Cloud Cost Optimization & FinOps

You are a FinOps practitioner helping engineering teams understand, optimize, and govern cloud spending. The goal is not to minimize cost at all costs — it's to maximize value per dollar spent.

The FinOps Framework

FinOps operates in three phases:

Inform → Understand where money goes Optimize → Take action to reduce waste Operate → Continuous governance and culture

Phase 1: Inform — Cost Visibility

Cost Analysis Checklist

When analyzing cloud costs, gather:

  1. Total monthly spend and trend (last 3-6 months)
  2. Top 10 cost drivers by service (EC2, RDS, Lambda, S3, etc.)
  3. Cost per environment (production, staging, dev, sandbox)
  4. Cost per team/product (via tags/labels)
  5. Idle resources (unattached EBS volumes, stopped instances still paying for storage, unused Elastic IPs, empty load balancers)
  6. Data transfer costs (often the hidden killer)

Cost Allocation Tags

Every resource should have at minimum:

Environment: production | staging | dev | sandbox
Team: backend | frontend | data | platform
Product: [product-name]
CostCenter: [business-unit]
ManagedBy: terraform | manual | cdk

Without tags, you're flying blind. Untagged resources are the first problem to solve.

Unit Economics

Track cost per business metric, not just total cost:

  • Cost per API request
  • Cost per active user per month
  • Cost per transaction processed
  • Cost per GB stored
  • Cost per CI/CD pipeline run

These metrics tell you if costs are growing proportionally to business value or out of control.

Phase 2: Optimize — Quick Wins

1. Eliminate Waste (immediate savings, low risk)

Idle Resources

  • Unattached EBS volumes → delete or snapshot
  • Stopped EC2 instances with EBS → evaluate, terminate if unused for 30+ days
  • Unused Elastic IPs → release
  • Empty/unused load balancers → delete
  • Old snapshots and AMIs → lifecycle policy
  • Unused NAT Gateways → consolidate or remove

Dev/Staging Environments

  • Schedule non-prod instances to stop outside business hours (save ~65%)
  • Use smaller instance types for non-prod
  • Consider spot instances for dev workloads
  • Auto-delete preview/PR environments after merge

Read the full file on GitHub · 197 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. 1mo ago First seen · 197 lines · 117 tokens per session scan A 4cc50b891f3d

Subscribe to this mod's changes

cost-optimization is a skill published in the GitHub repository camilooscargbaptista/cto-toolkit (7 stars, last pushed 7mo ago), licensed MIT. It adds 117 tokens to every session and 1,754 once invoked, about $0.0005 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-08-31.

Related

Other skills, from other repositories

finops-expert

Expert-level cloud financial operations, cost optimization, and cloud economics. Use when the user mentions cloud cost, optimization, cloud economics, or AWS cost, or when the task involves FinOps Fundamentals, Cost Management, FinOps Practices, or Cost Visibility.

personamanagmentlayer/pcl · 55 tokens

cost-check

Estimate the monthly cost of a Pulumi or Terraform project with the FinFocus CLI, flag expensive resources, cost increases, and total cost against thresholds in .cost-check.yml, and write a COSTCHECK.md report. Reads machine-readable JSON, checks the CLI version, and names what to do when the CLI, a plugin…

rshade/finfocus · 131 tokens

cost-drift

Compare actual and projected spend for a Pulumi stack with the FinFocus CLI, flag drifting resources against thresholds in .cost-check.yml, explain likely causes, track the trend, and write a COSTDRIFT.md report. Reads machine-readable JSON, checks the CLI version, and names what to do when the CLI, a billing plugin…

rshade/finfocus · 134 tokens

data-cost-optimization

Use this skill when asked about data cost optimization, Snowflake cost management, BigQuery slot management, S3 storage tiering, warehouse cost optimization, FinOps for data, cloud data cost reduction, or query cost analysis. This skill enforces: Snowflake credit usage analysis with query optimization, BigQuery slot…

j4flmao/agent-skills · 138 tokens

finfocus-budget

Configure, check, and troubleshoot FinFocus budget thresholds. Use when setting cost.budgets in config.hujson, reading budget health, filtering scopes with --budget-scope, or making cost projected, cost actual, or overview exit non-zero in CI. Triggers on: "finfocus budget", "budget threshold", "exit-on-threshold"…

rshade/finfocus · 98 tokens

finfocus-plugin-dev

Implement and maintain a FinFocus cost plugin in a repository scaffolded by finfocus plugin init. Use when adding or changing pricing logic in a plugin, adding a resource type, writing the Supports handler, returning GetProjectedCost or GetActualCost results, testing a plugin locally against a Pulumi plan, or…

rshade/finfocus · 157 tokens