Skills for Real Engineers. Straight from my .agents directory.
cost-breakdown
Agent skill fromhoangsonww/Claude-Code-Agent-Monitor
Break down Claude Code costs using the Agent Monitor pricing engine. Shows per-model costs (input, output, cache_read, cache_write at $/Mtok rates), per-session costs, daily trends, and compaction baseline token recovery. Use when analyzing spending, comparing model costs, or planning budgets.
How to install cost-breakdown
npx skills add hoangsonww/Claude-Code-Agent-Monitor# or add only this skill to Claude Code: copy the folder
plugins/ccam-analytics/skills/cost-breakdown/
# into
~/.claude/skills/cost-breakdown/ (all projects)
.claude/skills/cost-breakdown/ (one project)
1# Cost Breakdown23Detailed cost analysis from the Agent Monitor's pricing engine.45## Input67The user provides: **$ARGUMENTS**89This may be: "today", "this week", "last 30 days", a session ID, or "budget $50/week".1011## Data Sources1213| Endpoint | Returns |14|----------|---------|15| `GET /api/pricing` | `{ pricing: [{ model_pattern, display_name, input_per_mtok, output_per_mtok, cache_read_per_mtok, cache_write_per_mtok }] }` |16| `GET /api/pricing/cost` | Total cost: `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` |17| `GET /api/pricing/cost/{sessionId}` | Per-session cost with same breakdown shape |18| `GET /api/sessions?limit=200` | Sessions list — each includes inline `cost` field (bulk pricing) |19| `GET /api/analytics` | Token totals (total_input, total_output, total_cache_read, total_cache_write — baselines pre-summed), daily trends |2021### How costs are calculated2223The 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:2425```26cost = (input_tokens / 1M) × input_per_mtok27 + (output_tokens / 1M) × output_per_mtok28 + (cache_read_tokens / 1M) × cache_read_per_mtok29 + (cache_write_tokens / 1M) × cache_write_per_mtok30```31…
Excerpt shown under the repository's MIT license.
More skills in Claude-Code-Agent-Monitor
Similar skill repositories
An agentic skills framework & software development methodology that works.
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
