leonardokidd/cc-usage
cc-usage
Claude Code 狀態列外掛,顯示方案用量、重置倒數、工作階段 token、花費與即時每秒 token,並提供已驗證的 manifest 與 hooks。
關於這個 mod
cc-usage 是一個 Claude Code 狀態列外掛,以固定寬度格式顯示 5 小時與 7 天方案用量的重置倒數、工作階段的輸入與輸出 token、以 USD 計算的工作階段花費,以及即時輸出每秒 token 數。它同時適用於桌面應用程式的 Code 分頁與 CLI。使用 /plugin marketplace add leonardokidd/cc-usage 和 /plugin install cc-usage@cc-usage 安裝;需要 Claude Code 2.1.286 或更新版本。指令包括 /usage-bar(切換狀態列)與 /usage-bar raw(顯示原始速率限制和花費數值)。用量欄位需要 Claude 訂閱;數值為唯讀,而且只涵蓋主要對話。
安裝
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add leonardokidd/cc-usage claude plugin install cc-usage
原文 / README
cc-usage
A Claude Code status line showing your plan usage, tokens, cost and live speed. Works in the desktop app's Code tab and the CLI.
cc-usage ⏳ 5% | 2h 11m 📅 1% | 5d 6h ⬆️ 99.9k ⬇️ 6.2k 💵 10.6 ⚡ 𝟷𝟺𝟺.𝟶 t/s
| Field | Meaning | |---|---| | ⏳ | 5-hour limit used, and time until it resets | | 📅 | 7-day limit used, and time until it resets | | ⬆️ | Input tokens sent this session (fresh input plus prompt-cache reads and writes, summed over every request) | | ⬇️ | Output tokens this session; counts up live while Claude replies | | 💵 | Session cost in US dollars | | ⚡ | Output tokens per second; live while Claude replies, then the exact figure for the last reply. Fixed width (monospace digits) so the line does not shift as it updates |
Install
In Claude Code:
/plugin marketplace add leonardokidd/cc-usage
/plugin install cc-usage@cc-usage
Requires Claude Code 2.1.286 or newer (function-hook plugins, an early-access feature that may change between releases).
Commands
/usage-barshows or hides the line./usage-bar rawprints the raw rate-limit and cost figures Claude Code hands the plugin.
Notes
- Usage figures need a Claude subscription. Off a subscription the ⏳ and 📅 fields show
--. - Usage can lag Settings → Usage by up to one reply. The figures arrive with each API response, so use in other chats appears after this session's next reply.
- Percentages are whole numbers. Claude Code reports whole points, so they can differ from Settings by 1.
- ⬆️ and ⬇️ cover the main conversation only. Subagent turns pass through uncounted.
- Read-only. The plugin observes the session and adds one status line; it does not change prompts, tool calls, replies or anything else Claude Code draws.
License
MIT. See LICENSE.
