# Cachewise

> Cachewise is an open-source agent skill for developer tools. Finds which habits rebuild your prompt cache and prices each fix in dollars. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/duthaho/skillhub/tree/main/.claude/skills/cachewise
- **Repository:** https://github.com/duthaho/skillhub
- **GitHub stars:** 9
- **License:** MIT
- **Skill name:** cachewise
- **Collection:** https://github.com/duthaho/skillhub
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

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.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs Python scripts](https://github.com/duthaho/skillhub/tree/HEAD/.claude/skills/cachewise)
- [No network calls found in its scripts](https://github.com/duthaho/skillhub/tree/HEAD/.claude/skills/cachewise)
- [License: MIT](https://github.com/duthaho/skillhub/tree/HEAD/.claude/skills/cachewise)

## Features

- **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

## Install

### Claude Code

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

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

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

```sh
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.

### Codex

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

```sh
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.

### Cursor

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

```sh
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.

### Gemini CLI

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

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

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

### VS Code

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

```sh
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.

### Other agents

Get the folder:

```sh
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.

## 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.

## Alternatives

- [Sessions](https://ai-powered.com/skills/sessions): Sessions is an open-source agent skill for developer tools.
- [Session waste report](https://ai-powered.com/skills/session-waste-report): Session waste report is an open-source agent skill for developer tools.
- [Optimize](https://ai-powered.com/skills/optimize-localixai): Optimize is an open-source agent skill for developer tools.
- [Regression finder](https://ai-powered.com/skills/regression-finder): Regression finder is an open-source agent skill for developer tools.
- [Audit](https://ai-powered.com/skills/audit-localixai): Audit is an open-source agent skill for developer tools.
- [Scan sessions and learn](https://ai-powered.com/skills/scan-sessions-and-learn): Scan sessions and learn is an open-source agent skill for developer tools.
- [Dashboard](https://ai-powered.com/skills/dashboard-localixai): Dashboard is an open-source agent skill for developer tools.
- [Runaway guard](https://ai-powered.com/skills/runaway-guard): Runaway guard is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/cachewise
