Nasrallah-Adel

Claude Prompt Cache Control — Development skill for Claude Code

Development community

Claude Code mod: prompt-cache meter with a Clear button that writes a handoff brief and starts a fresh conversation.

How to install Claude Prompt Cache Control

This entry records only its repository, not the path inside it, so there is no exact command to give. Open Nasrallah-Adel/claude-prompt-cache-control and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude Prompt Cache Control does

Claude Code mod: prompt-cache meter with a Clear button that writes a handoff brief and starts a fresh conversation.

Alternatives in Development

  • Clear Cache — Clear validation cache for a plugin or entire system (project) 209 ★
  • Cmux Fresh — Clear cmux's persisted session so the next launch opens with fresh/blank windows 107 ★
  • /chrome-cdp — Chrome Browser Automation — Control the user's live Chrome browser via Chrome DevTools Protocol 86 ★

README

prompt-cache-control

A prompt-cache meter above the Claude Code prompt. Every request Claude makes reports how much of its prompt the cache served, how much it wrote and how much went uncached; this mod keeps those numbers per request and per turn, counts down to the moment the cache lapses and tells you what to do about it: keep going, `/compact` or `/clear`.

cache ██████████ 98% read 80k · wrote 1k · new 300 ⏱ 3:41 5m · warm: keep going
cache ░░░░░░░░░░  0% read 0 · wrote 52k · new 300 ⏱ 4:58 5m · cache missed: model changed (…)
cache ██████████ 98% read 150k · wrote 1k · new 300 ⏱ 0:00 5m · expired: the next message rewrites 151k tokens. /compact first, or /clear if the task is done

`/cache` opens a pane: the time left with a solid bar that shrinks as the cache runs out (green, yellow below 40% of the lifetime, red from the warning threshold), a stacked read / wrote / new bar for the last request, and a colour-coded table with one row per turn. Bars are filled cells and columns have fixed widths with no-break spaces, so the terminal and the Desktop (HTML) pane render the same.

Clear button

The band and the `/cache` pane carry a **Clear** button (hotkey `c` once the band or pane has focus: ctrl+x tab for the band). Pressing it:

  1. reads this session's transcript (~/.claude/projects//.jsonl), keeps the user and assistant text and one line per tool call, and asks haiku for a brief with fixed headings: Goal, Current state, Decisions made, Files and commands touched, Open items, Next step;
  2. runs /clear, so the next request starts from an empty, cheap prefix;
  3. submits the brief to the fresh conversation as your own first prompt, framed to ask for a one-line acknowledgement and then wait.

If the model gives no brief, a fallback with your last prompts and a `claude --resume ` line is sent instead. If `/clear` or the submit is refused, the brief is put in the prompt box for you to send. The button is hidden while