jimmyeao@jimmyeao
jimmyeao/claude-code-bars/tree/main/plugins/usage-bar
将方案用量限制绘制成提示列上方的条形图,每个时间窗口使用一种颜色,并在用量增长速度超过时钟进度时发出标记。使用 /usage-bar 切换。
jimmyeao/claude-code-bars/tree/main/plugins/usage-bar
将方案用量限制绘制成提示列上方的条形图,并标记用量增长速度超过时钟进度的时间窗口(示例输出,不是真实数据):
Usage · amber = using a window faster than its clock · session $12.19
Session █████████████████████░░░░░ 79% used · 47% of time · 32 pts ahead of the clock · resets in 2h 40m
Week ███░░░░░░░░░░░░░░░░░░░░░░░ 10% used · 61% of time · resets in 2d 18h
Session(5 小时)、Week(7 天),以及网关消费限制的 Spend。颜色表示对应的窗口。实心部分是已使用的额度,阴影部分是剩余额度。% of time 表示窗口已经过去的时间比例,根据它的重置时间计算。% used 变为琥珀色,并添加 N pts ahead of the clock。领先超过 25 个百分点,或已使用 95% 及以上时,变为红色。没有已知长度的窗口(消费限制)没有时钟,因此只有接近用满时才会标记。/usage-bar 可以切换它。每个工作阶段开始时默认开启。
$.session.usage():最近一次 API 响应中的速率限制窗口和工作阶段成本。AbovePrompt 区域绘制,位于其他也在该区域绘制的分段之上。显示调查时会暂时让开。/usage 的每一行都匹配。% of time 只是近似值。请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。
claude plugin marketplace add jimmyeao/claude-code-bars claude plugin install usage-bar
Draws your plan usage limits as bars above the prompt, and flags a window you are using faster than its clock (illustrative output, not real figures):
Usage · amber = using a window faster than its clock · session $12.19
Session █████████████████████░░░░░ 79% used · 47% of time · 32 pts ahead of the clock · resets in 2h 40m
Week ███░░░░░░░░░░░░░░░░░░░░░░░ 10% used · 61% of time · resets in 2d 18h
Session (5 hours), Week (7 days), and Spend for a gateway spend limit. The colour says which window it is. The solid part is what you have used, the shaded part is what is left.% of time is how much of the window has already passed, worked out from its reset time.% used amber and adds N pts ahead of the clock. More than 25 points ahead, or 95% used or more, turns it red. A window with no known length (the spend limit) has no clock, so it is flagged only when nearly full./usage-bar toggles it. It starts on in every session.
$.session.usage(): the rate-limit windows from the last API response, and the session cost.AbovePrompt band, on top of whatever other band mods draw there. It steps aside while a survey is showing./usage.% of time is approximate.