RektyRowdyy/claude-mods/tree/main/plugins/usage-band
关于这个 mod
一个 Claude Code 插件,在提示符上方渲染一个状态栏,显示滚动的 5 小时和每周速率限制使用情况及倒计时、自模块加载以来的提示缓存令牌和会话成本(与 /cost 匹配)。
速率限制药丸需要订阅登录(Pro/Max);仅使用 API 密钥时,只显示缓存和成本药丸,在会话的第一次 API 响应后出现。图标是 Nerd Font 字形,颜色假设为深色终端主题。
开发命令:claude plugin validate plugins/usage-band 和 claude plugin test plugins/usage-band。Hook 位于 hooks/register.tsx(AbovePrompt 的 session.start、session.measure、turn.complete 和 ui.render),在 hooks/format.ts 中有纯格式化辅助程序。
安装
请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。
claude plugin marketplace add RektyRowdyy/claude-mods claude plugin install usage-band
原文 / README
usage-band
A band above the Claude Code prompt showing how much of your plan you've used and what the session costs.
5h 20% 2h 40m 7d 58% 1d 7h 954.2k $4.32
| Pill | Shows |
| --- | --- |
| 5h | Rolling 5-hour rate limit: % used, then time until it resets |
| 7d | Weekly rate limit: % used, then time until it resets |
| | Prompt-cache tokens (read + written) since the mod loaded |
| | Session cost, the same figure as /cost |
Notes
- Rate-limit pills need a subscription login (Pro/Max). With an API key there are no windows to show, so only the cache and cost pills appear. They show up after the session's first API response.
- Cache tokens count from when the mod loads; the cost is the whole session's, as Claude Code keeps it.
- Icons are Nerd Font glyphs. Without a Nerd Font in your terminal they show as boxes.
- Colours assume a dark terminal theme.
Development
claude plugin validate plugins/usage-band
claude plugin test plugins/usage-band
hooks/register.tsx holds the hooks (session.start, session.measure, turn.complete, and the
ui.render hook for AbovePrompt); hooks/format.ts holds the pure formatting helpers.
其他同名作品
- usage-bandyash-gadodia · ★ 1
- usage-bandpawandeepdhall · ★ 1
- usage-bandersinkoc · ★ 1
- usage-bandnemokoala · ★ 0


