jamubc/toolbox/tree/main/plugins/redline
この mod について
redline
Claude を同時に動かしすぎていませんか? 圧倒されていませんか? redline は Claude Code のプロンプト上にゲージを表示し、作業中のセッション数を数えて時間の計画を助けます。
<img width="638" height="98" alt="image" src="https://github.com/user-attachments/assets/c7d1ae26-46c2-4222-be22-d6f85e3db13f" /> <img width="302" height="731" alt="image" src="https://github.com/user-attachments/assets/4e546a80-f59e-4ba1-a81e-f5f83e7b584f" />新しい Claude を起動するのをやめ、すでに動いているものを終わらせましょう。
インストール
マーケットプレイスを追加します:
/plugin marketplace add jamubc/toolbox
プラグインをインストールします:
/plugin install redline@toolbox
使い方
| コマンド | 内容 |
| --- | --- |
| UI Mod | ゲージとラベル。 |
| /redline | 詳細表示を切り替えます。 |
| /redline <0-25> | デモ:有効化。 |
| /redline live | デモ:無効化 |
| /config → Show the count at the bottom of the terminal | ラベルの切り替え |
| /config → Show the fuel gauges | 5H / 7D / CTX ダイヤルの切り替え |
燃料ゲージ
<details> <summary>オンにするまで無効な3つのダイヤル</summary> <br>Show the fuel gauges をオンにすると、さらに3つのダイヤルが表示されます。プロンプト上のタコメーターの横と、ペイン内のタコメーターの下です。
| ダイヤル | 読み取るもの | | --- | --- | | 5H | プランの5時間レート制限ウィンドウ。 | | 7D | プランの7日間レート制限ウィンドウ。 | | CTX | このセッションのコンテキスト。会話が長くなるにつれて埋まります。 |
どのダイヤルでも、タンクが使われるほど針は右へ振れ、レッドゾーンに入ります。プランのウィンドウは減るため、5H と 7D は F(満タン)から E(空)へ進みます。コンテキストは埋まるため、CTX は E から F へ進みます。プランのダイヤルにはサブスクリプションが必要ですが、CTX は誰でも使えます。エンジンに読み取り値がないダイヤルは暗いままです。
</details>ステージ
<details> <summary>作業中のセッション数によるステージ</summary> <br>| 作業中 | ステージ | | --- | --- | | 0 | 休止中 | | 1–2 | アイドリング | | 3–5 | 巡航 | | 6–8 | 多忙 | | 9–12 | 非常に多忙 | | 13–17 | プレッシャー下 | | 18–20 | レッドライン | | 21–24 | オーバーブースト | | 25+ | エンジン破損 |
</details>実行・読み取り・送信するもの
redline はマシン上で2つの読み取り専用プログラムを実行し、どこにも何も送信しません。ネットワークリクエストも行いません。
| プログラム | 実際に実行する内容 | 理由 |
| --- | --- | --- |
| ps | ps -x -o pid=,ppid=,tty=,args= を2秒ごと | 自分のプロセスを一覧にし、端末内の claude セッションと、ターン中のものを見つけます。 |
| ps | ps -x -o pid=,ppid=,tty=,command= を、セッションごとに成功するまで1回 | 同じ表を別の形式で取得し、redline が現在のセッションを判別してペインで (this one) と表示できるようにします。 |
| lsof | ps が見つけた claude セッションを <pids> として、lsof -a -d cwd -Fn -p <pids> を2秒ごと | 各セッションの作業ディレクトリを読み取り、ペインの横に表示します。 |
- セッションは端末に接続された
claudeプロセスです。Claude Code がcaffeinate子プロセスを保持している間は作業中と数えます。macOS ではターン中にこの状態になります。Linux ではすべてのセッションがアイドルとして読み取られます。 - 燃料ゲージをオンにすると、このセッションの使用量(
session.usageと各ターン後のsession.measureイベント)を読み取ります。内容の充填量とプランのレート制限率で、ステータス行に表示されるものと同じです。ダイヤルに描画され、このセッションのプラグイン状態に保持されます。redline がディスクへ書き込んだり送信したりすることはありません。 - 他のプロセスを起動、停止、変更することはありません。プロセス表を読み、メモリ上で解析して破棄するだけです。
- 独自の
/redlineコマンドのためだけにcommand.runをフックします。ペインの開閉とデモ数の設定に使われ、他のコマンドを見たり変更したりしません。 ui.closeをフックしてペインが閉じられたことを検知し、session.start、session.end、session.measureもフックして/clearをまたいでもゲージを正しく保ちます。
インストール
まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。
claude plugin marketplace add jamubc/toolbox claude plugin install redline
原文 / README
redline
Too many Claudes going at once? Feeling overwhelmed? redline puts a gauge above your Claude Code prompt that counts how many of your sessions are working, so you can plan your time better.
<img width="638" height="98" alt="image" src="https://github.com/user-attachments/assets/c7d1ae26-46c2-4222-be22-d6f85e3db13f" /> <img width="302" height="731" alt="image" src="https://github.com/user-attachments/assets/4e546a80-f59e-4ba1-a81e-f5f83e7b584f" />stop starting new Claudes and finish the ones already running.
Install
Add the marketplace:
/plugin marketplace add jamubc/toolbox
Install the plugin:
/plugin install redline@toolbox
Usage
| Command | What it does |
| --- | --- |
| UI Mod | gauge & labels. |
| /redline | Toggles detailed view. |
| /redline <0-25> | demo: enable. |
| /redline live | demo: disable |
| /config → Show the count at the bottom of the terminal | toggle labels |
| /config → Show the fuel gauges | toggle the 5H / 7D / CTX dials |
Fuel gauges
<details> <summary>The three dials, off until switched on</summary> <br>With Show the fuel gauges on, three more dials ride along: beside the tachometer above your prompt, and under it in the pane.
| Dial | What it reads | | --- | --- | | 5H | Your plan's five-hour rate-limit window. | | 7D | Your plan's seven-day rate-limit window. | | CTX | This session's context, filling as the conversation grows. |
On every dial the needle swings right, into the red, as its tank is used. The plan windows drain, so 5H and 7D read F (full) to E (empty); the context fills, so CTX reads E to F. The plan dials need a subscription; CTX works for everyone. A dial the engine has no reading for stays dim.
</details>Stages
<details> <summary>Stages by sessions working</summary> <br>| Working | Stage | | --- | --- | | 0 | Napping | | 1–2 | Idling | | 3–5 | Cruising | | 6–8 | Busy | | 9–12 | Very Busy | | 13–17 | Under Pressure | | 18–20 | Redline | | 21–24 | Overboost | | 25+ | Blown |
</details>What it runs, reads and sends
redline runs two read-only programs on your machine and sends nothing anywhere. It makes no network requests.
| Program | Exactly what it runs | Why |
| --- | --- | --- |
| ps | ps -x -o pid=,ppid=,tty=,args=, every two seconds | Lists your own processes, to find the claude sessions in your terminals and which are mid-turn. |
| ps | ps -x -o pid=,ppid=,tty=,command=, once a session until it succeeds | The same table in a second format, so redline can tell which session is this one and mark it (this one) in the pane. |
| lsof | lsof -a -d cwd -Fn -p <pids>, every two seconds, where <pids> are the claude sessions ps just found | Reads each session's working directory, shown beside it in the pane. |
- A session is a
claudeprocess attached to a terminal. It counts as working while Claude Code holds acaffeinatechild process, which happens on macOS during a turn. On Linux every session reads as idle. - With the fuel gauges on, it reads this session's usage (
session.usage, and thesession.measureevent after each turn): the context fill and your plan's rate-limit percentages, the same figures the status line has. They are drawn on the dials and kept in this session's plugin state; they are never written to disk by redline or sent anywhere. - It never starts, stops or changes another process. The process tables are read, parsed in memory and dropped.
- It hooks
command.runonly for its own/redlinecommand, which opens and closes the pane and sets the demo count. It does not see or change any other command. - It hooks
ui.closeto notice when you close its pane, andsession.start,session.endandsession.measureto keep the gauge right across/clear.

