ClaudeCodeMod

All shelves / Mods / Usage

cache-clock

By hamzafer

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.

Draws

Install

The marketplace name is claude-code-mods.

In your shell
claude plugin marketplace add hamzafer/claude-code-mods
claude plugin install cache-clock@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.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

The cache-clock example on the author's GitHub page
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.

Facts

Author
hamzafer
Category
Usage
Marketplace
claude-code-mods
Repo
hamzafer/claude-code-mods
Folder
mods/cache-clock
Version
0.1.1
License
MIT
Repo stars
381
Last change
2026-10-13
Language
TypeScript
Files
8

Other mods in Usage

openai-balancehamzaferDraws your OpenAI API credit above the prompt: an estimated balance, today's spend, where the money went, and the last call.cost-meterSingh-APHolds a commandDraws session cost, context fill, and the 5-hour and 7-day windows on the status line, plus each turn's cost. An optional budget asks before the next tool call.session-meterarasovicDraws a pane of context by category, the 5-hour and 7-day windows and their pace, and the last 30 tool calls and model requests.cache-timerarasovicDraws a countdown above the prompt until the prompt cache expires, then how many tokens the next message writes again.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.
All 183 in Usage