Home / Claude Code mods / Security / cache-guard

cache-guard

cache-guard is a Claude Code mod by kamilbakierzynski that 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.

Updated 2026-10-15

What is cache-guard?

cache-guard is a Claude Code mod by kamilbakierzynski that 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. It is listed under Security and has no public popularity data yet.

TypeClaude code mod
Authorkamilbakierzynski
Repositorykamilbakierzynski/cache-guard
Popularityno public popularity data yet
CategorySecurity
SecurityReview before installing (72/100)
Rank#6,804 of 9,397 Claude Code mods; #728 in Security
LicenseMIT
Last commit2026-10-15
Hooks10 events
Seesclassic hooks, compaction, every tool call
Draws onAbovePrompt, Pane

Is cache-guard safe to install?

cache-guard scores 72/100 on the MCPMods security check: Review before installing. Things to review: starts processes outside the sandbox; reads environment variables. It passed 5 of 8 checks.

Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.

CheckResult
No network accessPass
Starts processes outside the sandboxReview
Writes no files or configPass
Reads environment variablesReview
Only sees the events it hooksPass
Drives Claude (model calls, prompts)Note
Passes claude plugin validatePass
Has an open-source licensePass

API calls in its code

CallWhat it means
$.clock.after
$.clock.every
$.clock.now
$.command.register
$.env.getreads env vars
$.model.forkdrives Claude
$.process.runruns processes
$.session.compactdrives Claude
$.session.usage
$.settings.readreads settings
$.state.get
$.state.set
$.store.deletekeeps its own state
$.store.getkeeps its own state
$.store.setkeeps its own state
$.ui.closedraws interface
$.ui.logdraws interface
$.ui.notifydraws interface
$.ui.opendraws interface
$.ui.resolvedraws interface
$.ui.statusdraws interface
$.ui.toastdraws interface

How do I install cache-guard?

  1. Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
    claude --version
  2. Read its footprint. This lists every event it hooks and every API call it makes, without running it.
    git clone https://github.com/kamilbakierzynski/cache-guard
    claude plugin validate ./cache-guard/.
  3. Install it. Run this in your terminal, then /reload-plugins in an open session.
    claude plugin marketplace add kamilbakierzynski/cache-guard && claude plugin install cache-guard@cache-guard

Or ask Claude to set it up

Paste this into Claude Code and it installs cache-guard for you:

Install the "cache-guard" Claude Code mod from https://github.com/kamilbakierzynski/cache-guard. Run claude plugin validate on it first and show me what it can access before you enable it.