cache-guard
by Kamil Bakierzyński · ★ 0 · updated 15 Oct 2026
0
Counts down to prompt-cache expiry and, just before it, keeps the cache warm with a ping or compacts the conversation, so a long context is not re-written at full price.
Install
/plugin marketplace add kamilbakierzynski/cache-guard/plugin install cache-guard@cache-guardThen 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.startcommand.runturn.startturn.completeturn.steptool.callsession.compactclassic.PreCompactclassic.PreModelSwitchui.render- API calls
$.clock.after$.clock.every$.clock.now$.command.register$.env.get$.model.fork$.process.run$.session.compact$.session.usage$.settings.read$.state.get$.state.set$.store.delete$.store.get$.store.set$.ui.close$.ui.log$.ui.notify$.ui.open$.ui.resolve$.ui.status$.ui.toast- Draws
AbovePromptPane- Can see
every tool callcompactionclassic hooks- Reach
- level 2 of 3 runs processesdrives Claudereads env varsreads settingsreads mod statepersists 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/kamilbakierzynski/cache-guard
- Path in repo
- repository root
- Source commit
79d9bc3the exact code the scan read- Author
- Kamil Bakierzyński @kamilbakierzynski
- 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.