Skip to main content
command CX Codex

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

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/ccusage-daily.md
Open on GitHub

What 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 -b and 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.md

Call it with /ccusage-daily. For all projects use ~/.claude/commands/

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

Similar slash commands

All slash commands for Data and databases →

From the same set35

The whole set →
08_csv_transform 08_csv_transform aggregates tabular order entries into customer spending totals and returns raw CSV without conversational filler. GP ChatGPT ★ 2,744repo stars 04_stack_trace_debug The 04_stack_trace_debug prompt asks Claude Code to find the cause of a Python stack trace, identify the failing call, and suggest a fix. Use it when you need a compact diagnosis. GP ChatGPT ★ 2,744repo stars 07_json_reshape 07_json_reshape — a prompt that rebuilds a JSON sample against a fixed rubric and returns nothing but parseable JSON. GP ChatGPT ★ 2,744repo stars 03_code_review 03_code_review — a prompt for reviewing Python diffs. It forces Claude to return exactly three concrete issues as a bulleted list without conversational filler. GP ChatGPT ★ 2,744repo stars create-readme-section The create-readme-section command for Claude Code generates README sections based on project files. Create installation instructions, API references, or contribution guides. CX Codex +1 ★ 2,744repo stars 01_claudemd_summarise 01_claudemd_summarise — a Claude Code prompt that compresses CLAUDE.md documentation into exactly 120 words in a single paragraph, without headings or lists. Use it to standardize project architecture summaries for AI coding context. GP ChatGPT ★ 2,744repo stars security-audit The security-audit command scans a codebase for vulnerabilities and unsafe patterns across a project or a specific module. CX Codex +1 ★ 2,744repo stars check-best-practices The check-best-practices command reviews code against language-specific standards, conventions, and best practices. It spots issues from critical bugs to style violations and suggests concrete improvements. CX Codex +1 ★ 2,744repo stars

Project sponsors

Companies that keep this analytics open