cache-guard

by Agulhas Labs · ★ 0 · updated yesterday

BandsGuardsPromptvalidates

0

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.

install cache-guard

Install

/plugin marketplace add Agulhas-Labs/claude-plugins
/plugin install cache-guard@agulhas-labs

Then run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.

View source on GitHub

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
classic.SessionStartclassic.UserPromptSubmitturn.completetool.callui.rendersession.startprompt.submit
API calls
$.clock.every$.clock.now$.fs.read$.process.run$.prompt.fill$.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
e326e36 the 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.

More from Agulhas-Labs/claude-plugins

logbook

Agulhas-Labs/claude-plugins

Keeps a live local page for a long Claude Code task: what needs you, what was built, what was verified, and what was decided without you. Hooks record it without spending model tokens, the page follows light, dark or your system's setting, and when the task ends the same page is the report.

★ 0BandsGuardsPrompt