claude-code-mods

context-bar

Your context window as one stacked bar above the prompt, a color per category, with token counts and where it compacts.

See what's happening Version 0.1.1

context-bar: 273k of 1M tokens used, compacts at 967k, 27 percent. A stacked bar splits system prompt, tools, MCP instructions, agents, memory files, skills and messages
What fills the context window, one color per category.

Install

claude plugin marketplace add hamzafer/claude-code-mods
claude plugin install context-bar@claude-code-mods

Restart Claude Code after installing. To try it without installing, clone the repo and run claude --plugin-dir mods/context-bar.

How to use

/context-bar
Hides or shows the bar. The choice is kept across sessions

How it behaves

  • One bar the width of the band, split by what fills the window: system prompt, tools, MCP tools, memory files, skills, messages, then free space and the compaction buffer.
  • Each used category gets its own color, messages in orange. Free space is a thin grey line (─), and the compaction buffer is hatched (░).
  • The header shows the tokens in use, the window, where auto-compaction runs, and the percent. The percent turns yellow at 70% of the compaction point and red at 90%.
  • It refreshes after each of the main agent's turns and after a compaction, from the same breakdown /context draws, estimated locally (no extra API calls).
  • Pairs with token-weather: that one tracks the trend and the cache, this one shows what the tokens are.