Analyzes Claude Code prompt-cache economics from local transcripts, attributing cache-miss rebuilds to idle gaps, model switches, prefix churn, and cold starts. Prescribes fixes ranked by USD savings and tracks before/after results.
Ships in daily. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
/cachewise — analyze the last 30 days across every project
/cachewise --days N — widen or narrow the window
Answer one question: which habits are rebuilding cache you already paid
for, and what would each fix save? Prompt caching makes a cache read cost
0.1× and a rebuild cost 1.25× — so every avoidable miss is a ~12× markup on
that slice of context. ccusage and /cost count the tokens; cachewise says
why the expensive ones happened and what to change. The evidence is on
disk — the transcripts recorded every cache write; this skill attributes
them so the numbers, not folklore, drive the fix.
The counting is deterministic and token-free — never read the raw JSONL yourself (parsing thousands of transcript lines with the model is the exact token burn this skill exists to stop). Run the bundled script:
python3 .claude/skills/cachewise/scripts/analyze.py --days 30
It scans ~/.claude/projects/**/*.jsonl and prints one JSON document.
No ~/.claude data (fresh machine, or none in the window) → the script
returns zero turns; say so plainly and stop, there's nothing to diagnose.
Before trusting the numbers, glance at flags:
pricing_fallback_models — models priced at the Sonnet-4.x fallback
because their id wasn't in the table (USD is approximate for those).missing_timestamp_turns / malformed_lines — data the parser skipped;
large counts mean the picture is partial.The report splits cost three ways — keep them distinct, they prescribe differently:
miss_attribution — cache rebuilds, the avoidable core. Each cause
carries tokens + USD (the money a cache hit would have saved):
idle_gap, model_switch, write_churn, and unattributed (cause
undeterminable, usually missing timestamps). The USD is avoidable spend,
not total spend.context_tax — not a miss: the standing read-cost of sessions that
carry far more prefix per turn than your same-model norm. Sprawl, priced
as excess reads.dead_session — low-confidence heuristic: cold re-boots of a
same-project session soon after another ended. Report it as a lead, not a
fact — say "possibly" and cite the count.totals.usd.total is the whole API-equivalent spend in the window;
miss_attribution.total_usd is the slice that better habits recover.
Present, in chat, most-expensive-first:
prescriptions in order (already ranked by
USD). For each: the cause, its dollar cost, the one-line fix from the
script, and the top offending sessions/projects from top_offenders so
the user sees where it happened. Mark dead_session and context_tax
as the softer, lower-confidence lines they are.flags that make the numbers approximate, and
the standing note: for subscription (Pro/Max) users these are
API-equivalent values, not a bill — the ratios still hold, the absolute
dollars are a yardstick.Keep it honest: if the hit rate is already high and avoidable spend is a rounding error, say the setup is healthy rather than manufacturing a problem.
Memory is what turns a one-off report into a measurable fix. Append a run
to out/cachewise/tracker.md (create it if absent; date via date +%F):
## <date> · window <N>d
- Spend: $<total> · hit rate <pct>% · avoidable $<miss_total>
- By cause: idle_gap $X · write_churn $Y · model_switch $Z · dead_session $W (low-conf) · context_tax $V
- Prescribed: <the top 1–3 fixes handed to the user this run>
- Since last run: <hit-rate and avoidable-$ delta vs the previous entry, or "baseline">
On every run after the first, read the previous entry and lead the report with the delta — did avoidable spend fall after last run's fix, or not? A prescription whose number didn't move next run is one to retire or rethink, not repeat.
dead_session and context_tax
are heuristics; present them as leads. Never state a cause the transcript
can't support — unattributed exists so misses aren't force-fit.pricing_asof; when it
ages, reverify against the official pricing page rather than trusting it.out/cachewise/ holds no prompt content.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
/daily:cachewisefrom daily
npx claudepluginhub duthaho/skillhub --plugin daily6 skills in this plugin
/archdeckAnimated explainer slides for programming videos — turns one technical problem (backend, database, system design, frontend, infra) into a deck of 1920×1080 HTML scenes that teach the mechanism: requests travel, scans crawl, races interleave, the bottleneck lights up. Picks a story arc, drafts a storyboard with one shared fact sheet (same data, consistent numbers on every slide) for your approval, then renders standalone per-slide HTML plus one single-file deck with step-by-step reveals, speaker notes, and a clean recording mode, to out/archdeck/<slug>/. No codebase needed. Use for "make slides explaining X for my video", "animated architecture slides for a tutorial", "turn this system design problem into a presentation" — e.g. "/archdeck keyset vs offset pagination". For docs and mermaid diagrams of a real codebase use blueprint; to be taught a topic interactively use learn./daybriefMorning work briefing — "what does my day look like, in one scan?" Gathers today's calendar and emails needing attention (via connected Google MCP tools when available), recent git activity and unfinished work across your local repos, your open tasks (TODO file / assigned GitHub issues), and a quick radar check on topics you track — all in parallel — and renders one compact, prioritized brief in chat, carrying over unfinished focus items from yesterday's saved brief. Every source is optional and degrades gracefully; strictly read-only (never sends email, never touches the calendar, never pushes). Use at the start of a workday or when the user asks "what's on today", "morning brief", "daybrief", "catch me up", "what should I focus on today". For deep research on one topic use pulse instead.