CClaude Code Catalog
全Hooks

HTTP Webhookルーター

Notification中級Hookタイプ: notification

2026年追加のHTTP hookハンドラータイプを使用し、Slack、Discord、PagerDuty等の外部URLにJSONペイロードを送信してレスポンスを受け取ります。

WebhookHTTPSlackDiscord統合

Hookコード

// .claude/settings.json — HTTP Hook Configuration { "hooks": { // Notify Slack when Claude completes a task "Stop": [ { "type": "http", "url": "https://hooks.slack.com/services/T00/B00/xxx", "method": "POST", "headers": { "Content-Type": "application/json" }, "body": { "channel": "#dev-notifications", "text": "Claude Code session completed: {{summary}}" }, "timeout_ms": 5000 } ], // Send tool usage to monitoring endpoint "PostToolUse": [ { "type": "http", "url": "https://api.internal.com/claude-events", "method": "POST", "headers": { "Authorization": "Bearer $MONITORING_TOKEN", "Content-Type": "application/json" }, "body": { "event": "tool_use", "tool": "{{tool_name}}", "timestamp": "{{timestamp}}", "session_id": "{{session_id}}" } } ], // Block dangerous commands via external policy engine "PreToolUse": [ { "type": "http", "url": "https://policy.internal.com/check", "method": "POST", "body": { "tool": "{{tool_name}}", "input": "{{tool_input}}" } // Response: { "allow": true/false, "reason": "..." } } ] } } // Benefits over shell hooks: // - No local scripts to maintain // - Works with any HTTP endpoint (Slack, Discord, PagerDuty, etc.) // - JSON in → JSON out (structured, type-safe) // - Built-in timeout and retry // - Easy to audit and centralize

このHookをClaude Code設定または.claude/settings.jsonに追加して有効化してください。

実行プレビュー

HTTP Webhookルーター

HTTP Webhookルーターについて

Claude Code Hooksは、Claude操作中の特定イベントに応じてカスタムシェルコマンドを自動実行します。HTTP Webhookルーターは中級レベルのNotification Hookで、開発ワークフローの重要なタイミングでタスクを自動化し、手動ステップを削減してチーム全体の一貫性を維持します。

関連Hooks