ClaudeCodeMod

All shelves / Mods / Usage

context-meter

By vumichien

context-meter is a Claude Code usage mod by vumichien.

Draws a band above the prompt with what fills the context window by category, a countdown to when the prompt cache expires, and a Compact button.

Draws

Install

The marketplace name is chien-mods.

In your shell
claude plugin marketplace add vumichien/claude-code-mods-kit
claude plugin install context-meter@chien-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.3.0
License
MIT
Repo stars
4
Last change
2026-10-10

What it can reach

  • Draws in the session
  • Reads usage or context figures
  • Runs a command when you press

Start a new session after installing, then turn it on with /context-meter on; it starts off. Tested on Claude Code 2.1.296 on Windows 11; mods are an early-access feature, so the API can change between versions. Compacting is a model call: the band costs no tokens, the button does. The cacheTtl option is auto by default, which follows Claude Code's defaults of one hour on a Claude subscription and five minutes with an API key or a cloud provider, and the band says which lifetime it assumed and why. The breakdown option is summary by default, which estimates the categories locally and sends nothing; full counts them with the token-count API after every turn. In the desktop app and the IDE extensions, the button runs /compact as if you had typed it. To try it for one session without installing, git clone the repository and start claude with --plugin-dir pointing at the mod's folder.

The install name is context-meter, which four listed mods already have, so this page adds the author's name. The marketplace, chien-mods, also holds secret-guard, plan-meter, done-gate, idea-shelf, session-monitor, prompt-enhancer, and assumption-check, each installed on its own. A meter for the context window and the cache is why this page files it under usage. context-bar, by hamzafer, draws the context window as one stacked bar, a color per category, with token counts and the compaction point. cache-timer draws a countdown above the prompt until the prompt cache expires, then how many tokens the next message writes again. This one puts both in one band, with the categories in the colours of /context, and a Compact button, or c while the band has focus, that runs the same compaction as /compact. The cache clock restarts at each model request, and the band says the cache is being kept warm while Claude works. A compaction that is refused, or vetoed by a hook, is explained in the band and in a toast. If you set CLAUDE_AUTOCOMPACT_PCT_OVERRIDE, the header shows that point as your setting.

Demo

A paragraph of the author's claude-code-mods-kit README on context-meter: the cache clock restarts at each model request, the band says the cache is being kept warm while Claude works, the Compact button is hidden while a turn runs, a refused compaction is explained in the band and a toast, the header shows compacts at 500k (your 50% setting) when CLAUDE_AUTOCOMPACT_PCT_OVERRIDE is set, every category gets a coloured entry with its tokens and share of the window, and compacting is a model call that the button costs and the band does not.
Screenshot of the author's GitHub page.

What it hooks into

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

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

Slash commands 1

  • /context-meterShow what fills the context window and when the cache expires (/context-meter on or off switches the mod)

Files

The author's source, 3 files. They load when you open them.

Facts

Author
vumichien
Category
Usage
Marketplace
chien-mods
Repo
vumichien/claude-code-mods-kit
Folder
plugins/context-meter
Version
0.3.0
License
MIT
Repo stars
4
Last change
2026-10-10
Language
TypeScript
Files
7

Other mods in Usage

usage-meterhamzaferDraws the 5-hour and 7-day plan limits as small bars above the prompt, with the reset countdown and what this session cost.context-barhamzaferDraws the context window as one stacked bar, a color per category, with token counts and the compaction point.token-weatherAnthropicDraws a one-line forecast of the context window above the prompt. Fuller goes from clear toward a storm.token-weatherhamzaferDraws the context-window forecast above the prompt, plus how long the prompt cache has left.cache-clockhamzaferDraws 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.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.
All 183 in Usage