Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill cost-report -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/cost-report/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/cost-report/

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.

From the same set60

run-agent This skill starts Claude or Claude runs through the local CCAM Run API and keeps an eye on them from the chat. CX Codex +1 ★ 1,121repo stars workflow-report Creates workflow intelligence reports from CCAM orchestration and delegation data. Surfaces tool bottlenecks, concurrency, and context compaction. CX Codex +1 ★ 1,121repo stars reliability-report This skill reviews CCAM session outcomes, hook events, alerts, and tool failures to produce a reliability report. Use it for health reviews or incident follow-up. CX Codex +1 ★ 1,121repo stars executive-report Turns CCAM sessions, analytics, cost and alerts into one stakeholder report. Handy before a release or a leadership update. CX Codex +1 ★ 1,121repo stars slo-check Turns Agent Monitor events into an SLO scorecard for session completion, tool calls, and API errors. Use it to compare results with targets and track remaining error budget. CX Codex +1 ★ 1,121repo stars regression-alert Compares agent reliability this period against the last one and flags where it got worse. Handy when you need to know if things degraded. CX Codex +1 ★ 1,121repo stars hook-failure-audit Audits hook delivery health using Agent Monitor metrics, tracking unreturned tool calls, unclosed subagents, and stalled ingestion pipelines. CX Codex +1 ★ 1,121repo stars error-scan Scans recent Claude Code sessions for API errors and unfinished tool calls, then ranks failures by tool and model. Useful when you need to see what is breaking. CX Codex +1 ★ 1,121repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor