tldr-stats
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTLDR Stats Skill
TLDR Stats Skill
Show a beautiful dashboard with token usage, actual API costs, TLDR savings, and hook activity.
展示一个美观的仪表盘,包含token使用情况、实际API成本、TLDR节省金额以及hook活动。
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
- 查看TLDR在实际资金方面为你节省了多少
- 查看会话总token使用量和成本
- 对比TLDR启用前后的效果
- 排查TLDR/hooks是否正在被使用
- 查看当前使用的模型
Instructions
使用说明
IMPORTANT: Run the script AND display the output to the user.
- Run the stats script:
bash
python3 $CLAUDE_PROJECT_DIR/.claude/scripts/tldr_stats.py- 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.
重要提示: 运行脚本并将结果展示给用户。
- 运行统计脚本:
bash
python3 $CLAUDE_PROJECT_DIR/.claude/scripts/tldr_stats.py- 将完整输出复制到回复中,让用户可以直接在聊天中查看仪表盘。不要静默运行命令——用户希望看到统计数据。
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╔══════════════════════════════════════════════════════════════╗
║ 📊 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 sessionsUnderstanding 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) |
| 指标 | 含义 |
|---|---|
| You've spent | 本次会话中使用Claude API的实际花费 |
| You sent / Without TLDR | 实际发送的token数量 vs 未使用TLDR时的预计数量 |
| TLDR saved you | 通过压缩文件读取节省的资金 |
| File reads X → Y | 原始文件token被压缩为TLDR摘要后的数量 |
| Cache hits | TLDR复用已解析文件结果的频率 |
| History sparkline | 近期会话的压缩率(█表示高压缩率) |
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)
- 进度条:直观展示节省情况和缓存效率
- 迷你折线图(Sparklines):展示历史趋势(█表示高节省率,▁表示低节省率)
- 颜色:表示状态(绿色=良好,黄色=中等,红色=需关注)
- 表情符号:区分模型类型(🎭 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
- Token节省量因文件大小而异(文件越大,节省越多)
- 缓存命中率初始较低,随着重复读取文件会逐渐提高
- 成本估算采用以下标准:Opus $15/1M token,Sonnet $3/1M token,Haiku $0.25/1M token
- 统计数据会随着你的操作实时更新