model-savings

Solid

Estimate the dollars saved by routing eligible Claude Code work to a cheaper model family, using the Agent Monitor pricing engine. Re-prices each model's token mix at the target family's rates and quantifies the delta. Uses /api/pricing (rates), /api/pricing/cost (current per-model spend), /api/sessions, and /api/analytics. Use when hunting for cost cuts or comparing model tiers.

AI & Automation 850 stars 193 forks Updated today MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
98
Recency 20%
100
Frontmatter 20%
40
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Model Savings Quantify how much spend you would recover by moving eligible work to a cheaper model. ## Input The user provides: **$ARGUMENTS** This is the routing question — e.g. `"Opus → Sonnet"`, `"move simple work to Haiku"`, or empty (analyze every premium model against the next tier down). If no target family is named, default to proposing the next-cheaper tier per model and say so. ## Data Sources | Endpoint | Returns | |----------|---------| | `GET /api/pricing` | `{ pricing: [{ model_pattern, display_name, input_per_mtok, output_per_mtok, cache_read_per_mtok, cache_write_per_mtok }] }` — the rate card for every family | | `GET /api/pricing/cost` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` — current spend and the exact token mix per model | | `GET /api/sessions?limit=200` | Sessions with `model`, inline `cost`, and `metadata` (turn_count, thinking_blocks) — used to judge which work is *eligible* to downshift | | `GET /api/analytics` | `agent_types`, `tool_usage`, `total_subagents` — corroborate which task types are low-complexity and safe to route cheaper | ## Savings method For each candidate model in the cost `breakdown`, re-price its **exact token mix** at the target family's rates: ``` cost_at_target = (input_tokens / 1M) × target.input_per_mtok + (output_tokens / 1M) × target.output_per_mtok + (cache_read_tokens / 1M) × target.ca...

Details

Author
hoangsonww
Repository
hoangsonww/Claude-Code-Agent-Monitor
Created
4 months ago
Last Updated
today
Language
TypeScript
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category