Tldr Stats

作者 parcadeid07ff4b06b62无许可证3.9K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库8个月前更新

Show full session token usage, costs, TLDR savings, and hook activity

仅含说明Data & Analytics
AI 生成的概览

展示会话 token 用量、API 费用、TLDR 压缩节省额以及 hook 活动情况的仪表盘。

功能
该技能指示代理运行统计脚本,并把完整输出粘贴到回复中,让用户直接看到仪表盘。仪表盘呈现本次会话花费、发送与接收的 token 数、提示缓存复用情况、TLDR 相对未压缩文件读取的节省额、缓存命中率、hook 调用次数以及历史趋势迷你图。文档还附有指标说明表和用于估算的各模型单价。
适用场景
适合用来查看 TLDR 在金额上节省了多少、核对本次会话的 token 用量与费用、对比使用 TLDR 前后的效果,或排查 TLDR 与 hook 是否真的在生效。也可用于确认当前使用的是哪个模型。
运行要求
需要 Python 3 运行环境,以及位于 $CLAUDE_PROJECT_DIR/.claude/scripts/tldr_stats.py 的脚本,该脚本并不包含在此技能文件夹中。技能本身不含脚本,只有说明文档。

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
  1. 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

MetricWhat it means
You've spentActual $ spent on Claude API this session
You sent / Without TLDRActual tokens vs what it would have been
TLDR saved youMoney saved by compressing file reads
File reads X → YRaw file tokens compressed to TLDR summary
Cache hitsHow often TLDR reuses parsed file results
History sparklineCompression % 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/continuous-claude-v3位于.claude/skills/tldr-stats提交d07ff4b

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架