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

context-meter

Claude Code のプロンプト上部にステータスバンドを追加し、自動コンパクトまでのコンテキスト使用量、プロンプトキャッシュの有効期限カウントダウン、リセット時刻付きの 5 時間・週間使用量上限、コールドセッション用の再開ガードを表示します。

redzrush101@redzrush101

redzrush101/claude-mods/tree/main/plugins/context-meter

翻訳済み

この mod について

プロンプトの上にバンドを表示します。

context ???€?€?€?€?€?€?€?€?€?€  19% 185k/967k 繚 cache 59m 繚 usage 5h 23% ??14:40 繚 week 41% ??Thu 09:00
  • context:自動コンパクトの基準点に対する使用量。75% から黄色、90% から赤になります。残りが 30 未満になると、コンパクトまでの残りターン数を表示します。
  • cache:プロンプトキャッシュの有効期限までの時間。最後のリクエストから数えます。5 分前に通知し、その後は cold 繚 next message re-reads ?圳 と表示します。ヒット率が 80% を下回ると表示されます。
  • usage:5 時間と週間の上限、およびリセット時刻。80% と 95% で通知します。
  • resume guard:キャッシュの期限が切れたセッションを再開すると、サイズ、アイドル時間、再キャッシュの推定コストを表示し、Compact と Dismiss のボタンを出します。コンテキストが 50k を超えている場合は、最初のメッセージを一度だけ保留します(もう一度送れば続行できます)。

独自に API リクエストを送ることはありません。すべての数値は Claude Code がすでに持っているものです。

オプション(/plugin configure context-meter@claude-mods):cacheTtlMinutes(デフォルト 60。1 時間のプロンプトキャッシュでは 60、5 分のものでは 5)と resumeGuard(デフォルト true。コールド再開後の最初のメッセージを保留)。

インストール:

claude plugin marketplace add redzrush101/claude-mods
claude plugin install context-meter@claude-mods

テスト:claude plugin test plugins/context-meter。

インストール

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

claude plugin marketplace add redzrush101/claude-mods
claude plugin install context-meter
原文 / README

claude-mods

Claude Code mods (plugins of function hooks).

claude plugin marketplace add redzrush101/claude-mods
claude plugin install context-meter@claude-mods

Or inside Claude Code: /plugin marketplace add redzrush101/claude-mods.

context-meter

A band above the prompt:

context ━━──────────  19% 185k/967k · cache 59m · usage 5h 23% ↻ 14:40 · week 41% ↻ Thu 09:00
  • context: fill against the auto-compact point; yellow from 75%, red from 90%. Turns left before compaction appear when fewer than 30 remain.
  • cache: time until the prompt cache expires, counted from the last request; a toast 5 minutes before, and cold · next message re-reads … after. The hit rate appears when it drops below 80%.
  • usage: the 5-hour and weekly limits with reset times; toasts at 80% and 95%.
  • resume guard: resuming a session whose cache expired shows its size, idle time and estimated re-cache cost, with Compact and Dismiss buttons, and holds the first message once when the context is over 50k (send again to go ahead).

It makes no API requests of its own: every figure is one Claude Code already has.

Options (/plugin configure context-meter@claude-mods):

| Option | Default | | | --- | --- | --- | | cacheTtlMinutes | 60 | 60 for the 1-hour prompt cache, 5 for the 5-minute one | | resumeGuard | true | hold the first message after a cold resume |

Tests: claude plugin test plugins/context-meter.

同名の他の作品

関連作品