ClaudeCodeMod

All shelves / Mods / Usage

context-meter

By midudev

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

Draws how full the context window is at the right end of the band above the prompt: gray, then yellow from 50 percent, then red from 75.

Draws

Install

The marketplace name is better-claude.

In Claude Code
/plugin marketplace add midudev/better-claude
/plugin install context-meter@better-claude
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.0
License
MIT
Repo stars
194
Last change
2026-10-22

What it can reach

  • Draws in the session
  • Reads usage or context figures

The meter reads like context 58%. It is dim gray under 50 percent, yellow from 50 percent, a good moment for /compact, and red from 75 percent, compact now or start a new session. warnAt and dangerAt in /config set the two thresholds. The footer stays as it is, so it sits beside Sub Meter. Before the first response of a session, fresh or resumed, and right after a compaction or a rewind, the meter counts the window once, as /context does, and shows it with a ~ until the next response brings the real figure. Every 2 seconds it reads the session's usage again, a free call, to catch a resume or a rewind. Whatever the engine or another plugin draws in that band, such as Image Preview's chips, stays above it.

The marketplace name is better-claude. The marketplace also holds after, use-haiku, think-hard, token-meter, sub-meter, image-preview, commit, narrator, and time-machine. This one installs on its own. The context figure is why this page files it under usage. context-lens pins how full the context window is and what the last turn added. token-weather draws a one-line forecast of the context window above the prompt. This one shows only the fill, colored by when to compact.

Demo

The opening of the Context Meter README: context 58% at the right end of the band above the prompt, and the gray, yellow, and red thresholds.
Screenshot of the author's GitHub page.

What it hooks into

  • session.startWhen a session starts
  • session.endWhen a session ends
  • session.measureWhen usage is measured
  • 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.

Files

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

Facts

Author
midudev
Category
Usage
Marketplace
better-claude
Repo
midudev/better-claude
Folder
plugins/context-meter
Version
0.1.0
License
MIT
Repo stars
194
Last change
2026-10-22
Language
TypeScript
Files
7

Other mods in Usage

sub-metermidudevDraws your 5-hour and weekly subscription usage at the bottom right, on the permission mode's line, with a bar and the time until it resets.token-metermidudevEnds the hint line under the prompt with the last turn's input, output, and cache tokens, and the session's running total, in color.use-haikumidudevRuns a prompt that starts with _ on Haiku, subagents included, and shows it as you type, while it runs, and under the answer.agent-usage-guardrbartoliHolds a commandAsks before a subagent starts, a heavy prompt is sent, or a tool loop runs on, from the 5-hour and weekly usage, and refuses when nobody can answer.optim-jevOqura-aiHas TypeSafe's Jev drop stale tool calls and their output when the session compacts, keeping the rest word for word, and draws a dashboard above the prompt.secondwindorchetronCompresses Bash output of 512 bytes or more through the local secondwind binary, keeps the full text one call away, and draws a pane of the net tokens saved.session-hudbradtraversyDraws a strip above the prompt with the git branch, warned on main, context used against a target you set, and weekly usage, and a Details pane of the rest.time-blamekaranb192Splits each turn's time between Claude, each tool, your approvals, and the rest, under the answer, and /blame opens a panel of the whole session's split.subagent-tunerKruhlikauHolds a commandPicks each subagent's model and effort by asking you in a pane, from a recommendation for the task, or from your saved default, with a band above the prompt.cockpitdrkokorevHolds a commandOpens a panel beside the transcript with context, rate limits, cost, subagents, tool calls, changed files, and tests, and asks before rm -rf or a force push.cache-refresherolddonkeyDraws a bar above the prompt with the time until the prompt cache expires and what a rebuild would cost, and can refresh the cache while you are away.context-alertnathanonnOpens a question dialog when the context window reaches 40 percent, offering to write a handoff doc and then compact, write one only, or compact now.
All 183 in Usage