/ccam-cost-guard:model-savingsfrom ccam-cost-guard
Estimates cost savings from routing eligible Claude Code work to cheaper model families using Agent Monitor pricing data. Useful for cost optimization and model tier comparison.
Ships in ccam-cost-guard. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Quantify how much spend you would recover by moving eligible work to a cheaper model.
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.
| 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 |
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.cache_read_per_mtok
+ (cache_write_tokens/ 1M) × target.cache_write_per_mtok
savings = current_model_cost − cost_at_target
Pull target.*_per_mtok from /api/pricing (longest model_pattern match wins). Default rates ($/Mtok in/out/cacheRead/cacheWrite): Opus $5/$25/$0.50/$6.25, Sonnet $3/$15/$0.30/$3.75, Haiku $1/$5/$0.10/$1.25.
Re-pricing the full token mix is the theoretical ceiling. Scope it to eligible work:
metadata.turn_count small) and simple subagent/tool work are safe to downshift.Table from /api/pricing/cost: each model, its 4 token counts, and current cost. Note its share of total_cost.
For each candidate, show cost_at_target and savings (absolute $ and %). Make the target rate card explicit.
Apply the eligibility rule and recompute savings over just the downshiftable token mix. Show how many sessions / what share of tokens qualified.
Rank routing moves by eligible monthly savings (descending), top 5. For each: source → target, the token mix moved, estimated $ saved, and a confidence level (high/medium/low) based on how clearly the work is low-complexity.
Cheaper models may need more turns or produce more output — note that realized savings can be lower than the static re-price, and that quality-sensitive work should stay on the premium tier.
Markdown tables. Currency as USD to 4 decimal places; token counts with thousands separators; rates as $/Mtok. Always present both the ceiling (full re-price) and the eligible-only estimate so the number is honest.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
cost-savings, model-routing, pricing-analysis, agent-monitor
5 skills in this plugin
/budget-setDefine a spend budget for Claude Code and, optionally, create a cost alert rule that fires when usage crosses the limit, via POST /api/alerts/rules on the Agent Monitor dashboard. Reads current spend from /api/pricing/cost to size the budget sensibly and explains every rule field before writing. Use when setting a spend limit or wiring up a budget guardrail.
/cost-alertReview the configured cost alert rules and the alerts currently fired on the Agent Monitor dashboard, then explain exactly what tripped and why. Uses /api/alerts (fired feed) and /api/alerts/rules (definitions). Use when checking spend alerts or asking why a cost alarm went off.
/daily-budget-checkRun a daily spend check-in against a daily budget on the Agent Monitor dashboard — today's spend vs the daily target, pace through the day, and the projected overage if the current pace holds. Uses /api/pricing/cost and /api/sessions (grouped by started_at = today). Use for a quick daily spend check-in or a morning/evening budget pulse.
/spend-forecastForecast Claude Code spend to the end of the week or month from the daily session trend on the Agent Monitor dashboard — moving average of daily spend × days remaining, added to spend-to-date. Uses /api/analytics daily_sessions, /api/pricing/cost, and /api/sessions for a per-day cost curve. Use when projecting cost or asking "where will my spend land".
npx claudepluginhub hoangsonww/claude-code-agent-monitor --plugin ccam-cost-guard5 plugins ship this exact skill · first indexed Aug 10, 2026
Other plugins' skills for the same job