跳到正文
Skillpedia
分析与电子表格117k · #741

caveman-stats

它能做什么

这个技能报告当前 Claude Code 会话所记录的 token 用量。适合希望了解自己 AI 会话用了多少的人。

适用场景

  • ✓当你想查看当前 Claude Code 会话的 token 用量的时候。
  • ✓当你想统计一段时间内多个会话的总量的时候。
  • ✓当你想知道某个会话期间处于哪种模式的时候。

技能链接

https://github.com/JuliusBrussee/caveman/blob/main/plugins/caveman/skills/caveman-stats/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/JuliusBrussee/caveman/blob/main/plugins/caveman/skills/caveman-stats/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我查看这次 Claude Code 会话的 token 用量,以及我当时处于哪种模式。”

每周 5 个新技能,1 分钟读完。

工作原理

该技能运行一次统计报告,并按原样打印记录的数字。它不会加入自己的估算,并说明在没有实测对比的情况下,节省量是未知的。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

In Claude Code, src/hooks/caveman-mode-tracker.js runs src/hooks/caveman-stats.js on /caveman-stats and supplies its report through hookSpecificOutput.additionalContext. Print that report verbatim inside a fenced code block, as the hook instructs. Do not calculate or add numbers yourself.

In Gemini CLI, direct the user to /stats model for current session token usage or /stats session for session statistics. Gemini custom commands are prompts; they cannot invoke the built-in command or read its live session metrics. Never read Claude Code transcripts as Gemini usage. In other hosts, use a native usage report if one is available; otherwise say that current session usage is unavailable. The Claude reader and its lifetime history apply only to Claude Code. Savings remain unknown in every host without a measured comparison.

The report shows recorded output and cache-read tokens, response counts, and mode attribution where available. Savings are unknown: the transcript has no measured comparison without Caveman. Do not infer saved tokens, percentages, dollars, rule overhead, or a net result from output counts or the current mode.

--all and --since 7d aggregate the latest recorded output count per session. --share reports observed usage with savings unknown. Historical est_saved_* fields are ignored; their original history rows remain on disk. The statusline shows the active mode without the retired savings badge.

Original/current memory-file pairs are reported by their measured byte sizes. Those file-size differences do not establish provider token or billing savings. See docs/HONEST-NUMBERS.md.

常见问题

它会估算我节省了多少 token 吗?

不会。说明中提到节省量未知,因为没有实测对比就无法判断。

在 Claude Code 之外也能用吗?

详细覆盖的只有 Claude Code。其他宿主环境会被告知使用它们自己的用量报告。

它能统计多个会话吗?

可以。选项可以涵盖所有会话,也可以选择一段时间,例如最近 7 天。

详情

作者的原始描述

Show recorded output and cache-read token usage and mode attribution for the current Claude Code session, or locate the host's native usage report. Trigger: /caveman-stats.

repo: JuliusBrussee/caveman

热度

GitHub 星标
117k
排名
#741
许可证
Apache-2.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能