pkkid/claude-mods/tree/main/plugins/aitools
この mod について
aitools
プロンプトの上にある1行のバーで、Claude のサブスクリプションが制限までどれだけ近いかと、その作業を Anthropic API の定価で行った場合のコストを表示します。
AI Tools 5h 42% ·1h12m wk 18% ·Thu ctx 31% 62k/200k cache 42m thread $3.12 (+$0.41) month $184.20 limit ~3:40pm [🛠] [⁝]
| Segment | Meaning |
|---|---|
| AI Tools | バーの名前を示す薄いラベル |
| 5h 42% ·1h12m | 5時間の使用ウィンドウ:使用率とリセットまでの時間 |
| wk 18% ·Thu | 週次ウィンドウ:使用率とリセットされる曜日(1日未満なら時間) |
| ctx 31% 62k/200k | コンテキストウィンドウの使用状況:使用率と使用済みトークン数/ウィンドウサイズ |
| cache 42m | プロンプトキャッシュを温かい状態に保つ時間:Claude Code はメイン会話のキャッシュを TTL 1時間で書き込み、リクエストごとにタイマーを再開します。10分未満ではアンバーになり、期限切れになると cache cold になります。リクエスト時刻からの推定値であり、API はキャッシュ状態を報告せず、Anthropic が早期に追い出すこともあります |
| thread $3.12 | このセッションの API 価格でのコスト |
| (+$0.41) | 直前のターンのコスト(スレッドのコストを隠している場合は last $0.41) |
| month $184.20 | 今月、このマシン上のすべての Claude Code セッションで使った API 価格相当の金額 |
| limit ~3:40pm | 直近1時間のペースから見積もった、5時間ウィンドウを使い切る時刻。リセット前の場合だけ表示 |
使用量とコンテキストは 70% で黄色、90% で赤になります。まだ値が分からない場合は — と表示されます。セッションの最初の応答までは、前のセッションの数値を表示します。
バーの表示と非表示
/aitools はボタンを含むバー全体を切り替えます。/aitools on と /aitools off で状態を指定できます。この選択はセッションをまたいで保持されます。/handoff はどちらの状態でも動作します。
設定
⁝ を押すとバーの上に設定が開き、1行5項目で並びます。AI Tools ラベル、5時間使用量、週次使用量、リセットまでのカウントダウン、コンテキスト率、コンテキストトークン、キャッシュの温度、スレッドコスト、直前ターンのコスト、月間コスト、消費ペース予測、しきい値の色、しきい値アラート、Tools メニューを切り替えられます。変更はすぐバーに反映され、セッションをまたいで保存されます。もう一度 ⁝ を押すと閉じます。開くと 🛠 メニューが閉じ、逆も同じです。
5時間または週次ウィンドウが 90% を超えたとき、またコンテキストが 80% を超えたとき、しきい値アラートが1回だけトースト表示されます。
Handoff
/handoff は現在の会話に短い概要(目的、現在の状態、決定事項、未完了のタスク、重要なファイル、次の手順)を求め、整形したテキストとしてチャットに表示し、元の Markdown をクリップボードにコピーします。新しいセッションに貼り付ければ、そこで続けられます。この概要はコマンド出力の行なので、現在のセッションのモデルも読み取ります。
🛠 ボタンはバーの上に Handoff、Workflows、Task View、Clean View、Agent Dock の行を右寄せで開きます。もう一度押すと選択せずに閉じます。Handoff は同じ概要を Handoff brief ペインに整形テキストとして書き、Copy ボタンを表示します。押すまで何もコピーされず、概要はチャットの外に置かれるため、現在のセッションのモデルには読まれません。Workflows はエンジンのある場所(ターミナル)で Claude Code 組み込みの /workflows を直接実行します。入力した /workflows 自体にデスクトップの Code タブが応答する場合は、送信するために /workflows をプロンプトボックスへ入れます。
Task View と Clean View
🛠 メニューの2つのビューは、Claude の作業をバーの下のチェックリストにします(開いたメニューはその上に残ります)。完了した手順は緑の ✓、進行中は青の ●、未開始は暗い ○ で示されます。メニューでは ● がオン、○ がオフです。オンのものを選ぶとオフになり、もう一方を選ぶと切り替わります。この選択はセッションをまたいで保持されます。
どちらかがオンの間は、その名前がプロンプト下のステータス行に表示されます(ドックが開いている間はカンマの後に Agent Dock が付きます)。プロンプトから /taskview と /cleanview を使ってもメニューと同じ操作になります。引数なしは切り替え(オンにするともう一方がオフ)、on はオン、off はオフです。
Adding dark mode 3 of 5
✓ Read the theme code 100% ▰▰▰▰▰▰▰▰▰▰
✓ Add the color tokens 100% ▰▰▰▰▰▰▰▰▰▰
● Wire up the toggle 40% ▰▰▰▰▱▱▱▱▱▱
○ Update tests 0% ▱▱▱▱▱▱▱▱▱▱
○ Run checks 0% ▱▱▱▱▱▱▱▱▱▱
各手順にはバーがあります。完了すると満タン、開始前は空で、進行中の手順では Claude 自身が見積もった進捗を示します。Claude がチェックリストを更新するたびに動きます(メモでは手順の約4分の1ごとに更新するよう求めます)。
- Task View はチェックリストを表示し、チャットはそのままにします(非表示になるのはチェックリストツール自身の行だけです)。
- Clean View はチェックリストを表示し、作業中のすべてのツール呼び出しと Claude の出力を隠します。完了したリクエストごとに最後の返答だけが残り、チャット内に既にあるツール呼び出しや進行中の返答も隠れます。
ビューがオンの間、送る各プロンプトには、作業を平易な言葉の手順に分け、mod の checklist ツール(mcp__aitools__checklist)で報告し、各手順の開始と完了で更新するよう求める非表示のメモが付きます。mod は Claude Code の権限確認より前にそのツールへ自分で応答するため、権限を求めることはありません。新しいプロンプトごとに新しいチェックリストが始まります。すべての手順が終わって Claude が停止すると、✓ Done: <title> (<n> steps) の1行に折りたたまれます。作業のない簡単な質問にはチェックリストは付きません。
Clean View は、次のプロンプトまでに Claude が書いた最後のものを最終返答として認識します。mod の読み込み時に会話からそれらを読み取るため、再読み込みや再起動より前の返答も表示され、リクエストが終わるたびに新しい返答を追加します。
Agent Dock
/agentdock または 🛠 メニューの Agent Dock(開いている間は ●)で Agent Dock ペインを開き、大きな仕事をヘルパーエージェントのチーム(並行して動く Claude の追加コピー)に渡せます。もう一度実行するか、ペイン自身の閉じる印を押すと閉じます。閉じるまで開いたままで、mod の再読み込み後も戻ります。ドックが閉じている、またはペインが表示されていない場合(ステータス行は Agent Dock (not shown))、以下は適用されません。
Team size: ○ 1 ○ 3 ● 5 ○ 10 ○ 20 ○ 30 Helpers: ● Fast & cheap ○ Same as chat
5 agents · 3 working · 2 idle · 1 queued · 1 done
● Research business licenses · Reading the city site 40% ▰▰▰▰▱▱▱▱▱▱ 1:20
✓ Draft the floor plan 100% ▰▰▰▰▰▰▰▰▰▰ 0:56
- Team:同時に実行できるヘルパー数(1、3、5、10、20、30)。10を超えると、大きなチームは Claude の使用量をより速く消費すると黄色で警告します。
- Helpers:Fast & cheap は各ヘルパーのリクエストを Sonnet 5.5 の低い推論レベルで実行し、Same as chat はチャットと同じモデルと推論レベルを使います。
- ドックが開いている間、各プロンプトには、仕事を別々の部分に分けて並行開始するよう求める非表示のメモが付きます。各ヘルパーのプロンプトは、mod の
agent_progressツール(mcp__aitools__agent_progress)で何をしているかと進捗を報告するよう求め、その内容がカードに表示されます。 - チームが満員だと、それ以上の開始を拒否し、ヘルパーが終わってから再試行するよう示します(hook は長時間開始を止められない場合があります)。開始するまでの部分はキューに入ったものとして数えられます。
- カードにはタスク、ヘルパーの作業内容、自己見積もりの割合、バー、実行時間が表示されます。実行中の文字は中間のグレー、完了は緑の ✓、失敗は赤の ✕ です。全ヘルパーが終わり Claude が返答すると、カードの下に所要時間が表示されます(
All 3 helpers finished in 6 to 10 seconds each.)。カードとその行は次のプロンプトまで残ります。 - チームとヘルパーの選択は保存され、新しいセッションではドックが閉じた状態で始まります。
月間コストの計算方法
mod は Claude Code 自身のトランスクリプト(~/.claude/projects/**/*.jsonl、または CLAUDE_CONFIG_DIR の下)を読み、タイムスタンプが今月に入る各 assistant 応答をメッセージ id ごとに1回だけ数え、入力・出力、5分または1時間レートのキャッシュ書き込み、キャッシュ読み取りのトークン使用量を src/pricing.ts の表(2026-09-25 時点の API 定価)で計算します。前回のスキャン以後に追加されたバイトだけを読み、キャッシュは mod のストアに保存されて毎月リセットされます。数値の前の ~ は、一部に推定レート(モデルファミリーで未知モデルを価格付け)が使われたか、ファイルを読めなかったことを示します。
制限
- Claude Code のみ:Claude Desktop の Code タブとターミナル。Claude Desktop の chat タブの会話は mod から見えず、集計もされません。
- 使用率は API のレート制限ヘッダーから取得するため、応答ごとに更新されます。
- ドル表示は同じトークンを API で使った場合のコストであり、サブスクリプション料金ではありません。
インストール
まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。
claude plugin marketplace add pkkid/claude-mods claude plugin install aitools
原文 / README
aitools
A one-row bar above the prompt showing how close your Claude subscription is to its limits, and what the work would cost at Anthropic API list prices.
AI Tools 5h 42% ·1h12m wk 18% ·Thu ctx 31% 62k/200k cache 42m thread $3.12 (+$0.41) month $184.20 limit ~3:40pm [🛠] [⁝]
| Segment | Meaning |
|---|---|
| AI Tools | A dim label naming the bar |
| 5h 42% ·1h12m | 5-hour usage window: percent used, time until it resets |
| wk 18% ·Thu | Weekly window: percent used, the day it resets (hours when under a day) |
| ctx 31% 62k/200k | Context window fill: percent and tokens used / window size |
| cache 42m | How long the prompt cache should stay warm: Claude Code writes the main conversation's cache with a 1-hour TTL, restarted by every request. Amber under 10 minutes, cache cold once expired. An estimate from request times; the API does not report cache state, and Anthropic may evict early |
| thread $3.12 | This session's cost at API prices |
| (+$0.41) | What the last turn cost (last $0.41 when thread cost is hidden) |
| month $184.20 | This calendar month's Claude Code usage at API prices, across all sessions on this machine |
| limit ~3:40pm | At your pace over the last hour, when the 5-hour window would run out; shown only if before it resets |
Usage and context turn yellow at 70% and red at 90%. A value not known yet shows —; until the first response of a
session the bar shows the figures from your previous session.
Show or hide the bar
/aitools toggles the whole bar (buttons included); /aitools on and /aitools off set it. The choice holds across
sessions. /handoff works either way.
Settings
Press ⁝ to open the options above the bar, five to a row, and toggle any of: the AI Tools label, 5-hour usage, weekly usage, reset countdowns, context %, context tokens, cache warmth, thread cost, last-turn cost, monthly cost, burn-rate projection, threshold colors, threshold alerts, Tools menu. Changes show in the bar right away and are saved across sessions. Press ⁝ again to close it; opening it closes the 🛠 menu, and the other way round.
Threshold alerts are one-time toasts when the 5-hour or weekly window passes 90%, and when context passes 80%.
Handoff
/handoff asks the current conversation for a brief (goal, current state, decisions, open tasks, key
files, next step), prints it in the chat as formatted text, and copies the raw markdown to the clipboard. Paste it into a new session to
continue there. The brief is a command output row, so the current session's model reads it too.
The 🛠 button opens a row above the bar with Handoff, Workflows, Task View, Clean View and
Agent Dock, right-aligned; press it again to close the row without picking. Handoff writes the same brief into a Handoff brief pane, drawn as formatted text with
a Copy button; nothing is copied until you press it, and the brief stays out of the chat (so the current session's
model does not read it). Workflows runs Claude Code's built-in /workflows directly where the
engine has it (the terminal); in the desktop Code tab, which answers a typed /workflows itself, it puts /workflows
in the prompt box for you to send with Enter.
Task View and Clean View
Two views from the 🛠 menu that turn Claude's work into a checklist under the bar (an open menu still shows above it): done steps marked with a green ✓, the step in progress with a blue ●, steps not started with a dim ○. In the menu a ● marks the view that is on and a ○ the one that is off; picking the one that is on turns it off, and picking the other switches. The choice holds across sessions.
While one is on, its name shows in the status line under the prompt (with Agent Dock after a comma while the
dock is open). /taskview and /cleanview do the same as the
menu from the prompt: no argument toggles that view (turning it on switches off the other), on turns it on and off
turns it off.
Adding dark mode 3 of 5
✓ Read the theme code 100% ▰▰▰▰▰▰▰▰▰▰
✓ Add the color tokens 100% ▰▰▰▰▰▰▰▰▰▰
● Wire up the toggle 40% ▰▰▰▰▱▱▱▱▱▱
○ Update tests 0% ▱▱▱▱▱▱▱▱▱▱
○ Run checks 0% ▱▱▱▱▱▱▱▱▱▱
Each step has a bar: full once done, empty until it starts, and for the step in progress Claude's own estimate of how far along it is, which moves each time Claude updates the checklist (the note asks for about every quarter of a step).
- Task View shows the checklist and leaves the chat as it is (only the checklist tool's own rows are hidden).
- Clean View shows the checklist and hides every tool call and everything Claude writes while it works; only the final reply of each finished request stays. It hides tool calls and in-progress replies already in the chat too.
While a view is on, each prompt you send carries a hidden note asking Claude to plan the work as plain-language steps
and report them through the mod's checklist tool (mcp__aitools__checklist), updating it as each step starts and
finishes. The mod answers that tool itself, before Claude Code's permission check, so it
should not ask for permission. Each new prompt starts a fresh checklist;
once every step is done and Claude stops, it folds to one line, ✓ Done: <title> (<n> steps). A quick question that
needs no work gets no checklist.
Clean View recognizes a final reply as the last thing Claude wrote before your next prompt. It reads them from the conversation when the mod loads (so replies from before a reload or restart still show) and adds each new one as a request finishes.
Agent Dock
/agentdock, or Agent Dock in the 🛠 menu (● while open), opens the Agent Dock pane for handing a big job to a
team of helper agents (extra copies of Claude working in parallel); either again, or the pane's own close mark, closes
it. It stays open until you close it, and comes back after the mod reloads. While the dock is closed, or its pane is
not on screen (the status line then reads Agent Dock (not shown)), nothing below applies.
Team size: ○ 1 ○ 3 ● 5 ○ 10 ○ 20 ○ 30 Helpers: ● Fast & cheap ○ Same as chat
5 agents · 3 working · 2 idle · 1 queued · 1 done
● Research business licenses · Reading the city site 40% ▰▰▰▰▱▱▱▱▱▱ 1:20
✓ Draft the floor plan 100% ▰▰▰▰▰▰▰▰▰▰ 0:56
- Team: how many helpers may run at once (1, 3, 5, 10, 20 or 30). Past 10 the dock warns in yellow that a big team uses your Claude usage much faster.
- Helpers: Fast & cheap runs every helper request on Sonnet 5.5 at low reasoning; Same as chat uses the chat's model and reasoning level.
- While the dock is open, each prompt carries a hidden note asking Claude to split a job with separate parts across
the team, starting the pieces in parallel. Each helper's prompt asks it to report what it is doing and how far along
it is through the mod's
agent_progresstool (mcp__aitools__agent_progress), which fills its card. - A full team refuses further starts with a note to try again when a helper finishes (a hook may not hold a start for long); those pieces count as queued until they start.
- Cards show the task, what the helper is doing, its percent (its own estimate), a bar and its running time; a
running helper's text is a mid grey, finished ones get a green ✓ and failed ones a red ✕. When every helper is done
and Claude has replied, a line under the cards says how long they took (
All 3 helpers finished in 6 to 10 seconds each.). The cards and that line stay until your next prompt. - The team and helper picks are saved; the dock itself starts closed in a new session.
How monthly cost is computed
The mod reads Claude Code's own transcripts (~/.claude/projects/**/*.jsonl, or under CLAUDE_CONFIG_DIR), counts
each assistant response once (by message id) when its timestamp falls in the current month, and prices its token usage
(input, output, cache writes at the 5-minute or 1-hour rate, cache reads) with the table in src/pricing.ts (API list
prices as of 2026-09-25). Only bytes added since the last scan are read; the cache lives in the mod's store and resets
each month. A ~ before a figure means part of it used an estimated rate (an unknown model priced by its family) or a
file could not be read.
Limits
- Claude Code only: the Code tab in Claude Desktop and the terminal. Conversations in Claude Desktop's chat tab are not visible to mods and are not counted.
- Usage percentages come from the API's rate-limit headers, so they update after each response.
- Dollar figures are what the same tokens would cost on the API, not what the subscription costs.

