claude-usage-analyst
Analyze Claude Code and Claude Desktop Code token usage, cost, quota burn, model mix, cache read/write, and 5-hour block consumption using ccusage evidence. Use when the user asks why Claude quota was exhausted, whether a model such as fable/opus/sonnet is unusually expensive, how many tokens were spent today or historically, or needs a human-friendly explanation of local Claude Code CLI/Desktop usage.
How do I install this agent skill?
npx skills add https://github.com/daymade/claude-code-skills --skill claude-usage-analystIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill is safe. it provides tools to analyze local Claude Code token usage and costs by interfacing with the ccusage CLI utility. It follows secure practices for command execution and utilizes standard package registries for its dependencies.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Claude Usage Analyst
Overview
Use this skill to produce evidence-based usage explanations from local ccusage data. Separate observed numbers from interpretation, and explain quota burn in human terms.
Workflow
-
Verify
ccusageis available:ccusage --versionIf missing, install or update with
npm install -g ccusage@latestor run withnpx ccusage@latest. -
Run the bundled analyzer for the requested window:
python3 /path/to/claude-usage-analyst/scripts/analyze_claude_usage.py \ --since YYYY-MM-DD --until YYYY-MM-DD --timezone Asia/ShanghaiDefault
--since/--untilis today in the selected timezone. For historical comparison, set--sinceto an earlier date such as the first day of the month; otherwise rank/median fields only describe the single target day. -
If the user asks about a specific model comparison, pass aliases:
python3 scripts/analyze_claude_usage.py --model-a fable --model-b opus-4-8 -
Read
references/explanation-guide.mdwhen writing the final answer.
Evidence Rules
- Base numeric claims on
ccusageoutput or the bundled analyzer output. - State the scope:
ccusage claudemeasures local Claude Code usage logs, including Claude Desktop's Claude Code sessions when those local logs exist. It is not a complete ordinary Claude.ai chat bill. - Report dates with timezone.
- Explain cache clearly: cache read tokens are still usage/quota pressure even though the user did not type those words.
- Do not infer Anthropic plan quota rules from local token counts unless the user provides plan details. Say "quota-like pressure" or "ccusage estimated cost/token burn" when exact plan accounting is unknown.
- When comparing models, compare both token volume and estimated cost. A model can have similar token volume but higher cost.
Output Shape
Use this structure unless the user asks otherwise:
- Short conclusion in plain language.
- Evidence table: total tokens, cost, input, output, cache create, cache read.
- Model comparison table.
- 5-hour block table when quota exhaustion is discussed.
- Explanation of why the burn happened.
- Confidence and caveats.
Keep the answer readable for non-technical users. Avoid unexplained terms like "cache read" without a one-sentence translation.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/daymade/claude-code-skills/claude-usage-analyst">View claude-usage-analyst on skillZs</a>