ClaudeCodeMod

All shelves / Mods / Usage

context-usage

By T-AI-Labs

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

Draws 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.

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-usage@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. It already contains context-meter and usage-limits: install it or those two, not both. The limits show only on a subscription plan. In the terminal, ctrl+x tab moves into the band and ctrl+x ctrl+a collapses it. usagePosition puts the usage row below or above.

The marketplace name is T-AI-Labs, and it lists five mods, each installed on its own; the README says to start here. The context and the limits are why this page files it under usage. usage-quota, by anantraghunath, draws the limits with a forecast and the context, with a Compact button and auto compact at a set percent. statuspane, by xuanji86, draws a card with the model, a context gauge, the limits, and the session cost. This one is the author's context-meter and usage-limits in one band: the threshold compacts on its own once the fill reaches it, Compact runs /compact, Clear runs /clear, and each limit shows the time until it resets. The README says the rows cost no tokens; a compaction does.

Demo

The author's drawing of the context-usage rows: Context at 10%, 100k of 1M, Auto at 97%, Compact and Clear, and beneath it the 5-hour limit at 42%, resetting in 2h 13m, and the week at 78%, resetting in 3d 4h. 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-usage
Version
0.2.4
License
MIT
Repo stars
4
Last change
2026-10-24
Language
TypeScript
Files
6

Other mods in Usage

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.sidebarFayequePDocks a stats sidebar beside the chat: tasks, context, tokens, the limits or cost a session used, cache hit rate and expiry, output speed, and git.subagent-statusline-desktopGerardoFC8Draws the subagent statusline as a band above the prompt in the desktop app: model, effort, cost, context, running subagents, and the 5-hour and weekly limits.
All 183 in Usage