ClaudeCodeMod

All shelves / Mods / Usage

context-meter

By T-AI-Labs

context-meter is a Claude Code usage mod by T-AI-Labs.

Draws one row above the prompt with the context fill against an auto-compact threshold you pick, and Compact and Clear buttons.

Draws

Install

The marketplace name is T-AI-Labs.

In your shell
claude plugin marketplace add T-AI-Labs/claude-code-mods
claude plugin install context-meter@T-AI-Labs
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.2.4
License
MIT
Repo stars
4
Last change
2026-10-24

What it can reach

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

Built and tested against Claude Code 2.1.295, the engine in the Claude desktop app 2.31226.1; the function-hook API is in early access. The commands also work inside Claude Code with /plugin in place of claude plugin. New sessions load the changes. The Auto threshold is Off, 97, 90, 70, 60, or 50%, kept across sessions. The row needs about 62 columns with the defaults. Until the first response, and after a clear, the fill reads 0%. context-usage already contains this row: install one or the other.

The marketplace name is T-AI-Labs, and it lists five mods, each installed on its own. context-meter is taken on this site by midudev's mod, so this page is context-meter-t-ai-labs. The context fill is why this page files it under usage. context-meter, by midudev, draws how full the context window is at the right end of the band. context-bar, by hamzafer, draws the context as one stacked bar with the compaction point. This one compacts on its own at the threshold you pick, and fires again only after the fill has dropped below it, so it does not loop. Compact runs /compact and Clear runs /clear. The fill is yellow within 15 points of the threshold and red at it. The README notes that every compaction costs tokens, whether you press Compact or the threshold triggers it.

Demo

The author's drawing of the context-meter row: Context at 10%, 100k of 1M, the Auto threshold at 97%, and Compact and Clear buttons. The figures are the author's example.
From the author's repo.

What it hooks into

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

Files

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

Facts

Author
T-AI-Labs
Category
Usage
Marketplace
T-AI-Labs
Repo
T-AI-Labs/claude-code-mods
Folder
context-meter
Version
0.2.4
License
MIT
Repo stars
4
Last change
2026-10-24
Language
TypeScript
Files
6

Other mods in Usage

usage-limitsT-AI-LabsDraws one row above the prompt with how much of the 5-hour and weekly limits is used, with the time until each resets.context-usageT-AI-LabsDraws the context fill with an auto-compact threshold, Compact and Clear buttons, and the 5-hour and weekly limits in two rows above the prompt.rich-statuslineTheBabaYagaDraws one line above the prompt with the directory, git branch and changes, model and effort, and bars for context and the 5-hour and 7-day limits.cachebeat404MayankKeeps the prompt cache warm while you are away with a small background request, and draws a beating heart under the prompt and a beat count under your turn.tokensaverAGregDevPuts Clawd in a pane and a band above the prompt, trims noisy shell output before Claude reads it, warns as the context fills, and routes subagents by tier.colorwheelAlexeyHRDesignDraws a band in the desktop app with your 5-hour and 7-day limits on its edges and the context as weather, and redraws replies with full-width diagrams.model-pickeralfredtmDraws a band above the prompt when a session opens that lists the models by digit, and runs /model for the one you press; 0 keeps the current one.context-meterAndrewDongminYooDraws the measured context fill above the prompt past 50%, and skips an auto-compact set off when an advisor request makes the session read twice as full.effort-cycleAnercoSteps the effort level of the agent in view with Ctrl+↑ and Ctrl+↓, and draws it as a colored meter in the footer and in each subagent's tasks list row.dotclaudeCarloArnoneHolds a commandOpens a Workspace pane of live context, rate-limit, and cost traces with ten panels, and refuses Claude's file edits until your message approves.dashbandEgonLeitnerDraws how long the prompt cache has left, the context fill, and the 5-hour and weekly limits against their pace, in the footer and as a band above the prompt.codemodeejklockGives Claude one tool that runs a JavaScript script calling the session's own tools, so only the output returns, and draws its nested calls live in the row.
All 183 in Usage