cache-guard
by Agulhas Labs · ★ 2 · updated 20 Oct 2026
Warns once before a message that will cost far more than usual: a large Claude Code context whose prompt cache has expired, or a model or effort change that resets it. Shows the estimated cost, and offers a handoff file written by a cheap model in the background so you can /clear instead. While background work runs, it wakes an idle session just before its cache expires, so the result lands on...
Install
/plugin marketplace add Agulhas-Labs/claude-plugins/plugin install cache-guard@agulhas-labsThen 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.endclassic.SessionStartclassic.UserPromptSubmitturn.completetool.callui.rendersession.startprompt.submit- API calls
$.clock.after$.clock.every$.clock.now$.fs.read$.process.run$.prompt.fill$.session.cwd$.session.id$.session.usage$.store.get$.store.set$.ui.invalidate$.ui.resolve$.ui.toast- Draws
AbovePrompt- Can see
classic hooksevery tool callevery prompt- Reach
- level 2 of 3 runs processeswrites the prompt boxreads filespersists statedraws
Origin
- How it got here
- Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
- Repository
- github.com/Agulhas-Labs/claude-plugins
- Path in repo
plugins/cache-guard- Source commit
efaa5c7the exact code the scan read- Author
- Agulhas Labs @Agulhas-Labs
- License
- Apache-2.0
- 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.