tldr-stats — Claude Code skill: token usage and TLDR savings
Shows what a session cost in tokens and dollars, how much TLDR compression saved, and whether the hooks ran.
npx skills add parcadei/Continuous-Claude-v3 --skill tldr-stats -a claude-codeWhat tldr-stats does
The skill runs python3 $CLAUDE_PROJECT_DIR/.claude/scripts/tldr_stats.py and tells the agent to paste the whole output into the reply, so the dashboard lands in the chat instead of scrolling past in a terminal. It covers tokens sent and received, prompt cache reuse, TLDR savings, cache hits on parsed files, hook calls and daemon uptime.
Cost estimates use Opus $15/1M, Sonnet $3/1M and Haiku $0.25/1M. Savings scale with file size — big files get compressed harder. The cache hit rate starts near zero and climbs as you re-read the same files.
The script lives at .claude/scripts/tldr_stats.py inside the project, so in a repo without that file the command finds nothing. That is the first thing to check when the numbers look wrong.
What it helps with
- see the real dollar cost of a session
- check how many tokens TLDR compression saved
- confirm the hooks are actually firing
- compare spend before and after enabling TLDR
- find out which model handled the work
Example prompts for the agent
- show me the session stats
- how much did I spend and how much did TLDR save
- run tldr_stats and paste the full dashboard
How to install tldr-stats
1Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill tldr-stats -a claude-code2Manually: put the files in place
~/.claude/skills/tldr-stats/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/tldr-stats/
1Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill tldr-stats -a codex2Manually: put the files in place
.agents/skills/tldr-stats/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill tldr-stats -a cursor2Manually: put the files in place
.cursor/skills/tldr-stats/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install parcadei/Continuous-Claude-v3 tldr-stats2Manually: put the files in place
.github/skills/tldr-stats/SKILL.md1Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill tldr-stats -a gemini-cli2Platform CLI
gemini skills install https://github.com/parcadei/Continuous-Claude-v3 --path .claude/skills/tldr-statsManually: put the files in place
.devin/skills/tldr-stats/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill tldr-stats -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about tldr-stats
How do I install tldr-stats in Claude?
Run npx skills add parcadei/Continuous-Claude-v3 --skill tldr-stats -a claude-code. The skill lands at ~/.claude/skills/tldr-stats/SKILL.md.
What does tldr-stats do?
It runs the stats script and prints a dashboard with token usage, session cost, TLDR savings, cache hits and hook activity.
Why does the script fail to run?
It expects .claude/scripts/tldr_stats.py inside the project. Without that file the command has nothing to execute.
Source text
SKILL.md · MIT
---
name: tldr-stats
description: Show full session token usage, costs, TLDR savings, and hook activity
---
# TLDR Stats Skill
Show a beautiful dashboard with token usage, actual API costs, TLDR savings, and hook activity.
## When to Use
- See how much TLDR is saving you in real $ terms
- Check total session token usage and costs
- Before/after comparisons of TLDR effectiveness
- Debug whether TLDR/hooks are being used
- See which model is being used
## Instructions
**IMPORTANT:** Run the script AND display the output to the user.
1. Run the stats script:
```bash
python3 $CLAUDE_PROJECT_DIR/.claude/scripts/tldr_stats.py
```
2. **Copy the full output into your response** so the user sees the dashboard directly in the chat. Do not just run the command silently - the user wants to see the stats.
### Sample Output
```
╔══════════════════════════════════════════════════════════════╗
║ 📊 Session Stats ║
╚══════════════════════════════════════════════════════════════╝
You've spent $96.52 this session
Tokens Used
1.2M sent to Claude
416.3K received back
97.8K from prompt cache (8% reused)
TLDR Savings
You sent: 1.2M
Without TLDR: 2.5M
💰 TLDR saved you ~$18.83
(Without TLDR: $115.35 → With TLDR: $96.52)
File reads: 1.3M → 20.9K █████████░ 98% smaller
TLDR Cache
Re-reading the same file? TLDR remembers it.
█████░░░░░░░░░░ 37% cache hits
(35 reused / 60 parsed fresh)
Hooks: 553 calls (✓ all ok)
History: █▃▄ ▇▃▇▆ avg 84% compression
Daemon: 24m up │ 3 sessions
```
## Understanding the Numbers
| Metric | What it means |
|--------|---------------|
| **You've spent** | Actual $ spent on Claude API this session |
| **You sent / Without TLDR** | Actual tokens vs what it would have been |
| **TLDR saved you** | Money saved by compressing file reads |
| **File reads X → Y** | Raw file tokens compressed to TLDR summary |
| **Cache hits** | How often TLDR reuses parsed file results |
| **History sparkline** | Compression % over recent sessions (█ = high) |
## Visual Elements
- **Progress bars** show savings and cache efficiency at a glance
- **Sparklines** show historical trends (█ = high savings, ▁ = low)
- **Colors** indicate status (green = good, yellow = moderate, red = concern)
- **Emojis** distinguish model types (🎭 Opus, 🎵 Sonnet, 🍃 Haiku)
## Notes
- Token savings vary by file size (big files = more savings)
- Cache hit rate starts low, increases as you re-read files
- Cost estimates use: Opus $15/1M, Sonnet $3/1M, Haiku $0.25/1M
- Stats update in real-time as you work
© parcadei · MIT · parcadei/Continuous-Claude-v3