caveman-stats
GitHub用于展示当前会话的 Token 用量、缓存读取及模式归属统计。支持 Claude Code 和 Gemini CLI,提供详细参数并强调数据准确性,禁止自行计算节省金额或推断结果。
Trigger Scenarios
Install
npx skills add JuliusBrussee/caveman --skill caveman-stats -g -y
SKILL.md
Frontmatter
{
"name": "caveman-stats",
"description": "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."
}
In Claude Code, src/hooks/caveman-mode-tracker.js resolves src/hooks/caveman-stats.js next to itself and runs it on /caveman-stats. The hook does not block the prompt: it supplies the report through hookSpecificOutput.additionalContext with an instruction to print it verbatim inside a fenced code block. Do exactly that, and do not calculate, recompute or re-round the 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.
Version History
-
2fd153c
Current 2026-09-22 09:52
移除了对规则开销和净节省金额的估算与展示,强调无法计算实际节省费用,仅保留原始测量数据以确保证据透明。
- 3b74643 2026-09-03 05:39
- 12aa8cc 2026-08-16 08:54
- 0d95a81 2026-07-24 17:37


