ccusage-daily — Claude Code command: usage cost report
This command runs ccusage daily -b and turns Claude Code usage figures into a Markdown report. Use it to review costs, token totals, and daily spending.
MIT ★ 2,744 updated 2026-10-08
.claude/commands/ccusage-daily.mdWhat ccusage-daily does
The command executes ccusage daily -b, parses its output, and builds a structured Markdown report. It summarizes total cost, date range, usage days, average and peak spending for Sonnet and Opus, plus a cache efficiency assessment.
Tables break down token counts and costs by model and date. The daily table focuses on the highest-cost days. The report also discusses token distribution, the primary model, usage trends, and cost and cache observations based on the results.
Everything comes from the output of ccusage daily -b; the report does not draw usage figures from other sources. The result is formatted as Markdown.
What it helps with
- summarize Claude Code spending for a period
- compare costs for Sonnet and Opus
- spot days with the highest usage costs
- review cached token share
- break down token use by model and date
Example prompts for the agent
- Run
ccusage daily -band prepare a Markdown report on my Claude Code costs. - Compare Sonnet and Opus spending using
ccusage daily -b. - Review daily costs and highlight the most expensive usage days.
How to install ccusage-daily
Manually: put the files in place
.claude/commands/ccusage-daily.mdCall it with /ccusage-daily. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/ccusage-daily.mdCall it with /prompts:ccusage-daily. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/ccusage-daily.prompt.mdManually: put the files in place
.gemini/commands/ccusage-daily.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about ccusage-daily
How do I install ccusage-daily in Claude Code?
Save the command as .claude/commands/ccusage-daily.md.
What does ccusage-daily do?
It runs ccusage daily -b and formats the resulting Claude Code usage and cost figures as a Markdown report.
What does the ccusage-daily report include?
It covers model and daily costs, token counts, average and peak spending, cache efficiency, and usage trends.
Source text
ccusage-daily.md · MIT
Please run the `ccusage daily -b` command and then provide a structured markdown summary of the Claude Code usage costs and statistics. ## Required Actions: 1. Execute `ccusage daily -b` using the Bash tool 2. Parse the output to extract key metrics and statistics 3. Generate a comprehensive markdown report ## Report Format Required: ### Executive Summary - Total cost for the period - Date range covered - Number of usage days - Average daily cost for sonnet - Average daily cost for opus - Average daily cost for sonnet + opus - Peak usage day and cost for sonnet - Peak usage day and cost for opus - Peak usage day and cost for sonnet + opus - Cache efficiency percentage ### Key Statistics Table A markdown table with usage broken down by model and model totals: - Total Tokens (in millions i.e. 1,234,567 reported as 1.2345 m) - Input Tokens (in millions i.e. 1,234,567 reported as 1.2345 m) - Output Tokens (in millions i.e. 1,234,567 reported as 1.2345 m) - Cache Read Tokens (in millions i.e. 1,234,567 reported as 1.2345 m) - Total Cost - Average Daily Cost ### Daily Cost Summary Table A compact markdown table showing: - Date (in MM-DD format) - Model used - Input tokens (in millions i.e. 1,234,567 reported as 1.2345 m) - Output tokens (in millions i.e. 1,234,567 reported as 1.2345 m) - Cache read tokens (in millions i.e. 1,234,567 reported as 1.2345 m) - Total cost for that day Limit to the top 15-20 highest cost days to keep the table manageable. ### Usage Insights Provide analysis including: - Number of high usage days (over $20) - Cache effectiveness assessment - Token distribution breakdown - Primary model identification - Usage patterns and trends ### Recommendations Based on the data, provide: - Cost management insights - Cache optimization observations - Usage pattern analysis Please format everything in clean, readable markdown with proper tables and bullet points. Focus on actionable insights and clear presentation of the cost and usage data.
© centminmod · MIT · centminmod/my-claude-code-setup