agentleFS
danmestasdanmestas/wardrobe/skills/caveman-stats/SKILL.md

caveman-stats

Skill4 starsChanged 7 months agoMITView on GitHub

Use when the user invokes /caveman-stats or asks for caveman token-usage stats. Shows real token usage and estimated savings for the current session, read directly from the Claude Code session log — no AI estimation. Output is injected by the `caveman-mode-tracker` hook (vendored alongside this skill), which intercepts the slash command and returns the formatted stats as a blocked-decision reason.

21 other projects use a version of this, 18 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use handoff.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the hook isn't registered in the active settings, the slash command falls through to the model — surface that fact and point the user at …

    line 31

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Caveman Stats

This skill is delivered by the hooks/caveman-mode-tracker hook, which intercepts /caveman-stats on UserPromptSubmit and runs the bundled caveman-stats.js against the active Claude Code session transcript. The hook returns decision: "block" with the formatted stats as the reason — the user sees real token counts and estimated savings immediately, and the model never has to compute or estimate anything.

Numbers come from the JSONL session log on disk:

  • output_tokens and cache_read_input_tokens summed across every assistant turn.
  • Estimated savings derived from the mean per-task ratio recorded in caveman-stats.js (COMPRESSION table — currently only full mode has benchmark data; other modes report no estimate).
  • Lifetime aggregation across sessions via /caveman-stats --all or /caveman-stats --since 7d, backed by ~/.claude/.caveman-history.jsonl.

If the hook isn't registered in the active settings, the slash command falls through to the model — surface that fact and point the user at the wardrobe hooks/caveman-mode-tracker component (or the upstream installer at https://github.com/JuliusBrussee/caveman).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.