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

quota-band

一个 Claude Code 插件,在提示上方显示一行 5 小时和每周计划使用量、上下文窗口占用度和提示缓存剩余时间,并可选提供自定义提示按钮。

andras-gyarmati@andras-gyarmati

andras-gyarmati/claude-quota-band

已翻译

关于这个 mod

quota-band 是 Claude Code 的状态 HUD mod,通过提示上方的一行内容让你随时看到计划用量。

它用按使用百分比填充的条显示 5 小时和每周窗口,用灰色刻度表示窗口已过去的比例,并显示小时/日期刻度;颜色规则为 95% 起红色、80% 起橙色、领先于均匀速率时黄色,否则白色。→ N% 标记显示按当前速率到重置时会达到的位置,并显示重置时间。它还报告 ctx(上下文窗口已使用多少,以及冷缓存时下一次请求会重新发送多少 token)和 cache(提示缓存保持温热的时间,从每轮结束时的 transcript 读取;最后五分钟变橙并弹出提示,变冷后变红)。

两个可选按钮可以发送你选择的提示,需在 /config 或 settings.json 的 pluginConfigs 下配置。

它读取 Claude Code 每次响应已经收到的数字(session.measure),不会自行发送请求,也不读写文件。需要 Claude Code 2.1.287 或更高版本,以及 Pro、Max 或 Team 方案。条形图显示在桌面应用的 Code 标签页;终端会以文字显示同一行。

使用 /plugin marketplace add andras-gyarmati/claude-quota-band,然后 /plugin install quota-band@claude-quota-band 安装。

安装

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

claude plugin marketplace add andras-gyarmati/claude-quota-band
claude plugin install quota-band
原文 / README

quota-band

A Claude Code mod that keeps your plan's usage in view: one line above the prompt with the 5-hour and weekly windows, the context window and the prompt cache's time left.

5h ▬▬▬▬▬▬▬▬▬ 93% → 100% 23:10    7d ▬▬▬▬▬▬▬ 72% 11:00    ctx ▬▬▬ 37% 370k    cache ▬▬▬ 42m
  • Each bar fills with the percent used. A grey tick marks how much of the window has passed, and the notches are hours (5h) or days (7d).
  • Colours: red from 95%, orange from 80%, yellow while you are ahead of an even pace, white otherwise.
  • → N% is where the current pace lands by the reset, with a dashed outline on the bar.
  • The time is when the window resets.
  • ctx is how full the context window is; 370k is what the next request re-sends, which a cold cache has to write again.
  • cache drains over the time the prompt cache stays warm after the last response: the length the last response actually wrote, read from the transcript at the end of each turn, so it drops to five minutes in overage. Until the first turn ends (and on Windows, which has no tail) it assumes an hour on a subscription's main thread, five minutes otherwise, or what promptCacheTtl sets. It turns orange in the last five minutes, with a toast, and red once cold.

Buttons

Two optional buttons send a prompt of your choice, for example a wrap-up skill. Set them in /config under the plugin's options, or in settings.json:

"pluginConfigs": {
  "quota-band@claude-quota-band": {
    "options": { "closeCommand": "/close-thread", "renamePrompt": "Rename this thread to cover every topic in it" }
  }
}

Empty hides a button. A press during a turn waits until the turn ends.

It reads the figures Claude Code already receives with each response (session.measure), so it sends no requests of its own and reads or writes no files. The figures appear after the first response of a session, on Pro, Max and Team plans.

Install

Needs Claude Code 2.1.287 or later (Claude Mods). In Claude Code:

/plugin marketplace add andras-gyarmati/claude-quota-band
/plugin install quota-band@claude-quota-band

To pick up new versions on each start, set "autoUpdate": true for this marketplace under extraKnownMarketplaces in settings.json.

Bars draw in the desktop app's Code tab; the terminal shows the same line as text.

更多类似作品