cost-report · hoangsonww — Claude Code skill: what it does, how to install
Generates scoped CCAM token and spend reports by model, provider, source, and session. Useful for tracking agent costs and spotting unpriced usage.
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill cost-report -a claude-codeWhat cost-report does
The skill pulls cost metrics from Claude Code Agent Monitor (CCAM). First, the agent confirms the reporting period and any optional filters for provider, source, or session. It then queries GET /api/pricing/cost, GET /api/analytics, and the scoped session list.
The resulting breakdown includes total spend, model-mix stats, token directions, cache hit efficiency, and the most expensive sessions. Values are formatted in USD to four decimal places, while token counts remain integers. It also shows active pricing rules and rate tiers returned by the API.
The report relies entirely on accessible CCAM endpoints. If price data is missing for a model, the skill forbids treating it as zero cost; it must explicitly flag that usage as unpriced.
What it helps with
- review total token spending across models and providers
- identify the highest-cost agent sessions
- measure cache efficiency across LLM queries
- detect model usage that lacks pricing data
Example prompts for the agent
- Generate a CCAM cost report for the past 24 hours grouped by model.
- Show the highest-cost sessions and check cache efficiency for recent runs.
- Summarize token usage and spend for Anthropic models using four decimal places.
How to install cost-report
1Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill cost-report -a claude-code2Manually: put the files in place
~/.claude/skills/cost-report/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/cost-report/
1Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill cost-report -a codex2Manually: put the files in place
.agents/skills/cost-report/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill cost-report -a cursor2Manually: put the files in place
.cursor/skills/cost-report/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install hoangsonww/Claude-Code-Agent-Monitor cost-report2Manually: put the files in place
.github/skills/cost-report/SKILL.md1Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill cost-report -a gemini-cli2Platform CLI
gemini skills install https://github.com/hoangsonww/Claude-Code-Agent-Monitor --path plugins/ccam-reports/skills/cost-reportManually: put the files in place
.devin/skills/cost-report/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill cost-report -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about cost-report
How to install cost-report in Claude Code?
Run npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill cost-report -a claude-code in your terminal. You can also place the skill file directly at ~/.claude/skills/cost-report/SKILL.md.
What does the cost-report skill do?
It queries CCAM pricing and analytics endpoints to generate structured breakdowns of token consumption, dollar costs, cache performance, and top sessions.
How does cost-report handle models without pricing rules?
It prevents unpriced models from being displayed as free. Instead, the skill explicitly labels them as unpriced in the report.
Source text
SKILL.md · MIT
--- name: cost-report description: > Produce a scoped CCAM cost and token report by model, provider, source, and session. Use for spend reviews, model-mix analysis, unpriced usage detection, or export-friendly cost summaries. --- # Cost Report 1. Confirm the time window and optional provider, source, or session scope. 2. Read `GET /api/pricing/cost`, `GET /api/analytics`, and the scoped session list. 3. Show total cost, model breakdown, token directions, cache efficiency, unpriced models, and the highest-cost sessions. 4. State the pricing rule and rate tier used when returned by the API. 5. Use USD with four decimal places and integer token counts. 6. Do not estimate missing prices as zero-cost usage without labeling them unpriced.
© hoangsonww · MIT · hoangsonww/Claude-Code-Agent-Monitor
Similar skills
All skills for Agent setup: memory, context, orchestration →cost-report by other authors comes first.