ClaudeCodeMod

All shelves / Mods / Usage

cache-timer

By arasovic

cache-timer is a Claude Code usage mod by arasovic.

Draws a countdown above the prompt until the prompt cache expires, then how many tokens the next message writes again.

Draws

Install

The marketplace name is claude-code-mods.

In your shell
claude plugin marketplace add arasovic/claude-code-mods
claude plugin install cache-timer@claude-code-mods
Open the repo

It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.

Version
0.1.2
License
MIT
Repo stars
7
Last change
2026-10-24

What it can reach

  • Draws in the session
  • Reads usage or context figures

Tested on Claude Code 2.1.296. Restart after installing. The marketplace name is claude-code-mods, the same string hamzafer uses. Add arasovic/claude-code-mods. A line just above the prompt, apart from the status lines under it, counts down from the main conversation's last request: green while the cache is warm, yellow with send soon when a fifth of its life or less is left, and red once it has expired, with how many tokens the next message writes to the cache again. The author's table gives the cache 5 minutes on an API key, Bedrock, Vertex, or Foundry, or past a subscription's limits, and 1 hour on a subscription within its limits. Subagent requests do not count, and the line clears after /clear and after the main conversation is compacted. The timer appears after the first reply.

The marketplace, arasovic's claude-code-mods, also holds turn-footer, session-meter, search-meter, and other mods by the same author. This one installs on its own; to update, run claude plugin marketplace update claude-code-mods, then claude plugin update cache-timer@claude-code-mods. Sending before the cache goes cold is why this page files it under usage. cache-clock, by hamzafer, draws a prompt-cache line under the status line: time left while warm, hits and misses, and how many tokens the next message re-caches once it goes cold. cache-tax, by karanb192, keeps the one-hour prompt cache warm while you step away, and stops a send into a cold cache once with the estimated rewrite cost. This one only counts down, above the prompt, and sends nothing. Claude Code does not tell mods which lifetime it picked, so the mod follows the engine's own order: FORCE_PROMPT_CACHING_5M, then CLAUDE_CODE_PROMPT_CACHE_TTL, then the promptCacheTtl setting, then ENABLE_PROMPT_CACHING_1H, then your plan and its limits. The author says a server-side feature on some accounts can keep the cache alive longer than the timer shows, and switching models with /model drops the cache before the timer knows. Its plugin.json names Mehmet Aras as its author.

Demo

Countdown above the prompt until the prompt cache expires
From the author's repo.

What it hooks into

  • turn.stepAt each step of a turn
  • session.measureWhen usage is measured
  • ui.renderDraws into the sessionAbovePrompt
  • session.startWhen a session starts
  • session.endWhen a session ends
  • session.compactWhen the context is compacted
  • command.runWhen you run its slash command/compact

Read from the on() calls in its hook modules. Open its source under Files to check what each one does.

Files

The author's README and source, 4 files. They load when you open them.

Facts

Author
arasovic
Category
Usage
Marketplace
claude-code-mods
Repo
arasovic/claude-code-mods
Folder
cache-timer
Version
0.1.2
License
MIT
Repo stars
7
Last change
2026-10-24
Language
TypeScript
Files
6

Other mods in Usage

turn-footerarasovicDraws tool calls, subagents, requests, tokens, and cache hit rate under each answer, and the running tool in the spinner.search-meterarasovicDraws a status line for the model's searches: green found on the first try, yellow found after misses, red found nothing.statusline-anywhereNathanABDraws the status line you already configured, in color, above the prompt in Claude Desktop. In a terminal it stays out of the way.statuspanexuanji86Draws a card above the prompt: model, context gauge, 5-hour and 7-day limits, directory, branch, and session cost. Press the gauge and confirm to run /compact.cache-taxkaranb192Keeps the one-hour prompt cache warm while you step away, and stops a send into a cold cache once with the estimated rewrite cost.token-optimizeralexgreenshDraws a status bar above the prompt in the desktop app: session quality, context fill, a cache countdown, and the 5-hour and weekly limits, with buttons to clean up, start fresh, or keep the cache warm.context-inspectorYeonwooSungDraws what fills the context window and how much of it is waste: re-reads, near-duplicate output, and what compaction kept, with advice and its evidence.heatmaphamzaferDraws a GitHub-style grid of your Claude Code time in a pane, one square per day, with your streak, peak hours, and top projects.openrouter-balancehamzaferDraws your OpenRouter credit above the prompt: the balance with a gauge, today's spend, and the model the money mostly went to.winnowGhalebDweikatReplaces parts of a large Read, Bash, or Grep result a judge calls unneeded with a stub, a summary, and a key that brings the text back, then toasts.compact-adviserkunchenguidDraws a hint above the prompt to run /compact when Jev calls the session a finished checkpoint, and can run /compact itself if you opt in.fast-jev-compactiontamaratranShows a toast when /compact keeps the messages Jev still wants and drops the rest, instead of replacing the history with a summary.
All 183 in Usage