alexgreensh/token-optimizer/tree/main/desktop/token-optimizer-desktop
token-optimizer
Claude デスクトップアプリ用のステータスバー。プロンプト上に表示され、セッション品質、コンテキストの充填量、キャッシュのカウントダウン、5 時間および週間制限を示し、Clawd がセッションの動作を演じます。
この mod について
Token Optimizer Desktop
Claude デスクトップアプリ用のステータスバー。プロンプト上に表示され、セッション品質、コンテキストの充填量、キャッシュのカウントダウン、5 時間および週間制限を示し、Clawd がセッションの動作を演じます。
Install
Token Optimizer plugin に含まれており(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
- 最も急ぐべきことを 1 文で示す表示。ボタンは最大 1 つです。
- ホバーカード付きの 5 つのマーク:品質グレード、コンテキストの充填量、キャッシュのカウントダウン、5 時間制限、週間制限。
- Clawd の横の矢印を開くと、もう 1 行にブランチ、セッション時間、ツール呼び出し、コンパクション(あれば)、最後のチェックポイントを保存した時刻(種類を問わず、または以前のセッションからの関連するもの)、そして過去 30 日間に Token Optimizer が節約した token 数(ダッシュボードと同じ合計)が表示されます。
- ボタン:Clean up(Token Optimizer の案内に従ってコンパクト化)、Start fresh(2 回目のクリックでチェックポイントを保存してクリアし、最初のメッセージに引き渡す)、Keep warm(キャッシュが warm の間だけ使える手動の 1 クリック更新。自動ではなく、少量の使用量を消費)。
キャッシュのカウントダウンは推定値です。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

