ClaudeMods
☰
EN
● 0 online · Views 0 times
SponsorsSubmit a project
GitHub repositories · by Lunik

context-cache

A Claude Code plugin that adds a bottom-grid row showing context window fill and prompt cache status (hit rate and TTL countdown), with toasts when the context is nearly full or the cache expires.

Lunik@Lunik

Lunik/gmz-claude-marketplace/tree/master/context-cache

Translated

About this mod

context-cache shows how full the context window is and how the prompt cache is doing.

Context ┃ Window 17% ┃ Cache hit 99% ┃ Cache TTL 4m33s

Cells:

  • Window: context fill. Green below 70%, orange from 70%, red from 85%.
  • Cache hit: share of the last prompt served from cache. Red below 20%.
  • Cache TTL: countdown to cache expiry, from the TTL the API reports (5 minutes or 1 hour). Shows expired once it ran out.

Cache hit and Cache TTL only show once the context holds at least 20k tokens.

Toasts fire when context crosses 70%, 85% or 95%, on a cache miss, 60 seconds before expiry, and on expiry.

Behavior: a row in the bottom-right grid refreshed every second; only the main conversation counts, since a subagent has its own cache entry.

Installation

Check the author's README for the marketplace and plugin name first. Commands may change as the repository evolves.

claude plugin marketplace add Lunik/gmz-claude-marketplace
claude plugin install context-cache
Original text / README

context-cache

Shows how full the context window is and how the prompt cache is doing.

Context ┃ Window 17% ┃ Cache hit 99% ┃ Cache TTL 4m33s

Cells

| Cell | Meaning | |---|---| | Window | Context fill. Green below 70%, orange from 70%, red from 85%. | | Cache hit | Share of the last prompt served from cache. Red below 20%. | | Cache TTL | Countdown to cache expiry, from the TTL the API reports for the entry it just wrote (5 minutes or 1 hour). expired once it ran out. |

Cache hit and Cache TTL only show once the context holds at least 20k tokens, below that a cold cache costs little. Until then, and before the first response, they read -.

Toasts

  • Context crosses 70%, 85% or 95%: consider /compact.
  • Cache miss: a response re-wrote 20k+ tokens at full price with a hit rate under 20%.
  • Cache expires in 60 seconds: send a prompt to keep it.
  • Cache expired: the next prompt re-reads the context uncached.

Behavior

  • Row in the bottom-right grid, refreshed every second.
  • Only the main conversation counts; a subagent has its own cache entry.

Similar projects