A side panel for Claude Code that shows where your context goes. Type /ctx, and a panel
opens next to the chat: how full the context is, how much of your plan limits is left, what fills
the window, and what each kind of action costs.
I made it to learn how context works. /context gives a table of categories, and in a long
session most of the window sits in one line called Messages. That line doesn't tell you whether it was the screenshots,
the test output or the files Claude rewrote. The panel splits it open, and next to every item says
in plain words what it is, why it's that big, and what you can do about it.
From top to bottom:
- Context, 5-hour limit, weekly limit. Three meters, green, yellow or red. Under the context meter, roughly how many turns are left before auto-compaction at the current pace. Under the 5-hour meter, how long the limit lasts at the pace of the last hour. A line across the full width under the meters says how fast the context grows compared with your past sessions (🐌 🐈 🐇 🚀; it needs three sessions of five or more turns).
- What fills the context. One bar for the whole window, split into four groups: tool work, Claude Code itself, your conversation, skills and rules. Click a group to open it.
- A hint. One line, only when one item is big and you can do something about it: "Bash output took 61k. Ask Claude to run tests and go through long logs in a subagent: only the summary comes back." "Put in chat" puts a ready request in the prompt box after what you typed, or a command in place of it; you send it yourself. "Hide" hides it for the session. On the item page, "Don't show again" appears once you hide the advice or send it. Most of the advice comes from Anthropic's guide to reducing token usage.
- Action costs. The average price of one screenshot, one file written, one Bash command, one skill. This is the part that teaches: you see which habits are expensive.
- This session. How long it has run and how many messages you sent, how much of the 5-hour and weekly limits it used, what one message costs on average, and the compactions. A long session makes every message dearer, since each one sends the whole context again. The limits are shared, so sessions open side by side count too. If subagents ran: how many, how much they processed (new and from cache), and the three dearest with their biggest context and number of steps. Only a subagent's report reaches your context, so the rest of its work shows up only here.
- Context load chart, folded. One column per turn, as tall as what that turn added, so a heavy turn stands out as a peak. Below it, the five biggest jumps with their cause (point at one to light its column), and every compaction.
Click a group to see its items, click an item to get its help page:
| A group | An item |
|---|---|
![]() |
![]() |
A narrow pane stacks the meters and puts each row on two lines: the name, then its figures under it.
The panel speaks English unless Claude Code's language setting is Russian.
You need Claude Code with mods. I built and tested it on Claude Code 2.1.300 in a terminal.
/plugin marketplace add schudarin/chudarin-design-skills
/plugin install chudarin-context-mod@chudarin
The first line adds my plugin catalog, chudarin. It also lists a design agent for Figma; you
don't have to install it, the two are separate. Restart Claude Code after installing, then type
/ctx.
| Command | What it does |
|---|---|
/ctx |
Opens the panel. Again, or Esc while the panel has focus, closes it |
Click a row to open it, ← Back to return. If clicks don't land, focus the panel first:
click it or press ctrl+x tab.
In a fullscreen terminal wide enough, the panel docks beside the chat. Otherwise it opens above the prompt.
- Categories are the ones
/contextshows, from Claude Code's own estimate. - Messages are split by reading the conversation: tool results by tool, code Claude wrote,
tool arguments, reminders Claude Code adds, loaded skills, your messages, Claude's replies,
images. The split is estimated at about 4 characters per token, then scaled so the parts add up
to the Messages total from
/context. - Images count as 1.5k each. The conversation doesn't carry their size, so this is a guess.
- This session adds up the rises of each limit's percent while the session runs, and counts
the prompts you send (slash commands aside). The log is kept per session, survives a restart and
claude --resume, and holds the last 30 sessions. It starts when the mod is installed; earlier history isn't counted. - Subagents are read from their transcripts next to the session's
(
<session>/subagents/agent-<id>.jsonl) throughgrep, which passes on only the reply lines, so a file of tens of MB is read line by line, not whole. The session's transcript path arrives with your first message, so the lines show after it. Agents a workflow ran aren't counted. - Limits come from your plan's rate-limit windows. With an API key there are none, and the limit meters don't show.
Nothing leaves your machine. The mod makes no network calls.
- Mods are an early-access part of Claude Code. An update can change the API and break the panel until I fix it.
- Tested on macOS in a terminal and in the desktop app. VS Code and mobile aren't tested.
- The subagent lines run
grep, so it has to be on your PATH. They were checked only in a terminal. - Where an organization manages Claude Code, hooks on compaction don't run in plugins a person installs. The panel works, but the compaction lines in "This session" stay at zero.
claude plugin update chudarin-context-mod@chudarin # newest version, restart to apply
claude plugin uninstall chudarin-context-mod@chudarin # removeA separate script, not part of the mod: one line under the prompt.
Opus 5.5 │ ████░░░░░░ 42% ⧗ 12 min │ 73%↑ 1:48 │ my-project │ 🌿 rule-fixes │ 📁 scratch
42%: the context window. The bar is green under 50%, yellow under 80%, then red.⧗ 12 min: the prompt cache expires in 12 minutes, then the next message costs more. Hidden when writing the cache again would take under 20k tokens.73%↑ 1:48: the plan limit closest to running out, and the time until it resets.↑means it's being used up faster than time passes.- The folder and
📁 scratch(shown when Claude's scratchpad has files) open on click, in terminals that support links. 🌿 rule-fixes: the branch, shown only in a worktree session.
It needs jq. Download the script:
curl -o ~/.claude/statusline-command.sh \
https://raw.githubusercontent.com/schudarin/chudarin-context-mod/main/statusline/statusline-command.shThen point ~/.claude/settings.json at it. This replaces the status line you have now:
"statusLine": { "type": "command", "command": "bash ~/.claude/statusline-command.sh" }chudarin-design-skills: a design agent for Figma. A separate plugin in the same catalog.
MIT, see LICENSE.



