caveman-stats
GitHub通过命令行/caveman-stats触发,直接读取会话日志展示实时Token用量与预估节省金额。包含规则开销估算及净节省分析,帮助评估当前工作负载的成本效益,辅助决策是否关闭相关模式以优化成本。
Trigger Scenarios
Install
npx skills add JuliusBrussee/caveman --skill caveman-stats -g -y
SKILL.md
Frontmatter
{
"name": "caveman-stats",
"description": "Show real token usage and estimated savings for the current session. Reads directly from the Claude Code session log — no AI estimation. Triggers on \/caveman-stats. Output is injected by the mode-tracker hook; the model itself does not compute the numbers."
}
This skill is delivered by hooks/caveman-stats.js (read by hooks/caveman-mode-tracker.js on /caveman-stats). The model does not need to do anything when this skill fires — the hook returns decision: "block" with the formatted stats as the reason. The user sees the numbers immediately.
Output also includes Est. rule overhead and Est. net lines wherever a savings estimate exists with a known turn count. Rule overhead is the estimated per-turn INPUT-token cost of the injected caveman rules (default 1,250 tokens/turn, override with CAVEMAN_RULE_OVERHEAD_TOKENS) times the turn count. Net is savings minus that overhead — when negative, the output says so plainly and suggests turning caveman off for that workload, rather than hiding the net-negative regime behind a gross-savings number (see docs/HONEST-NUMBERS.md).
Version History
- 12aa8cc Current 2026-08-16 08:54
- 0d95a81 2026-07-24 17:37


