Akash001uts/claude-mods/tree/main/plugins/context-bar
context-bar
Claude Code のプラグインです。プロンプト上部にコンテキストウィンドウの使用量バーを表示し、/context のカテゴリ別に分け、レート制限、自動コンパクトまでの残りトークン、セッション長も示します。
この mod について
context-bar はプロンプト上部に積み上げバーを置き、コンテキストウィンドウがどれだけ埋まっているかを、/context が報告するものと同じカテゴリ(システムプロンプト、ツール、メモリファイル、メッセージなど)に分けて表示します。各セッションの開始時に有効になり、各ターン後に更新されます。2行目にはサブスクリプションアカウントの 5時間と7日間のレート制限、自動コンパクトまでの残りトークン、セッションの実行時間を表示し、場所がなければ自分を隠します。/context-bar コマンドはセッションごとにバーを切り替え、/context-bar details は完全な内訳をペインで開きます。各カテゴリのウィンドウ占有率、メモリファイル、MCP サーバーとロード済みツール、最大の skills、カスタムエージェント、直近の API 呼び出しのキャッシュ分割を確認できます。Claude Code から使用量の数字だけを読み、ファイルやメッセージは読みません。外部へ何も送らず、ディスクにも何も保存しません。
インストール
まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。
claude plugin marketplace add Akash001uts/claude-mods claude plugin install context-bar
原文 / README
context-bar
A bar above the prompt that shows how full your context window is, split into the same categories /context uses
(system prompt, tools, memory files, messages and so on). I used to run /context every so often just to check how
heavy a session was getting. Now it's always there, so I can wrap up before auto-compact kicks in, and I can spot
what's eating my context, like MCP servers I forgot were still connected.
███████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒ 30% 60.0k/200.0k
■ System prompt 4.0k ■ Messages 56.0k
5h 42% (resets in 2h 14m) · 7d 18% · 100.0k to compact · session 2h 5m
How it works
- It turns on at the start of every session and updates after each turn.
- The third line shows your 5-hour and 7-day rate limits (subscription accounts only), how many tokens are left before auto-compact, and how long the session has been running. It hides itself if there isn't room for it.
/context-barhides or shows the bar for the current session./context-bar detailsopens a pane with the full breakdown: each category and its share of the window, every memory file, MCP servers (and how many of their tools are loaded), your biggest skills, custom agents, and the cache split of the last API call. Pressrto refresh it.
What it runs and stores
- It only reads the session's usage numbers from Claude Code, the same ones
/contextshows. It doesn't read your files or messages, and it doesn't send anything anywhere. - The details pane asks Claude Code for the full token count, which costs a few extra requests (same as running
/context). So it only refreshes while the pane is open, after each turn or when you pressr. - Whether the bar is on is kept for the current session only. Nothing is written to disk.
Licence
MIT
同名の他の作品
- context-barrodbegbie · ★ 0
- context-barziedgithub · ★ 0
- context-barvrnrn · ★ 0
