alexgreensh/token-optimizer/tree/main/desktop/token-optimizer-desktop
token-optimizer
Claude 桌面應用程式的狀態列。它顯示在提示列上方,呈現工作階段品質、內容脈絡填充量、快取倒數,以及 5 小時與每週限額,並讓 Clawd 演出工作階段正在做什麼。
關於這個 mod
Token Optimizer Desktop
Claude 桌面應用程式的狀態列。它顯示在提示列上方,呈現工作階段品質、內容脈絡填充量、快取倒數,以及 5 小時與每週限額,並讓 Clawd 演出工作階段正在做什麼。
Install
它隨 Token Optimizer 外掛提供(hooks/hooks.json 會在 modules 下指定此資料夾的 hooks/register.tsx),因此不需要額外安裝。此資料夾保留自己的 manifest,只是為了讓測試可以透過 claude plugin test 獨立執行。
需要 Claude Code 2.1.287 或更新版本,以及 Anthropic 的 mods 功能。Anthropic 可以遠端關閉 mods;關閉時不會出錯,只是狀態列不會出現。終端機會保留現有的狀態列。不支援 VS Code。
What you get
- 用一句話說明最緊急的事情,最多附帶一個按鈕。
- 五個可顯示暫留卡片的標記:品質等級、內容脈絡填充量、快取倒數、5 小時限額、每週限額。
- Clawd 旁邊的箭頭會展開另一行:分支、工作階段時間、工具呼叫、壓縮次數(有的話)、上一次檢查點儲存的時間(任何類型,或較早工作階段中的相關檢查點),以及 Token Optimizer 在最近 30 天替你省下的 token 數量,也就是儀表板顯示的相同總數。
- 按鈕:Clean up(依照 Token Optimizer 的指引進行壓縮)、Start fresh(第二次點擊會儲存檢查點、清除內容,並把它交給你的第一則訊息)、Keep warm(手動一鍵重新整理快取,只在快取處於 warm 狀態時可用,永不自動執行,會使用少量用量)。
快取倒數是估計值:Claude 方案為 1 小時,API 為 5 分鐘;可能時會從工作階段本身開始計算。
Settings
在 ~/.claude/settings.json 的 env 區塊中設定 TOKEN_OPTIMIZER_STATUS_BAR=0 可隱藏狀態列,設定 TOKEN_OPTIMIZER_STATUS_BAR_ANIMATE=0 可讓 Clawd 保持不動。
Full docs
請參閱 Token Optimizer README 和文件網站頁面「Claude desktop app」。
安裝
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add alexgreensh/token-optimizer claude plugin install token-optimizer
原文 / README
Token Optimizer Desktop
A status bar for the Claude desktop app. It draws above your prompt and shows session quality, context fill, cache countdown, and your 5-hour and weekly limits, with Clawd acting out what the session is doing.
Install
It ships inside the Token Optimizer plugin (hooks/hooks.json names this folder's hooks/register.tsx under modules), so there is nothing extra to install. This folder keeps its own manifest only so its tests run on their own with claude plugin test.
Needs Claude Code 2.1.287 or newer and Anthropic's mods feature. Anthropic can switch mods off remotely; when off, nothing breaks and the bar just does not appear. The terminal keeps its existing status line. VS Code is not supported.
What you get
- One sentence about the most urgent thing, with at most one button.
- Five marks with hover cards: quality grade, context fill, cache countdown, 5-hour limit, weekly limit.
- The arrow beside Clawd unfolds one more line: branch, session time, tool calls, compactions (when any), when the last checkpoint was saved (any kind, or a relevant one from an earlier session), and the tokens Token Optimizer saved you in the last 30 days, the same total the dashboard shows.
- Buttons: Clean up (compacts with Token Optimizer's guidance), Start fresh (second click saves a checkpoint, clears, and hands it to your first message), Keep warm (manual one-click cache refresh, only while the cache is warm, never automatic, uses a small amount of usage).
The cache countdown is an estimate: 1 hour on Claude plans, 5 minutes on the API, measured from the session itself when possible.
Settings
TOKEN_OPTIMIZER_STATUS_BAR=0 hides the bar and TOKEN_OPTIMIZER_STATUS_BAR_ANIMATE=0 keeps Clawd still, set in the env block of ~/.claude/settings.json.
Full docs
See the Token Optimizer README and the docs site page "Claude desktop app".
其他同名作品
- token-optimizeralexgreensh · ★ 2495

