ClaudeMods
☰
ZH-TW
● 0 人在線上 · 瀏覽 0 次
贊助提交作品
Reddit 貼文 · 發布者 Antpocalypse_7

我做了一個 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]

其他同名作品

更多類似作品