cache-clock is a Claude Code usage mod 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.
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.1
License
MIT
Repo stars
381
Last change
2026-10-13
What it can reach
Draws in the session
Reads usage or context figures
Claude Code 2.1.287 or later. The author says to restart after installing. Needs Node on your PATH; setup warns if it is missing. Run /cache-clock setup after install. Plugins cannot add a status line on their own, so setup points statusLine at a small Node script in your Claude config folder, which runs your status line first and puts the cache line under it, and sets refreshInterval to 30 seconds so the countdown keeps moving. With no status line, the cache line becomes it. /cache-clock remove puts your settings back as they were, and leaves a status line you changed by hand since alone; /cache-clock on its own says whether it is on. The line is green while warm, with a bar and the time left, yellow under 20% of the lifetime, and red once cold, with how many tokens the next message re-caches. hit is the share of input tokens read from cache this session, and misses counts requests that re-processed what the cache already held. It shows nothing until Claude Code's first reply.
The marketplace, claude-code-mods, holds all of hamzafer's mods, context-bar and usage-meter among them. This one installs on its own, or from the checklist that npx claude-code-mods@latest opens. The prompt cache is why this page files it under usage. cache-timer, by arasovic, draws a countdown above the prompt until the prompt cache expires, then how many tokens the next message writes again. cache-clock-ray-amjad draws the time until the cache goes cold with the context fill and a subagent clock, and has Claude write a handoff first. This one reads Claude Code's own cache figures under the status line, and names the last miss's cause when Claude Code knows it. token-weather-hamzafer, by the same author, hides its own cache countdown once this one is set up. Setup keeps each settings file's original separately; a project's shared .claude/settings.json gets its override in .claude/settings.local.json, and a status line from managed settings is left alone.
Demo
Screenshot of the author's GitHub page.
What it hooks into
session.startWhen a session starts
command.runWhen you run its slash command/cache-clock
Read from the on() calls in its hook modules. Open its source under Files to check what each one does.
Slash commands 1
/cache-clockAdd a prompt-cache line under the status line; /cache-clock remove takes it out
Files
The author's source, 3 files. They load when you open them.