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.
claude plugin marketplace add T-AI-Labs/claude-code-mods claude plugin install context-meter@T-AI-Labs
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
What it hooks into
session.startWhen a session startsclassic.SessionStartA Claude Code eventsession.endWhen a session endssession.measureWhen usage is measuredsession.compactWhen the context is compactedui.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
- Folder
- context-meter
- Version
- 0.2.4
- License
- MIT
- Repo stars
- 4
- Last change
- 2026-10-24
- Language
- TypeScript
- Files
- 6