cache-inspector

Reviewed at commit 39335b2

Track API cache reads, writes, and uncached input by request.

Made by
Yash Thakker
What we checked

Adds a /cache-inspector command that opens a pane listing the last 30 model requests with the model, the agent, and how many tokens were read from cache, written to cache and sent uncached. It sees only the usage counts, never your prompts or files, and keeps them in memory.

Review details

Static review of the source at the pinned commit; not run. Registers the slash command on session.start, wraps turn.step to read the usage object from each step result and passes the result through unchanged, keeps the last 30 records in memory (model, agent id, token counts) and renders them on ui.render in a Pane. Uses $.command.register, $.ui.open, $.ui.invalidate and $.ui.resolve. No files, network, process or model calls, and nothing is persisted. No npm dependencies. The turn.step handler is a generator that returns the original result.

What it uses
  • Reads your prompts: no
  • Sees tool calls: no
  • Blocks or changes tool calls: no
  • Reads or writes files: no
  • Runs programs on your machine: no
  • Calls the model (uses tokens): no
  • Sends data over the network: no
  • Stores data: no
  • Shows something on screen: yes
Hooked events
Screenshot of cache-inspector
Made this mod? Add a badge to your README

modsforClaude badge for cache-inspector

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/cache-inspector.svg)](https://modsforclaude.com/mods/cache-inspector/)

← All mods