If you've ever wondered where your Claude Code budget actually goes, this is the skill to run. It pulls from the Agent Monitor's pricing engine to show per-model costs broken down by input, output, cache reads, and cache writes at the $/Mtok level. You get the top 10 most expensive sessions, daily spend trends, and cache hit rates that reveal whether you're reusing context or burning tokens. The best part is the optimization section, which flags sessions where you wrote cache tokens but never read them, or where you used Opus for something Haiku could handle. It's basically a finance report for your API spend, and it surfaces the stuff you'd never notice just watching the dashboard.

GitHub stars
455
last updated
Jun 11, 2026

Install

$ npx -y skills add hoangsonww/claude-code-agent-monitor --skill cost-breakdown --agent claude-code

Installs into .claude/skills of the current project.

Files

Cost Breakdown

Detailed cost analysis from the Agent Monitor's pricing engine.

Input

The user provides: $ARGUMENTS

This may be: "today", "this week", "last 30 days", a session ID, or "budget $50/week".

Data Sources

EndpointReturns
GET /api/pricing{ pricing: [{ model_pattern, display_name, input_per_mtok, output_per_mtok, cache_read_per_mtok, cache_write_per_mtok }] }
GET /api/pricing/costTotal cost: { total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }
GET /api/pricing/cost/{sessionId}Per-session cost with same breakdown shape
GET /api/sessions?limit=200Sessions list — each includes inline cost field (bulk pricing)
GET /api/analyticsToken totals (total_input, total_output, total_cache_read, total_cache_write — baselines pre-summed), daily trends

How costs are calculated

The pricing engine matches model names against model_pattern using SQL LIKE (e.g. claude-sonnet-4-5% matches claude-sonnet-4-5-20250514). Longest pattern wins for specificity. Cost per model:

Sponsors

Details

Repository
github.com/hoangsonww/claude-code-agent-monitor
Categories
DevOps & CI/CD, AI & Agent Building
License
MIT
First seen
Jun 11, 2026

More from hoangsonww/claude-code-agent-monitor

All 24
1hoangsonww avatardaily-standuphoangsonww/claude-code-agent-monitor>0skills.sh installs
2hoangsonww avatardata-exporthoangsonww/claude-code-agent-monitor>0skills.sh installs
3hoangsonww avatarhealth-checkhoangsonww/claude-code-agent-monitor>0skills.sh installs
4hoangsonww avatarhook-diagnosticshoangsonww/claude-code-agent-monitor>0skills.sh installs
5hoangsonww avataroptimization-suggesthoangsonww/claude-code-agent-monitor>0skills.sh installs
6hoangsonww avatarpattern-detecthoangsonww/claude-code-agent-monitor>0skills.sh installs