configure-notifications について
configure-notifications は、OMX 通知の設定と確認を行うスキルです。ネイティブプロバイダー、Webhook や CLI コマンドのエイリアス、OpenClaw の設定を案内し、構成と配信を検証します。
主な機能
- 01Discord、Telegram、Slack の設定
- 02Webhook と CLI エイリアスの設定
- 03OpenClaw 通知フックの設定
- 04詳細度とアイドルクールダウンの調整
- 05構成と通知配信の検証
活用シーン
- 01ネイティブなチャット通知プロバイダーの有効化
- 02カスタムコマンドによるイベント転送
- 03OpenClaw 通知配信の検証
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ yeachan-heo/ oh-my-codex --skill configure-notificationsインストール後、Claude Code で/configure-notificationsを入力して読み込まれたか確認します。
詳細
OMX 通知の設定
Discord、Telegram、Slack、汎用コマンドエイリアス、または OpenClaw を使用する場合はこのカードを使用してください。安全性、ライフサイクル、フック、チーム、自律性、キャンセルに関する共通ルールは templates/AGENTS.md にあります。
1. 確認して経路を選択する
CONFIG_FILE="$HOME/.codex/.omx-config.json"
if [ -f "$CONFIG_FILE" ]; then
jq -r '{notifications_enabled:(.notifications.enabled // false), discord:(.notifications.discord.enabled // false), discord_bot:(.notifications["discord-bot"].enabled // false), telegram:(.notifications.telegram.enabled // false), slack:(.notifications.slack.enabled // false), openclaw:(.notifications.openclaw.enabled // false), custom_webhook_command:(.notifications.custom_webhook_command.enabled // false), custom_cli_command:(.notifications.custom_cli_command.enabled // false), verbosity:(.notifications.verbosity // "session"), idleCooldownSeconds:(.notifications.idleCooldownSeconds // 60), reply_enabled:(.notifications.reply.enabled // false)}' "$CONFIG_FILE"
else
echo "NO_CONFIG_FILE"
fi
AskUserQuestion を使用して、Discord ネイティブ(Webhook またはボット)、Telegram ネイティブ(ボットトークン + チャット ID)、Slack ネイティブ(受信 Webhook)、custom_webhook_command、custom_cli_command、横断設定、またはすべての通知の無効化から選択します。
2. ネイティブプロバイダー
プロバイダーの値を収集して検証した後、次のネイティブキーのみを書き込みます:notifications.discord、notifications["discord-bot"]、notifications.telegram、または notifications.slack。ネイティブプロバイダーを汎用エイリアスで表現しないでください。
3. 汎用エイリアス
custom_webhook_command の場合は、URL、任意のヘッダー、メソッド(既定は POST、または PUT)、イベント(session-end、ask-user-question、session-start、session-idle、stop)、および指示テンプレートを収集します:
jq --arg url "$URL" --arg method "${METHOD:-POST}" --arg instruction "${INSTRUCTION:-OMX event {{event}} for {{projectPath}}}" --argjson headers "${HEADERS_JSON:-{}}" '.notifications=(.notifications//{enabled:true})|.notifications.enabled=true|.notifications.custom_webhook_command={enabled:true,url:$url,headers:$headers,method:$method,instruction:$instruction,events:["session-end","ask-user-question"]}' "$CONFIG_FILE" >"$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
custom_cli_command の場合は、コマンドテンプレート({{event}}、{{instruction}}、{{sessionId}}、{{projectPath}})、任意のイベント、および指示テンプレートを収集します:
jq --arg command "$COMMAND_TEMPLATE" --arg instruction "${INSTRUCTION:-OMX event {{event}} for {{projectPath}}}" '.notifications=(.notifications//{enabled:true})|.notifications.enabled=true|.notifications.custom_cli_command={enabled:true,command:$command,instruction:$instruction,events:["session-end","ask-user-question"]}' "$CONFIG_FILE" >"$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
OpenClaw のディスパッチには OMX_OPENCLAW=1 が必要です。コマンドゲートウェイにはさらに OMX_OPENCLAW_COMMAND=1 が必要です。タイムアウトの優先順位は gateways.<name>.timeout > OMX_OPENCLAW_COMMAND_TIMEOUT_MS > 5000 ms です。
4. OpenClaw + Clawdbot エージェントモード
要求された経路が Discord に配信される clawdbot agent のターンである場合にのみ使用してください。session-stop 通知は意図的に OpenClaw の stop フックにマッピングされます。OMX は置換値をシェルエスケープします。指示は短く保ち、信頼できないシェルのメタ文字を避け、|| true を付加し、JSONL ログは >> で追記してください。
jq --arg command "(clawdbot agent --session-id omx-hooks --message {{instruction}} --thinking minimal --deliver --reply-channel discord --reply-to 'channel:CHANNEL_ID' --timeout 120 --json >>/tmp/omx-openclaw-agent.jsonl 2>&1 || true)" '.notifications=(.notifications//{enabled:true})|.notifications.enabled=true|.notifications.verbosity="verbose"|.notifications.openclaw={enabled:true,gateways:{local:{type:"command",command:$command,timeout:120000}},hooks:{"session-start":{enabled:true,gateway:"local",instruction:"OMX hook=session-start project={{projectName}} session={{sessionId}} tmux={{tmuxSession}}. 한국어로 상태를 #omc-dev에 공유하고 SOUL.md를 참고하세요."},"session-idle":{enabled:true,gateway:"local",instruction:"OMX hook=session-idle session={{sessionId}} tmux={{tmuxSession}}. 한국어로 팔로업을 #omc-dev에 안내하세요."},"ask-user-question":{enabled:true,gateway:"local",instruction:"OMX hook=ask-user-question session={{sessionId}} tmux={{tmuxSession}} question={{question}}. 한국어로 응답 필요를 #omc-dev에 알리세요."},"stop":{enabled:true,gateway:"local",instruction:"OMX hook=session-stop session={{sessionId}} tmux={{tmuxSession}}. 한국어로 중단 상태를 전달하세요."},"session-end":{enabled:true,gateway:"local",instruction:"OMX hook=session-end session={{sessionId}} tmux={{tmuxSession}} reason={{reason}}. 한국어로 완료 요약을 #omc-dev에 남기세요."}}}' "$CONFIG_FILE" >"$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
互換性と優先順位の契約
有効な明示的 notifications.openclaw が優先されます。汎用エイリアスは警告付きで無視されます。
出力を隠さずに、このモードを検証し、証跡を確認してください:
clawdbot agent --session-id omx-hooks --message "OMX hook test via clawdbot agent path" --thinking minimal --deliver --reply-channel discord --reply-to 'channel:CHANNEL_ID' --timeout 120 --json
tmux list-sessions -F '#{session_name}' | rg '^omx-' || true
jq '.notifications.openclaw.hooks' "$CONFIG_FILE"
tail -n 120 /tmp/omx-openclaw-agent.jsonl | jq -s '.[] | {timestamp:(.timestamp // .time),status:(.status // .error // "ok")}'
rg '"error"|"failed"|"timeout"' /tmp/omx-openclaw-agent.jsonl | tail -20
HTTP 連携の場合は、/hooks/wake のスモークテストと /hooks/agent の配信検証の両方を実行してください。
5. 横断設定と無効化
- 詳細度:
minimal、session(推奨)、agent、またはverbose。 - アイドルのクールダウン:
notifications.idleCooldownSeconds(環境変数による上書き:OMX_IDLE_COOLDOWN_SECONDS)。 - プロファイル:
notifications.profilesとnotifications.defaultProfile。 - 返信リスナー:
notifications.reply.enabled。ゲートはOMX_REPLY_ENABLED=trueと、Discord の場合はOMX_REPLY_DISCORD_USER_IDS=...です。認可された Discord ボットの運用者は、追跡対象の通知に対して完全一致のstatusを送信し、範囲が限定された読み取り専用のセッション概要を取得できます。
すべての通知を無効化するには:
jq '.notifications.enabled=false' "$CONFIG_FILE" >"$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
終了時の証跡
編集後に jq empty "$CONFIG_FILE" を実行してください。設定ファイルのパス、有効なネイティブプロバイダー、有効なエイリアス、有効な notifications.openclaw が エイリアスを上書きするかどうか、詳細度、アイドルのクールダウン、返信リスナーの状態、およびスモークテストの結果を報告してください。JSON が解析でき、選択した経路に必要な証跡があれば停止してください。設定だけから配信済みであると主張しないでください。