KTCrisis/flux7-mods/tree/main/usage-bell
关于这个 mod
当会话接近上限时,在 Claude Code 会话内发出提示。每次 session.measure 会在上下文窗口达到 70/85/95%、已报告的速率限制窗口(5h、7d)达到 80/95% 并显示重置时间,以及自动记忆索引(MEMORY.md)达到 200 行或 25,000 字节加载上限的 90% 时显示 toast。每个阈值上升时只提示一次,下降 5 个百分点后重新启用。提示符下方会以暗色显示 ctx 62% · 5h 41% · 7d 12% · mem 145/200;/usage7 会将其与阈值一起打印,/usage7 test 会发出示例提示。它只发出信号,绝不会压缩或清理内容。
安装
请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。
claude plugin marketplace add KTCrisis/flux7-mods claude plugin install usage-bell
原文 / README
usage-bell
Rings, inside a Claude Code session, when the session nears a limit.
What it does
On each session.measure (the engine pushes one after every turn, and when a
rate-limit window moves a point):
- context: a toast at 70, 85 and 95 % of the window, with the tokens;
- rate limits: a toast at 80 and 95 % of each window the last response
reported (
5h,7d), with the time it resets; none off a subscription.
And for the auto-memory index (MEMORY.md, found in the session's own
context breakdown at start): read at start and after each Write or Edit into
its folder. The engine cuts it at load past 200 lines or 25,000 bytes
(2.1.288); the bell rings at 90 % of either, and again once it is past.
Each threshold rings once on the way up; a value that falls 5 points under it
(a compaction, /clear, a window that reset) arms it again.
The readings ride dim at the end of the hint line under the prompt, ctx 62% · 5h 41% · 7d 12% · mem 145/200, rather than as a pinned status line, which
the engine draws with a warning sign; /usage7 prints them against their
thresholds.
With avatar7 loaded, the avatar announces each toast in its own voice, in
amber. Neither mod depends on the other. /usage7 test rings a sample toast,
to hear that voice without waiting for a threshold.
Limits
- It signals and never acts: no compaction, no memory pruning.
- The memory limits are the engine's constants in 2.1.288; a later build may move them.
- Cost is left out: on a subscription it means nothing.
