[mod] TODO pane: check a task to have Claude run it

japan-da-man の Claude Code プラグイン(mods を含む)を管理するマーケットプレイス。
| 名前 | 内容 | | :- | :- | | japan-da-man-mods | まとめてインストール用。下のプラグインを全部入れる | | todo-mod | /todo で TODO パネルを開く。チェックを入れたタスクを Claude に依頼する | | token-weather | コンテキストの埋まり具合を天気でプロンプトの上に表示する(☀ Clear → ☁ Cloudy → ☂ Showers → ☇ Storm → ↯ Compact soon)。直近12ターンのグラフと、直前のターンの増減(▲ +98.3k last turn)付き。/weather で表示切り替え | | usage-stats | /stats で利用統計のパネルを開く。セッション数・メッセージ数・トークン数・利用日数・連続日数・よく使うモデル・日ごとのヒートマップ | | blast-radius | 危険なシェルコマンドを実行前に止め、何が消えるか・変わるかをペインに出して Proceed / Cancel で選ばせる(10分答えがなければ止める)。rm -r/-f、git reset --hard、force push、git clean、変更の破棄、git branch -D、git stash drop/clear、マイグレーション、find -delete、xargs rm。bash -c / eval の中も調べる。/blast-radius で履歴 | | replay-theater | ターンの中で Claude が行ったファイル編集を記録する。ターンが終わるとプロンプトの上に ▶ Replay: N edits が出て、r か /replay でペインを開き、編集を 1 件ずつ差分で見られる(Prev / Next / Close) | | spec-flow | 「〇〇な機能が欲しい」と話しかけるか /spec-flow:spec <要望> で、要求整理 → 影響画面確認 → 要件定義 → 機能案・UI案 を 1 段階ずつ承認しながら進める。曖昧な点はヒアリングし、影響調査と案出しはサブエージェントが行う。成果物は docs/specs/<id>/(UI 案の HTML モックは Desktop なら Artifact にも公開。--local で公開しない)。/specs でチェックリストを開き、チェックで承認・修正依頼もできる | | dev-flow | 汎用の開発フロー。skills plan(小さなタスクに分けて承認をもらってから着手)・tdd(RED → GREEN → REFACTOR)・debug(再現 → 仮説 → 検証で原因を確かめてから直す)・review(重要度つきの差分レビュー)。サブエージェント code-explorer(横断調査)・test-runner(テスト結果の要約)・reviewer(別コンテキストでレビュー、修正はしない)が長い出力をメインに持ち込まない | | dev-extras | 他の OSS から選んで取り込んだ skill(すべて MIT、出典は各 README と licenses/)。ponytail(最小の実装に絞る)・ponytail-review(作り込みすぎだけを探す)・grill-me(質問攻めで計画を詰める)・handoff(バックグラウンドエージェントに引き継ぐ)・verification-before-completion(検証してから完了と言う)・security-audit(Cloudflare 製のセキュリティ監査) | | mod-dev | skill add-mod。「〇〇する mod を作って」で雛形・テスト・登録まで行う。marketplace リポジトリでは marketplace.json / bundle / README も更新し、それ以外では単体の mod を作る |
claude plugin marketplace add japan-da-man/claude-code
claude plugin install japan-da-man-mods@japan-da-man
1つずつ入れる場合は claude plugin install <名前>@japan-da-man。
更新:
claude plugin marketplace update japan-da-man
claude plugin update <名前>@japan-da-man
bundle に増えたプラグインを入れるときは、update → install の順で実行する(update だけだと増えた分は入らず、bundle が failed to load になる):
claude plugin marketplace update japan-da-man
claude plugin update japan-da-man-mods@japan-da-man
claude plugin install japan-da-man-mods@japan-da-man
セッション内なら update のあと /reload-plugins でもよい。
インストールせずに作業中のディレクトリを読み込む(保存するとホットリロードされる):
claude --plugin-dir ./plugins/todo-mod
チェック:
claude plugin validate .
claude plugin validate ./plugins/todo-mod
テスト(tests/*.test.ts があるプラグイン):
cd plugins/<name> && claude plugin test
mod-dev を入れた状態でこのリポジトリを開き「〇〇する mod を追加して」と頼むと、skill add-mod が下の手順(雛形・テスト・marketplace / bundle / README 更新・validate)をまとめてやる。手でやる場合:
plugins/<name>/ に .claude-plugin/plugin.json と中身を置く.claude-plugin/marketplace.json の plugins にエントリを追加する(name は plugin.json と同じにする)plugins/japan-da-man-mods/.claude-plugin/plugin.json の dependencies にも名前を足すplugin.json に version を書いていないので、コミットごとに新しいバージョンとして扱われる。
mods は Claude Code v2.1.287 以降が必要。
token-weather・blast-radius・replay-theater は、Anthropic の claude-code-playground にある同名の mod(Apache-2.0)をもとに手を加えたもの。各プラグインに LICENSE を同梱し、各 hooks/register.js の先頭に元のコードの著作権表示と、こちらで変えた点を書いている。
hooks/register.js 93 lines1// TODO パネル: /todo で開き、チェックを入れたタスクを Claude に依頼する
2const PANE = 'todo'
3
4// { id, text, done } の配列。$.store に保存して次のセッションでも残す
5let todos = []
6
7export function register(on) {
8 // セッション開始時(とリロード時): 保存済みの TODO を読み込み、/todo を登録
9 on('session.start', async ($, e, next) => {
10 const saved = await $.store.get('todos')
11 if (Array.isArray(saved)) todos = saved
12 // コマンド登録は最後に(失敗するとフックの残りが動かないため)
13 await $.command.register({ name: 'todo', description: 'TODO パネルを開く', immediate: true })
14 return next(e)
15 })
16
17 // /todo: パネルを開くだけで、トランスクリプトには何も出さない
18 on('command.run', { command: 'todo' }, async ($) => {
19 await $.ui.open({ id: PANE, title: 'TODO', focus: true, closeOnEscape: true })
20 return {}
21 })
22
23 // パネルの中身を描く
24 on('ui.render', { component: 'Pane' }, async ($, e, next) => {
25 if (e.requestId !== PANE) return next(e)
26 const { Box, Text, Button, Input } = $.ui.resolve(e)
27
28 // 状態を変えたら再描画して保存する
29 const save = async () => {
30 $.ui.invalidate('ui.render')
31 await $.store.set('todos', todos)
32 }
33
34 const rows = todos.map((t) =>
35 Box({
36 flexDirection: 'row',
37 columnGap: 1,
38 children: [
39 // チェックボックス代わりのボタン
40 Button({
41 key: 'check-' + t.id,
42 label: t.done ? '[x]' : '[ ]',
43 plain: true,
44 onPress: async () => {
45 const wasDone = t.done
46 todos = todos.map((x) => (x.id === t.id ? { ...x, done: !x.done } : x))
47 await save()
48 if (!wasDone) {
49 $.ui.toast('Claude に依頼: ' + t.text)
50 // await しない: Claude が作業中だとターンが終わるまで解決しないため
51 $.prompt.submit({ text: '次の TODO を実行してください: ' + t.text })
52 }
53 },
54 }),
55 Text({ children: [t.text], dimColor: t.done }),
56 // 削除ボタン
57 Button({
58 key: 'delete-' + t.id,
59 label: '×',
60 plain: true,
61 onPress: async () => {
62 todos = todos.filter((x) => x.id !== t.id)
63 await save()
64 },
65 }),
66 ],
67 }),
68 )
69
70 return Box({
71 flexDirection: 'column',
72 children: [
73 Input({
74 key: 'new-todo',
75 label: 'TODO',
76 placeholder: 'タスクを入力して Enter',
77 value: '',
78 submitLabel: '追加',
79 autoFocus: true,
80 onSubmit: async (value) => {
81 const text = value.trim()
82 if (!text) return
83 todos = [...todos, { id: String(Date.now()), text, done: false }]
84 await save()
85 },
86 }),
87 ...(rows.length ? rows : [Text({ dimColor: true, children: ['まだ TODO はありません'] })]),
88 Text({ dimColor: true, children: ['Tab で移動 · Enter でチェック → Claude が実行 · Esc で閉じる'] }),
89 ],
90 })
91 })
92}
93