ClaudeMods
☰
JA
● 0 人がオンライン ・閲覧 0 回
スポンサー作品を投稿
GitHub リポジトリ · 投稿者 Vosssa

usage-band

コンテキスト使用量、5時間制限、週次制限、プロンプトキャッシュの温度をプロンプト上に4つのリングで表示し、大きなコンテキストには Clear/Compact 操作を提案する行を出す Claude Code プラグイン。

Vosssa@Vosssa

Vosssa/claude-usage-band/tree/main/plugins/usage-band

元の投稿の画像1
翻訳済み

この mod について

usage-band は Claude Code のプロンプト上に4つのリングを常時表示します。Context(例:92k / 1M)、リセット時刻付きの 5h 使用量制限、リセット時刻付きの 7d 週次制限、そして Cache warmth(残り TTL を伴う Warm または Cold)です。制限に近づくとリングは緑、アンバー、赤へ変わります。コンテキストが 400k token を超えると、ワンクリックの Clear、Compact、Later 操作を持つリマインダー行が表示され、キャッシュ状態に応じて最も安い手段を選びます(コールドキャッシュでは Clear、期限間近またはウォームキャッシュでは Compact)。同じ4項目はターミナルの Claude Code では文字リング(○ ◔ ◑ ◕ ●)として表示されます。常時約 0 token で動作すると報告されます。プロンプトには何も追加せず、モデルを呼び出さず、各応答後に Claude Code が送る使用量だけを受け取り、カウントダウン用にローカルの1分タイマーだけを動かします。キャッシュタイマーは実際の API のヒット/ミス数と照合され、TTL は観測したヒットまたはミスから学習されます。状態は再起動後も残り、制限はプロジェクト間で共有されます。5h と 7d のリングにはサブスクリプションが必要です。API key では Context と Cache だけが表示されます。'claude plugin marketplace add Vosssa/claude-usage-band' と 'claude plugin install usage-band@claude-usage-band --scope user' でインストールできます。MIT ライセンスです。

インストール

まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。

claude plugin marketplace add Vosssa/claude-usage-band
claude plugin install usage-band
原文 / README

usage-band

Your Claude Code limits, context fill and prompt-cache warmth, right above the prompt.

usage-band: context, 5h, weekly and cache rings above the Claude Code prompt

Four small rings, always in view:

| | What it shows | |---|---| | Context | How full the context window is: 92k / 1M | | 5h | Your 5-hour usage limit, and when it resets | | 7d | Your weekly limit, and when it resets | | Cache | Whether the prompt cache is Warm (and how long it has left) or Cold |

Rings go green → amber → red as you approach a limit.

The big-context reminder

Above 400k tokens of context, a reminder row appears with one-click actions. It knows the state of the cache and suggests the cheapest move:

usage-band reminder row with Clear, Compact and Later buttons

| Situation | Message | Suggested | |---|---|---| | Cache is cold | Cache cold: next message re-reads 452k. Clear is free. | Clear | | Cache expires within 10 min | Cache expires in 6m: compact now while it's cheap. | Compact | | Cache is warm | 452k in context: each turn re-sends all of it. | Compact |

Later hides the row until the context grows by another 100k.

Why this matters: a cached prompt is read at about a tenth of the normal input price. Once the cache has expired, your next message pays to read the whole conversation again, and so does /compact. /clear costs nothing.

Terminal too

In terminal Claude Code it shows the same four items with text rings (○ ◔ ◑ ◕ ●):

usage-band in terminal Claude Code

Install

claude plugin marketplace add Vosssa/claude-usage-band
claude plugin install usage-band@claude-usage-band --scope user

Restart Claude Code. The band appears in every session, in both the desktop app and the terminal.

Update later with:

claude plugin marketplace update claude-usage-band
claude plugin update usage-band@claude-usage-band

Cost: zero tokens

claude plugin details usage-band@claude-usage-band reports Always-on: ~0 tok.

  • It adds nothing to the prompt and never calls the model.
  • The usage numbers are pushed to it by Claude Code after each response. It never polls for them.
  • It runs one local timer, once a minute, to keep the countdowns current.

Notes

  • The cache timer is checked against the real numbers. The countdown runs from your last response. After every message, the API's own cache counts show whether it was actually read from cache (✓ hit 98%) or paid in full (✗ missed 452k). An unexpected miss also shows a toast.
  • The TTL is learned. It starts by assuming 1 hour on a subscription and 5 minutes on an API key. When a message sent after a longer pause still hits, or misses, the band switches to the TTL it actually saw and remembers it.
  • It remembers between restarts. The limits and the cache timer show up right away when you open a session, not only after your first message. Limits are shared across projects: a session you switch back to picks up newer numbers within a minute.
  • The 5h and 7d rings need a subscription. On an API key, only Context and Cache are shown.

License

MIT

同名の他の作品

関連作品