Caveman Stats

作者 juliusbrussee2e08b9177c07无许可证110K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库今天更新

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.

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

报告当前 Claude Code 会话中记录的 token 用量与模式归属,或指向宿主原生的用量报告。

功能
该技能将 Claude Code 的 caveman-mode-tracker 钩子提供的用量报告原样输出在围栏代码块中,不自行重新计算数字。报告包含已记录的输出 token 与缓存读取 token、响应次数,以及在可用时的模式归属。在 Gemini CLI 中,它会引导用户使用内置的 /stats 命令;在其他宿主中则指向原生用量报告,或说明当前会话用量不可用。它还说明了聚合参数,并指出无法据此推断节省量。
适用场景
当用户想查看当前 Claude Code 会话的 token 用量或模式归属时使用。当 Gemini CLI 或其他宿主的用户询问会话用量统计、需要被指引到原生报告时,也同样适用。
运行要求
需在安装了 caveman-mode-tracker 钩子及其统计脚本的 Claude Code 中运行;该技能本身不附带脚本。Gemini CLI 用户需要内置的 /stats 命令。未说明需要凭据或网络访问。

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.

来源与署名

来源:juliusbrussee/caveman位于plugins/caveman/skills/caveman-stats提交2e08b91

许可证: 无许可证

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

举报或申请下架