ClaudeMods
☰
ZH-CN
● 0 人在线 · 浏览 0 次
赞助提交作品
GitHub 仓库 · 发布者 iamkhalid2

usage-band

Claude Code 插件在提示列上方绘制一条纤细的复古风状态线,显示 5 小时和每周套餐用量以及重置计时器。

iamkhalid2@iamkhalid2

iamkhalid2/usage-band/tree/main/plugins/usage-band

已翻译

关于这个 mod

usage-band 是一个 Claude Code 插件,会在提示列上方绘制一条复古风格的单行状态线,显示套餐用量上限已经使用了多少。

  • 5H:滚动的 5 小时窗口;WK:每周窗口。
  • 状态条使用低饱和度的 70 年代夕阳渐变(青绿色、芥末黄、焦橙色、砖红色),因此状态条越满,颜色看起来越暖。
  • 在宽度至少为 70 列的终端上显示距离每个窗口重置还有多久。
  • 只有在订阅套餐中,并且 Claude Code 已从第一次响应中读取到用量后,才显示一行;没有动画,也没有边框。
  • 在终端和桌面应用中都能通过 AbovePrompt 插槽工作。

安装:

claude plugin marketplace add iamkhalid2/usage-band
claude plugin install usage-band@usage-band

使用 /usage-band 切换。内部的 hooks 模块(plugins/usage-band/hooks/register.tsx)监听 session.measure 获取速率限制窗口,并在 AbovePrompt 上的 ui.render hook 中绘制。它只读取用量数字,不发起网络请求,也不会在工作会话之外存储任何内容。采用 MIT 授权。

安装

请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。

claude plugin marketplace add iamkhalid2/usage-band
claude plugin install usage-band
原文 / README

usage-band

A Claude Code mod: a slim, retro-styled line above the prompt that shows how much of your plan's usage limits you've used.

5H ▰▰▰▰▰▰▱▱▱▱▱▱ 62% · 2h 14m  ◆  WK ▰▰▱▱▱▱▱▱▱▱▱▱ 31% · 3d 4h
  • 5H: the rolling 5-hour window. WK: the weekly window.
  • Bars run through a muted 70s sunset gradient (teal, mustard, burnt orange, brick), so a fuller bar reads warmer.
  • Shows time until each window resets (on windows 70+ columns wide).
  • One line, no animation, no border. It stays out of the way.
  • Shown only on a subscription plan, once Claude Code has a reading from your first response. Without rate-limit data there is nothing to draw.
  • Works in the terminal and the desktop app (the AbovePrompt slot).

Install

claude plugin marketplace add iamkhalid2/usage-band
claude plugin install usage-band@usage-band

Start a new session (or reload plugins in a running one).

Use

It shows up on its own. /usage-band hides or shows the line.

Uninstall

claude plugin uninstall usage-band@usage-band

How it works

A hooks module (plugins/usage-band/hooks/register.tsx) listens to session.measure for the rate-limit windows and draws them in a ui.render hook on the AbovePrompt component. It reads usage figures only; it makes no network requests of its own and stores nothing outside the session.

License

MIT

Contact

[email protected]

其他同名作品

更多类似作品