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

show-usage

Claude Code 外掛,在一條狀態列上顯示上下文視窗使用情況和 5 小時/7 天工作階段使用限制,每次回應後更新。

ricardo-martincoski@ricardo-martincoski

ricardo-martincoski/claude-lab/tree/main/plugins/show-usage

已翻譯

關於這個 mod

show-usage

在一條狀態列上顯示上下文視窗使用情況和 5 小時及 7 天工作階段使用限制, 每次回應後更新:

⚠ show-usage: context 28% | session 30% [21:50] | week 5% [Sat 2026-10-10 07:00]
  • context:上下文視窗有多滿。
  • session 和 week:5 小時和 7 天工作階段使用限制,/usage 顯示為 "Current session" 和 "Current week",重置時間在括號中,採用本機時間。

Claude Code 新增 ⚠ show-usage: 前置字元以標記該行來自外掛。

安裝

/plugin marketplace add ricardo-martincoski/claude-lab
/plugin install show-usage@claude-lab

參閱 claude-lab README 從本機複製進行安裝或開發該 外掛。

值不顯示的時候

該行僅顯示 Claude Code 迄今為止報告的內容:

  • Claude Code 工作階段的第一次回應之前什麼都不顯示。
  • 壓縮之後直到下次回應之前,沒有 context 部分。
  • 不使用 Claude 訂閱時(例如使用 API 金鑰),沒有 session 和 week 部分。
  • Claude Code 未報告時間時,沒有重置時間。

該行僅在回應到達時改變,所以當 Claude Code 工作階段閒置時,即使在使用限制重置後, 它也保持最後的值。

安裝

請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。

claude plugin marketplace add ricardo-martincoski/claude-lab
claude plugin install show-usage
原文 / README

show-usage

Shows context window usage and the 5-hour and 7-day session usage limits on one status line, updated after every response:

⚠ show-usage: context 28% | session 30% [21:50] | week 5% [Sat 2026-10-10 07:00]
  • context: how full the context window is.
  • session and week: the 5-hour and 7-day session usage limits, which /usage shows as "Current session" and "Current week", with their reset times in brackets, in local time.

Claude Code adds the ⚠ show-usage: prefix to mark the line as coming from a plugin.

Install

/plugin marketplace add ricardo-martincoski/claude-lab
/plugin install show-usage@claude-lab

See the claude-lab README to install from a local clone or to develop the plugin.

When values are not shown

The line shows only what Claude Code has reported so far:

  • Nothing at all before the first response of a Claude Code session.
  • No context part right after a compaction, until the next response.
  • No session and week parts when not using a Claude subscription (for example with an API key).
  • No reset time when Claude Code does not report one.

The line changes only when a response arrives, so while the Claude Code session is idle it keeps the last values, even after a usage limit resets.

更多類似作品