eshin087/claude-code-mods/tree/main/coach
coach
/coach: ライブコスト、キャッシュ、コンテキストおよびサブエージェントの統計、SDLC の習慣チェック、およびアーキテクトのレッスン。ターン後に重要なときにヒントを 1 つ。
この mod について
コーチ
内容: コストと品質を促進するセッションの背後にある数値を表示し、通常のソフトウェア ライフサイクル (SDLC) と照らし合わせて習慣をチェックし、実行した内容に関連付けられた architect-level コンセプトを一度に 1 つずつ教えます。目的は、vibe-coding スキルを実際のエンジニアリング作業に取り入れることです。
表示される場所:
- ドック (または
/coach) の C はパネルを切り替えます。
● Cache 92% ━━━━━━━━━━━ reusing context well
● Context 41% ━━━━━━━━━━━ room to spare
● Cost $3.20 $0.27 per turn
Habits ✓ Plan ✓ Branch ✗ Tests ✓ Commits · PR
Do next Run the tests: 8 edits since the last run
Tokens 120k fresh 4.1M cached 300k cache-write 52k out
Model claude-opus-5-5 effort high subagents 4 runs · 31% of tokens
Lesson The test pyramid
Many fast unit tests at the base, fewer integration tests…
```-
**色:** 緑は良いこと、黄色は注意すること、赤は行動することを意味します。トークン行では、キャッシュされたトークンは緑色 (安価)、cache-writes は黄色、出力はシアンです。
- **詳細** では、レッスンの「次のレッスン」および「作業中」メモ (**別のレッスン**) と Claude Code プロのヒント (**次のヒント** およびリンク) を追加します。
- **ドックに C** を移動すると、キャッシュ、コンテキスト バー、コスト、習慣、および「次の実行」が表示された紫色のカードが表示されます。
- **ターン後に 1 つのヒント (ルールが発動した場合のみ)** チャット内の淡い `🎓 Coach · …` 行として:
- メインに直接コミット
- 大きなターンでの 50% でのキャッシュ ヒット (考えられる原因)
- 75% フルのコンテキスト
- 前回のテスト実行以降の 5+ の編集
- ターンのコストは ~$2 以上
- 計画のない建物の 10+ 分
- 半分以上のトークンを使用するサブエージェント
同じチップは、繰り返す前に少なくとも 6 ターン待機します。
**用語集:**
- **プロンプト キャッシュ:** アプリは毎ターン会話全体を re-sends します。キャッシュ ヒットは、プレフィックスが再利用され、新しい入力の ~10% で課金されたことを意味します。モデルの切り替え、CLAUDE.md またはメモリ編集、/compact、またはアイドル ギャップ (キャッシュの期限切れ) でブレークがヒットします。
- **コンテキストフィル:** 会話が使用するモデルのウィンドウの量。より豊かとは、速度が遅く、高価で、限界に近い低品質を意味します。
- **コスト:** API 価格。サブスクリプションでは、これは請求書ではなく使用した値ですが、5-hour ウィンドウを書き込む速度を追跡します。
**仕組み:** すべてはアプリがすでに報告している内容 (ターンごとのトークン使用量、セッション コストとコンテキスト、編集、テスト、コミット、`gh pr create` などのツール呼び出し) に基づいています。モデルコールはありません。
**費用:** なし。
**データ保存:** ディスク上には何もありません。統計はセッション中にライブで表示されます。
インストール
まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。
claude plugin marketplace add eshin087/claude-code-mods claude plugin install coach
原文 / README
Coach
What it does: shows the numbers behind your sessions that drive cost and quality, checks your habits against a normal software lifecycle (SDLC), and teaches one architect-level concept at a time, tied to what you just did. The aim is to carry vibe-coding skill into real engineering work.
Where you see it:
-
C in the dock (or
/coach) toggles the panel:● Cache 92% ━━━━━━━━━━━ reusing context well ● Context 41% ━━━━━━━━━━━ room to spare ● Cost $3.20 $0.27 per turn Habits ✓ Plan ✓ Branch ✗ Tests ✓ Commits · PR Do next Run the tests: 8 edits since the last run Tokens 120k fresh 4.1M cached 300k cache-write 52k out Model claude-opus-5-5 effort high subagents 4 runs · 31% of tokens Lesson The test pyramid Many fast unit tests at the base, fewer integration tests…- Colors: green is good, yellow means watch it, red means act. In the token row, cached tokens are green (cheap), cache-writes yellow and output cyan.
- More adds the lesson's "try next" and "at work" notes (with Another lesson) and a Claude Code pro tip (with Next tip and links).
-
Hover C in the dock for a violet card with the cache and context bars, cost, habits and "do next".
-
One tip after a turn, only when a rule fires, as a dim
🎓 Coach · …row in the chat:- committed straight to main
- cache hit under 50% on a big turn (with the likely cause)
- context over 75% full
- 5+ edits since tests last ran
- a turn costing over ~$2
- 10+ minutes of building with no plan
- subagents using over half the tokens
The same tip waits at least 6 turns before repeating.
Glossary:
- Prompt cache: the app re-sends the whole conversation every turn. A cache hit means that prefix was reused and billed at ~10% of fresh input. Hits break on model switches, CLAUDE.md or memory edits, /compact, or idle gaps (the cache expires).
- Context fill: how much of the model's window the conversation uses. Fuller means slower, pricier, and lower quality near the limit.
- Cost: API prices. On a subscription this is the value you used, not a bill, but it tracks how fast you burn your 5-hour window.
How it works: everything comes from what the app already reports (token usage per turn, session cost and context, tool calls such as edits, tests, commits and gh pr create). No model calls.
Cost: none.
Data saved: none on disk. Stats live for the session.

