ClaudeCodeMod

All shelves / Mods / Usage

context-widget

By oMaN-Rod

context-widget is a Claude Code usage mod by oMaN-Rod.

Draws the context window as a stacked bar, one color per /context category, on a card under the prompt or docked beside the transcript.

Draws

Install

The marketplace name is claude-code-widgets.

In Claude Code
/plugin marketplace add oMaN-Rod/claude-code-widgets
/plugin install widgets@claude-code-widgets
/plugin install context-widget@claude-code-widgets
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
1.0.1
License
MIT
Repo stars
4
Last change
2026-10-12

What it can reach

  • Draws in the session
  • Reads usage or context figures

Needs widgets, the layout plugin that places the cards, from the same marketplace. A Claude Code version with mod (function hook) support; the author says the mod API is early access and may change between releases. /context-widget takes auto, detailed, grid, top, bar, or line to pick its view. Placement and view modes are saved and restored in every session.

The marketplace, claude-code-widgets, also holds widgets, the layout plugin this one needs, and the set's other widgets, usage-widget and timer-widget among them. How full the context window is 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 above the prompt. context-inspector, by YeonwooSung, draws what fills the context window and how much of it is waste. This one splits the bar by the categories /context reports, in six views from a single line to a grid, and goes wherever /widgets puts the cards.

Demo

The Session part of the Claude Code Widgets README, What Claude is doing and what it is costing, with the context-widget row: /context-widget with auto, detailed, grid, top, bar, and line, which shows the context window as a stacked bar, one colour per /context category.
Screenshot of the author's GitHub page.

What it hooks into

  • session.startWhen a session starts
  • classic.SessionStartA Claude Code event
  • command.runWhen you run its slash command/context-widget
  • session.measureWhen usage is measured
  • ui.renderDraws into the sessionPaneAbovePromptPromptHint

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

Slash commands 1

  • /context-widgetToggle the context window card, or set its view mode

Files

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

Facts

Author
oMaN-Rod
Category
Usage
Marketplace
claude-code-widgets
Repo
oMaN-Rod/claude-code-widgets
Folder
plugins/context-widget
Version
1.0.1
License
MIT
Repo stars
4
Last change
2026-10-12
Language
TypeScript
Files
5

Other mods in Usage

cost-visibilitypatitowHolds a commandDraws a two-line band above the prompt with the plan windows, this chat's list-price cost split into main and subagents, and context. /spend opens a pane.usage-barspepperonasShows the 5-hour and 7-day limits as animated bars under the prompt, with a reset countdown, a pace mark, a projection, and six styles.clawd-dashpinkpixel-devDraws a session dashboard under the prompt: plan limits, context, cost, model, effort, git status, and file changes, beside a pixel Clawd who reacts.usage-paneT-AI-LabsOpens a /tokens pane that adds up tokens, cache hit rate, and API price by day, model, and project, and lists each session's prompts by cost and why.ribbonrobonuggetsDraws a slim band above the prompt with the 7-day and 5-hour usage left and when each resets, and whether the prompt cache is warm or cold with the next cost.hudlycfyiDraws a heads-up display above the prompt: context fill, repo state, turn progress with time estimates, and a recap with an automatic /whats-next after a break.automodemralexivyHolds a commandPicks the model and effort for each prompt, draws a bar above the prompt with context, cache countdown, cost, and savings, and denies git writes from subagents.agent-tracekrika2810Draws a pane beside the chat that lists every step after a prompt: each model request, tool call, and subagent, with time, tokens, context, and API-rate cost.idle-compactdavidarCompacts an idle session after 50 minutes, while the prompt cache is still warm, and pins a status line under the prompt with the before and after sizes.compact-timinglbzepoqoLets the model mark task boundaries and compacts at the end of a turn once the context passes 200k tokens, then resumes the work; a toast shows each compaction.context-metervumichienDraws 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.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.
All 183 in Usage