configure-notifications
它能做什么
这个技能把智能体通知连接到 Discord、Telegram、Slack 等聊天应用。适合希望把更新发送到手机或聊天频道的用户。
适用场景
- ✓当你希望把智能体的任务更新发送到 Discord、Telegram 或 Slack 频道的时候。
- ✓当你想更改通知的频率或报告内容的时候。
- ✓当你想关闭所有通知的时候。
技能链接
https://github.com/Yeachan-Heo/oh-my-codex/blob/main/plugins/oh-my-codex/skills/configure-notifications/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我把智能体的任务更新发送到我的 Telegram 聊天,并且只在会话结束时通知我。”
每周 5 个新技能,1 分钟读完。
工作原理
它会检查你当前的设置,询问要使用哪个频道,并收集所需的值,例如令牌或 Webhook 地址。然后它只写入该频道所需的设置,并进行检查。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Configure OMX Notifications
Use this card for Discord, Telegram, Slack, generic command aliases, or OpenClaw. Shared safety, lifecycle, hook, team, autonomy, and cancellation rules live in templates/AGENTS.md.
1. Inspect and choose a path
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
Use AskUserQuestion to choose: Discord native (webhook or bot), Telegram native (bot token + chat id), Slack native (incoming webhook), custom_webhook_command, custom_cli_command, cross-cutting settings, or disable all notifications.
2. Native providers
Collect and validate provider values, then write only these native keys: notifications.discord, notifications["discord-bot"], notifications.telegram, or notifications.slack. Do not represent native providers with generic aliases.
3. Generic aliases
For custom_webhook_command, collect URL, optional headers, method (POST default or PUT), events (session-end, ask-user-question, session-start, session-idle, stop), and an instruction template:
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"
For custom_cli_command, collect a command template ({{event}}, {{instruction}}, {{sessionId}}, {{projectPath}}), optional events, and an instruction template:
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 dispatch requires OMX_OPENCLAW=1; command gateways additionally require OMX_OPENCLAW_COMMAND=1; timeout precedence is gateways.<name>.timeout > OMX_OPENCLAW_COMMAND_TIMEOUT_MS > 5000 ms.
4. OpenClaw + Clawdbot agent mode
Use this only when the requested route is a clawdbot agent turn delivered to Discord. The session-stop notification intentionally maps to the OpenClaw stop hook. OMX shell-escapes substitutions; keep instructions short, avoid untrusted shell metacharacters, append || true, and append JSONL logs with >>.
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={{ses
常见问题
它需要哪些信息?
根据你选择的平台,它会询问机器人令牌和聊天 ID,或 Slack 传入 Webhook 等值。
我可以关闭通知吗?
可以。这个技能可以关闭所有通知。
它能发送到自定义命令吗?
可以。它支持自定义 Webhook 和自定义命令两种选项。
详情
作者的原始描述
Configure OMX notifications - unified entry point for all platforms
repo: Yeachan-Heo/oh-my-codex
热度
- GitHub 星标
- 34k
- 排名
- #8416
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …