
Cost Breakdown
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-codeInstalls 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
| Endpoint | Returns |
|---|---|
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/cost | Total 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=200 | Sessions list — each includes inline cost field (bulk pricing) |
GET /api/analytics | Token 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- Daily Standup
- Dashboard Status
- Data Export
- Debug Live Issue
- Health Check
- Hook Diagnostics
- Mcp Maintainer
- Mcp Operations
- Optimization Suggest
- Pattern Detect
- Productivity Score
- Quick Stats
- Release Guard
- Repo Onboarding
- Session Compare
- Session Debug
- Session Report
- Ship Feature
- Sprint Summary
- Usage Trends
- Weekly Report
- Workflow Optimizer
- Anomaly Alert