cache-guard
by Michael Stegmaier · ★ 0 · updated yesterday
When a send would re-write a cold prompt cache, a dialog shows the estimated cost with Proceed and Start new session buttons. Adapted from Karan Bansal's cache-tax (MIT). Needs Claude Code 2.1.287 or later.
Install
/plugin marketplace add mgstegmaier/claude-plugins/plugin install cache-guard@mgstegmaierThen run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.
What it hooks into
From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.
- Events
session.startclassic.SessionStartprompt.submitturn.stepturn.completesession.compact- API calls
$.clock.after$.clock.now$.command.list$.command.run$.prompt.fill$.session.model$.session.usage$.ui.ask$.ui.log- Can see
classic hooksevery promptcompaction- Reach
- level 2 of 3 drives Claudewrites the prompt boxdraws
Origin
- How it got here
- Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
- Repository
- github.com/mgstegmaier/claude-plugins
- Path in repo
plugins/cache-guard- Source commit
6bb5c88the exact code the scan read- Author
- Michael Stegmaier @mgstegmaier
- License
- MIT
- First published
- Last pushed
- First listed here
Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.
More from mgstegmaier/claude-plugins
context-band
mgstegmaier/claude-plugins
A card above the prompt in the desktop app and the terminal: how full the context window is, what fills it, and what the session has cost, in Anthropic's palette.
tether
mgstegmaier/claude-plugins
Session dashboard: a /tether pane for a working-on note, context, the assumptions Claude is making, the work it puts off, decisions, needs-you tasks, subagents and cost. Every section folds.