Skip to content
Skill

Cachewise

Finds which habits rebuild your prompt cache and prices each fix in dollars

Cachewise is an open-source agent skill for developer tools. It is available on Claude Code.

Scripts
Python
Platforms
Claude Code
GitHub stars
9
Last commit
License
MIT
Listing updated

Similar skills

About Cachewise

Cachewise reads your local Claude Code transcripts and works out why token spend climbs. A bundled Python script does the counting without spending model tokens, then each cache rebuild is assigned a cause such as idle gaps beyond the five-minute cache window, model or effort switches mid-session, or changes to the prompt prefix like tool lists and edited memory files. Each cause is priced in USD and the fixes are ranked by how much they would save.

The skill keeps a running tracker in out/cachewise/tracker.md, so each run can compare hit rate and avoidable spend against the previous one and show whether earlier fixes worked. It separates avoidable cache rebuilds from total spend and marks lower-confidence heuristics, such as possible cold restarts of sessions that could have been resumed, as leads rather than facts.

It expects Claude Code with transcripts under ~/.claude and Python 3 to run the analyzer. Transcripts stay on the local machine and only aggregate numbers appear in the report.

When your agent uses it

Prompt-cache economics forensics — why your Claude Code tokens burn so fast, with the numbers to prove it. Parses local ~/.claude transcripts (0 tokens, a bundled Python script does the counting) and attributes every cache-miss rebuild to a cause — idle gaps past the 5-min TTL, mid-session model/effort switches, prefix churn (MCP tool-lists, edited CLAUDE.md, dynamic content), and cold re-boots of a session you could have resumed — each priced in real USD, then prescribes the fixes ranked by dollars saved. Tracks before/after in out/cachewise/tracker.md so the next run measures whether a fix worked. Use when the user asks why they hit usage limits so fast, wants their cache hit rate or token spend analyzed, or where their tokens are going — e.g. "/cachewise", "analyze my prompt cache", "what's burning my tokens". For recurring behavior mistakes use tune; for today's schedule use daybrief.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 3 files (42 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the daily plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add duthaho/skillhub
/plugin install daily@skillhub

Or copy only this skill to ~/.claude/skills/cachewise:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/duthaho/skillhub.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/cachewise &&
cp -R "$tmp/.claude/skills/cachewise" ~/.claude/skills/cachewise &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/cachewise inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/cachewise to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/duthaho/skillhub.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/cachewise &&
cp -R "$tmp/.claude/skills/cachewise" ~/.agents/skills/cachewise &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/cachewise inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/cachewise to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/duthaho/skillhub.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/cachewise &&
cp -R "$tmp/.claude/skills/cachewise" ~/.cursor/skills/cachewise &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/cachewise inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/duthaho/skillhub.git --path .claude/skills/cachewise

Or copy the folder to ~/.gemini/skills/cachewise yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/cachewise:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/duthaho/skillhub.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/cachewise &&
cp -R "$tmp/.claude/skills/cachewise" ~/.copilot/skills/cachewise &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/cachewise inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/duthaho/skillhub.git

Then copy skillhub/.claude/skills/cachewise into your agent's skills folder as cachewise. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Transcript token counting
A bundled Python script tallies token usage from local Claude Code transcripts without using model tokens.
Cache miss attribution
Each cache rebuild is assigned to a likely cause such as idle gaps, model switches or prefix churn.
Dollar-priced prescriptions
Suggested fixes are ranked by estimated USD saved and tied to the sessions and projects where they occurred.
Before and after tracking
Results are appended to a local tracker so each run shows whether spend and hit rate improved.
Context sprawl detection
Flags sessions that carry much more prompt prefix per turn than typical for the same model.

Good for

  • Find out why I hit my Claude Code usage limits so fast
  • Analyze my prompt cache hit rate for the last 30 days
  • Show where my tokens are going and which fixes would save the most
  • Check whether last week's cache fixes actually reduced avoidable spend

Cachewise FAQ

What does Cachewise need to run?

Python 3 and local Claude Code transcripts under ~/.claude. Without that data it reports zero turns and stops.

Does Cachewise send my transcripts anywhere?

No. Transcripts stay local and only aggregate numbers appear in the report; out/cachewise/ holds no prompt content.

Are the dollar figures real bills?

For subscription plans they are API-equivalent values rather than charges, so the ratios are more reliable than the absolute amounts.

How do I trigger Cachewise?

Ask to analyze your prompt cache or where your tokens are going, or run /cachewise, optionally with --days to change the window.

How do I install Cachewise in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/cachewise to use it in all your projects, or to .claude/skills/cachewise in one project. Or install the daily plugin, which includes it: /plugin marketplace add duthaho/skillhub, then /plugin install daily@skillhub.

Does Cachewise run scripts?

Yes. It runs Python scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Cachewise?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

What are the best alternatives to Cachewise?

The closest alternatives to Cachewise are Sessions, Session waste report, Optimize, Regression finder and Audit.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from duthaho/skillhub

  1. Finds where refactoring pays off from git churn and bug history, then applies it safely

    • Open source
    • 9 GitHub stars
    • Developer tools
  2. Lists parked items from your other skills that are now due for a re-check

    • Open source
    • 9 GitHub stars
    • Productivity
  3. Maps peer projects and their user demand to decide which features to adopt

    • Open source
    • 9 GitHub stars
    • Developer tools
  4. Audits your agent setup against past sessions and proposes one-line harness fixes

    • Open source
    • 9 GitHub stars
    • Developer tools
  5. Builds scored, evidence-backed technology decision briefs comparing options for a context

    • Open source
    • 9 GitHub stars
    • Developer tools
  6. Generates grounded architecture docs and mermaid diagrams for a codebase or feature

    • Open source
    • 9 GitHub stars
    • Documentation review