Skip to content

caveman-stats

Real token usage and estimated savings metrics from your Claude Code session log.

— (0 ratings) 399.2K downloads juliusbrussee
$ npx skills add https://github.com/juliusbrussee/caveman --skill caveman-stats

Skills can run code on your computer. Review the source before installing. This listing is community-made and isn't affiliated with Anthropic.

About this skill

Summary

Real token usage and estimated savings metrics from your Claude Code session log.

  • Reads directly from session logs without AI estimation, providing accurate token counts for the current session
  • Triggered by the /caveman-stats command and returns formatted statistics immediately via hook injection
  • Integrates with mode-tracker to display actual usage data without requiring model computation

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 Oh My Pi (OMP), direct the user to /usage or the OMP session view and never read Claude Code transcripts as OMP 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.


Installs: 399.2K | GitHub stars: 123.5K | First seen: Apr 30, 2026

Related skills

New

Coding & dev tools

hyperframes-cli

CLI toolkit for scaffolding, validating, previewing, and rendering HyperFrames video compositions.

New • 1.8M
New

Coding & dev tools

improve-codebase-architecture

Analyze codebases for architectural friction and propose module-deepening refactors as testability improvements.

New • 1.3M
New

Coding & dev tools

tdd

Test-driven development with vertical slices, behavior-focused tests, and incremental red-green-refactor cycles.

New • 1.3M