Claude Usage Report — Development skill for Claude Code
Claude Code stop hook: per-prompt usage report with token costs, context window, and rate limits.
How to install Claude Usage Report
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open abhiyankhanal/claude-usage-report and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Usage Report does
Claude Code stop hook: per-prompt usage report with token costs, context window, and rate limits.
Alternatives in Development
- Claude Usage — A local dashboard for tracking your Claude Code token usage, costs, and session history 864 ★
- Claude Dashboard — Comprehensive status line plugin for Claude Code with context usage, API rate limits, and cost tracking 258 ★
- Fire Cost — Track context usage, estimate session costs, and trigger strategic compaction 77 ★
README
claude-usage-report
A Claude Code stop hook that displays a usage summary after each prompt cycle.
────────────────────────────────────────────────────────
SESSION USAGE REPORT
────────────────────────────────────────────────────────
Duration: 1m 0s
Token Usage
Input: 141 Cache Write: 241.5k
Output: 21.0k Cache Read: 1.5M
Requests: 47 Cache Hit: 86%
Est. Cost: $ 0.5711 Session: $8.4136
Context Window
Total: [#######..................] 27.7% (55.4k / 1M)
Added: +5.2k (+2.6%)
Rate Utilized
5-Hour: [####.....................] 15.2% (resets in 3h 12m)
Weekly: [##.......................] 8.1% (resets in 5d 2h)
────────────────────────────────────────────────────────
Features
- Per-prompt metrics -- duration and cost reflect the last prompt cycle, not the full session
- Token breakdown -- input, output, cache write, cache read with cache hit rate
- Cost estimation -- per-prompt and session totals based on published Anthropic pricing
- Context window -- current fill percentage and how much was added in the last prompt
- Rate limits -- 5-hour and weekly utilization with reset countdowns (requires Claude login)
- Enable/disable -- toggle on and off without modifying settings
- Zero dependencies -- pure Node.js, reads Claude Code's own transcript data
Requirements
- Node.js 18+
- Claude Code CLI (authenticated via
claude login)
Installation
git clone https://github.com/abhiyankhanal/claude-usage-report.git
cd claude-usage-report
bash install.sh
The install script will:
- Copy
usage-report.mjsto~/.claude/hooks/ - Register the stop hook in
~/.claude/settings.json(or print instructions if settings already exist) - Install the
claude-usage-reportCLI to~/.local/bin/
Manual installation
If you prefer to install manually:
- Copy the hook script:
cp usage-report.mjs ~/.claude/hooks/usage-report.
Related Skills
CC Usage Band
Claude Code mods: usage-band shows your 5h/7d limits, context window and cache hit rate above the prompt
Conso Bar
The usage panel for Claude Code: rate limits, context, costs and live agents, in your language
Nextcost
See what your next Claude Code message costs: a live band above the prompt with the prompt-cache countdown, th
Claude Code Usage Quota Mod
Know your Claude limits before they hit you (Live band above the Claude Code prompt): 5 Hour and Weekly usage
Notch Crab
A pixel crab above your Claude Code prompt that acts out every hook, with bars for context and usage limits. A
Claude Token Weather
Claude Code mod: context-window forecast above the prompt with 5h/7d usage windows and session cost
Related Agents
Stats Analyzer
Analyzes ~/.claude/stats-cache.json and history.jsonl to produce a concise usage report with model token break
Context Optimizer
Meta utility agent for token and context optimization. Spawn when needing to compress agent prompts, optimize
Agent Harness Optimizer
Context window, token budget, and agent harness optimization specialist. Analyzes transcript bloat, tunes prom