ClaudeCodeMod

All shelves / Mods / Usage

context-lens

By Arunjay4213

context-lens is a Claude Code usage mod by Arunjay4213.

Pins how full the context window is and what the last turn added, and /context-lens opens the breakdown by category.

Draws

Install

The marketplace name is claude-mods.

In your shell
claude plugin marketplace add Arunjay4213/claude-mods
claude plugin install context-lens@claude-mods
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
Repo stars
9
Last change
2026-10-16

What it can reach

  • Draws in the session
  • Reads usage or context figures

Needs Claude Code 2.1.269 or newer, in an interactive terminal. Restart Claude Code. The README turns function hooks on by setting CLAUDE_CODE_ENABLE_FUNCTION_HOOKS to 1 under env in ~/.claude/settings.json; the official docs say 2.1.287 and later ignore that flag. A pinned line under the prompt updates after every turn: how full the window is, the tokens used, what the last turn added, and how many more turns fit at the recent pace. Figures the engine has not reported yet are left out, so the line is shorter early in a session. Before the first answer it reads ctx waiting for the first answer. /context-lens opens a pane with that reading by category, the growth, and the headroom. Running it again closes the pane. /context-lens refresh counts every category the way /context does, and the README says that sends one token-count request per tool and memory file. That count runs only when you ask. After each finished turn the line is a local estimate and sends no requests. Claude Code 2.1.272 and later draw the category bars. On 2.1.270 and earlier the pane draws the window bar alone. From 110 columns in the fullscreen layout the pane docks beside the transcript. Otherwise it sits above the prompt. A checkout starts with CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 claude --plugin-dir plugins/context-lens.

The marketplace name is claude-mods. The same marketplace also lists quota-meter, token-ledger, and budget-guard. This page installs context-lens. context-xray opens the exact breakdown with /xray, and its token-count requests run when the pane opens. context-inspector draws waste in the window, such as re-reads and near-duplicates. context-bar draws one stacked bar. This one pins a live line, and the exact count runs only on /context-lens refresh. Those token-count requests go through Claude Code on your own login, so this page does not list network access.

Demo

The context-lens pane: 44.4k of 1.0M used, 4 percent, with bars for the window, system tools, skills, the system prompt, memory files, the autocompact buffer, and free space, and a pinned line ctx 4 percent under the prompt
From the author's repo.

What it hooks into

  • session.startWhen a session starts
  • turn.completeWhen a turn ends
  • session.compactWhen the context is compacted
  • command.runWhen you run its slash command/clear
  • ui.closeWhen its pane closes
  • ui.renderDraws into the sessionPane

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
Arunjay4213
Category
Usage
Marketplace
claude-mods
Repo
Arunjay4213/claude-mods
Folder
plugins/context-lens
Version
0.1.0
Repo stars
9
Last change
2026-10-16
Language
TypeScript
Files
6

Other mods in Usage

quota-meterArunjay4213Pins the 5-hour and 7-day plan limits when they are reported, with the reset and whether the current pace fills them first.token-ledgerArunjay4213Pins this session's cost and the last turn's tokens and cache hit, and /ledger lists each turn.mod-packaz9713Holds a commandSeven mods in one install: a context forecast, a cache countdown, a follow-up queue, a plain retell, two holds on risky commands, and Snake.taxi-meterdevbrother2024Draws this session's cost as a taxi fare, in won at API list price, with context fill and the plan limits.agent-routeralexandernicholsonHolds a commandAssigns a model and effort to each subagent role from your endpoint's catalog, and draws that model beside the prompt.keepalivealexandernicholsonDraws a prompt-cache bar for each conversation, and can keep an idle cache warm or compact it before it expires.hudhoobnnDraws model, context, and plan-usage gauges above the prompt, with git, the running tools, and a one-line task summary.limits-meterice-lfernandesDraws plan limits and context above the prompt, in tokens and percent, with the model, effort, and a toast on a costly switch.elizabeth-progressYaxin9LuoDraws Elizabeth from Gintama walking a context-window bar above the prompt, with the usage split, turns left, and rate limits.spending-effort-with-jevYaxin9LuoAsks TypeSafe's Jev which /effort level a message needs, sends that message to api.typesafe.ai, and switches on your OK.cache-paneldanyuchnAfter 50 idle minutes, draws a prompt-cache line and a panel to keep it warm, ping it once, or compact, with a cost for each.context-cardNongfsqDraws context fill, the prompt cache, and weekly plan usage in one line above the prompt, with a breakdown on click. One of two mods for running many sessions.
All 183 in Usage