ClaudeMods
☰
ZH-TW
● 0 人在線上 · 瀏覽 0 次
贊助提交作品
GitHub 儲存庫 · 發布者 Akash001uts

context-bar

一個 Claude Code 外掛,在提示列上方顯示即時脈絡視窗用量列,依 /context 類別拆分,並顯示速率限制、自動壓縮前剩餘的 token 與工作階段長度。

Akash001uts@Akash001uts

Akash001uts/claude-mods/tree/main/plugins/context-bar

已翻譯

關於這個 mod

context-bar 會在提示列上方放置堆疊用量列,顯示脈絡視窗有多滿,並依 /context 回報的相同類別拆分(系統提示、工具、記憶檔案、訊息等)。它在每個工作階段開始時啟用,每個回合後更新。第二行會顯示訂閱帳號的 5 小時與 7 天速率限制、自動壓縮前剩餘的 token,以及工作階段執行時間;空間不夠時會隱藏自己。/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-bar hides or shows the bar for the current session.
  • /context-bar details opens 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. Press r to refresh it.

What it runs and stores

  • It only reads the session's usage numbers from Claude Code, the same ones /context shows. 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 press r.
  • Whether the bar is on is kept for the current session only. Nothing is written to disk.

Licence

MIT

其他同名作品

更多類似作品