From prompt-cache-control
Prompt-cache meter above the Claude Code prompt: how many tokens each request read from, wrote to and sent past the cache, a live countdown to the cache's expiry, and what to do about it (keep going, compact or clear). The TTL follows Claude Code's own rules for your account (1 hour on a Claude subscription, 5 minutes on an API key, cloud provider or usage credits, plus the TTL variables and setting) and corrects itself from request timing. When Claude Code will compact an idle conversation by itself, it counts down to that too. /cache opens a per-turn table.
8 events · 13 calls
Ships in prompt-cache-control. Installing the plugin adds it to Claude Code.
A mod runs inside Claude Code as you, unsandboxed. This is what its source calls.
fs.readenv.getEach event it registers a hook on, with the matcher when it sets one
session.startsession.endsession.compactturn.stepcommand.run{command=cache}ui.closeui.pressui.render{component=AbovePrompt}ui.render{component=Pane}Every mods API method its source calls, by namespace
everyregistergetreadcwdusagecloseinvalidatelogopenresolvestatustoastCLAUDE_CODE_IDLE_COMPACT_MIN_TOKENSCLAUDE_CODE_PROMPT_CACHE_TTLCLAUDE_CONFIG_DIRDISABLE_AUTO_COMPACTDISABLE_COMPACTDISABLE_PROMPT_CACHINGDISABLE_PROMPT_CACHING_HAIKUDISABLE_PROMPT_CACHING_OPUSDISABLE_PROMPT_CACHING_SONNETENABLE_PROMPT_CACHING_1HFORCE_PROMPT_CACHING_5MHOMEWhere Claude Code finds the mod
hooks/hooks.jsonhooks/prompt-cache-control.tsx (written ./prompt-cache-control.tsx)Read from the source, never run. Claude Code checks a mod again when it loads it and can refuse code this reading accepts; claude plugin validate shows its own list.
Generated from the plugin's indexed repository (davila7/claude-code-templates) — no native marketplace selected
npx claudepluginhub p/davila7-prompt-cache-control-cli-tool-components-mods-observability-prompt-cache-control