プロジェクトの .claude/settings.json に新しいフックを追加する。「フック作成」「新しいフック」「フックを作って」「フック追加」「hook 作成」「フックを追加したい」「新規フック」などで起動。ツール実行前後やセッションイベントで実行されるフックを設定。
Adds new hooks to `.claude/settings.json` for pre/post-command execution or session events. Activated when you request hook creation using phrases like "create hook" or "new hook".
/plugin marketplace add shiiman/claude-code-plugins/plugin install shiiman-claude@shiiman-claude-code-pluginsThis skill is limited to using the following tools:
プロジェクトの .claude/settings.json に新しいフックを追加します。
/shiiman-claude:create-hook を SlashCommand ツールで実行(実装は Commands に委譲)。
実際の処理は /shiiman-claude:create-hook に委譲します(SSOT として扱う)。
/shiiman-claude:create-hook コマンドは以下を行う:
| イベント | 説明 | matcher |
|---|---|---|
PreToolUse | ツール実行前 | 必須 |
PostToolUse | ツール実行後 | 必須 |
UserPromptSubmit | プロンプト送信時 | 不要 |
Notification | 通知時 | 不要 |
Stop | レスポンス完了時 | 不要 |
SubagentStop | サブエージェント完了 | 不要 |
PreCompact | Compact 操作前 | 不要 |
SessionStart | セッション開始時 | 不要 |
SessionEnd | セッション終了時 | 不要 |
.claude/settings.json の hooks セクションに設定