
我做了一个 Mod:在提示框上方实时显示 5 小时/每周用量、重置预测和上下文百分比,可选自动压缩并提供手动压缩按钮
一位 Reddit 作者分享了一个 Claude Code 插件,会在提示框上方显示 5 小时和每周用量、重置预测及上下文窗口百分比,并提供手动 Compact 按钮和可选的自动压缩(15%-99% 可调,默认 30%)。

关于这个 mod
这是一个位于提示框上方的 Claude Code 状态 HUD mod,显示与 Plan usage limits 面板一致的实时 5 小时和每周用量、根据平常速度计算的重置预测,以及按 Messages、Tools 和 Other 拆分的上下文窗口百分比,与 /context 的计数方式一致。它包含 Compact 按钮和可按会话设置的自动压缩,范围为 15% 到 99%(默认 30%,新会话关闭),会载入已有会话,也可以折叠为保留相关用量信息和计时器的一行,并通过 /quota 切换。它支持深色和浅色主题,会随桌面应用主题自动切换,也适配桌面应用中从最窄宽度开始的所有窗口宽度。它在本地运行,读取上下文数据和每条回复携带的用量数据;大约每 2 分钟通过现有登录调用 /usage 和 /context,这是唯一的网络调用,不会直接处理凭据。采用 MIT 许可证,主要只有一个文件,建议安装前阅读。已知限制:空的 welcome 屏幕在发送消息前无法绘制,且 v0.1.3 还有粗糙之处。可在 Claude Code 内使用 /plugin install claude-code-usage-quota --marketplace anantraghunath/claude-code-usage-quota-mod 安装。仓库和截图:https://github.com/anantraghunath/claude-code-usage-quota-mod
安装
安装方法请查看原始来源。
原文 / README
I used to keep checking my usage way too often. Settings, the usage page, /usage , or the little circle for the Context usage. I also kept forgetting to compact until the context was huge and my limits were draining faster. When I found out yesterday that Claude Mods have landed, I built a small helper that sits above the prompt and shows it all, along with a few more features I've wanted since I started using Claude Code in the Desktop App (also works in the terminal btw). What it shows: 5 Hour and Weekly usage, matching the app's own Plan usage limits panel (it's your whole account, so chat and Cowork use counts too) A forecast of where you'll be at reset. It learns your usual pace, so an early context burst doesn't set off alarms. If you're on course to run out, it says roughly when. Context window % with a Messages, Tools and Other breakdown, as /context counts it A Compact button, plus optional Auto compact at a % you pick (30% by default, but anywhere between 15% to 99% works). It's set per session and off for new sessions, so a big feature build can keep its full context if you'd like or you can save tokens when you don't need big context and are okay with compacting often. It loads on any existing chat/session once you open them and can also be collapsed to one line which still shows the relevant usage info and timers, and /quota toggles it on and off. Works on both Dark and Light Themes, automatically switching when you switch the theme on the desktop app. It also works on all window widths down to the narrowest in the desktop app. I t runs locally and reads what Claude Code already has (context data plus the usage data each reply carries). About every 2 minutes it calls the servers for /usage and /context via your existing login, the same data the usage panel shows to ensure up to date data on both, especially the context breakup data. That's the only network call. It never handles your credentials directly. It's MIT Licensed, mostly one file, so please read it before installing. Known limits: it can't draw on the desktop's empty "Welcome back" screen until you send a message, because there's no session there yet. And it's v0.1.3, so expect rough edges. Install from inside Claude Code: /plugin install claude-code-usage-quota --marketplace anantraghunath/claude-code-usage-quota-mod Repo and screenshots: https://github.com/anantraghunath/claude-code-usage-quota-mod Full disclosure: I built it with Claude Code in about a day. Feedback and bug reports are all welcome. Credit where it's due: this started from the prompt u/itsxzy shared in I'm liking the new mods feature . I took it and kept building. Thanks! submitted by /u/Antpocalypse_7 [link] [comments]
其他同名作品
- 我制作了一个 Mod,可以实时显示您的 5hQXZKQZXAQ 使用情况,在提示框上方重置预测和上下文%,并带有可选的自动压缩和手动压缩按钮Antpocalypse_7 · ★ 0
