Score
9.1
/ 10
Installs
313K
Repo Stars
107.0K
Last Updated
0d ago
Quality Ratio
95%
Description
Verified
Language
Go
First Published
Apr 2026
Summary
The Caveman Stats agent skill provides developers with real-time token usage and estimated cost savings for their current session, directly from the Claude Code session log without AI estimation. This agent skill is particularly valuable for developers and teams using AI agents powered by Claude models who need clear visibility into their session's token consumption and potential cost efficiencies. This is a skill with 2K installs, indicating a notable level of adoption among the agent skill registry. To use it, a developer simply triggers the `/caveman-stats` command within their session. The skill operates via a backend hook, which directly reads session logs and injects the token usage data and savings estimates into the output, meaning the AI model itself does not process the request or compute these statistics, ensuring immediate results without additional token expenditure.
Skill Definition
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.