一键导入
dual-channel-watchexec
Dual-channel notifications on watchexec events. TRIGGERS - watchexec alerts, Telegram+Pushover, file change notifications.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Dual-channel notifications on watchexec events. TRIGGERS - watchexec alerts, Telegram+Pushover, file change notifications.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
user wants to send a WhatsApp message, share a link or document via WhatsApp, generate a wa.me click-to-chat link, or message a contact on WhatsApp by phone number.
Claude Code hooks development guide. TRIGGERS - create hook, PostToolUse, PreToolUse, Stop hook, hook lifecycle, decision block.
Deploy static HTML files to Cloudflare Workers with 1Password credential management.
Session log provenance tracking. TRIGGERS - who created, trace origin, session archaeology, ADR reference.
Generate custom Claude Code slash commands via guided question flow. TRIGGERS - create slash command, generate command, custom command.
Send Pushover notifications with UUID-linked verbatim JSONL audit trail. TRIGGERS - pushover notify, send pushover, observability alert, verbatim notification, fleet alert, pushover-lookup, audit log notification, push notification with UUID
| name | dual-channel-watchexec |
| description | Dual-channel notifications on watchexec events. TRIGGERS - watchexec alerts, Telegram+Pushover, file change notifications. |
| allowed-tools | Read, Write, Edit, Bash |
Send reliable notifications to both Telegram and Pushover when watchexec detects file changes or process crashes.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
Use this skill when:
watchexec wrapper script → detect event → notify-script → Telegram + Pushover
# wrapper.sh - Monitors process and detects restart reasons
watchexec --restart -- python bot.py
# On event, call:
notify-script.sh <reason> <exit_code> <watchexec_info_file> <crash_context>
Telegram: HTML mode ONLY
MESSAGE="<b>Alert</b>: <code>file.py</code>"
# Escape 3 chars: & → &, < → <, > → >
Pushover: Plain text ONLY
/usr/bin/env bash << 'SKILL_SCRIPT_EOF'
# Strip HTML tags before sending
MESSAGE_PLAIN=$(echo "$MESSAGE_HTML" | sed 's/<[^>]*>//g')
SKILL_SCRIPT_EOF
Why HTML for Telegram:
., -, _, etc.)&, <, >)/usr/bin/env bash << 'SKILL_SCRIPT_EOF_2'
# 1. Build HTML message for Telegram
MESSAGE_HTML="<b>File</b>: <code>handler_classes.py</code>"
# 2. Strip HTML for Pushover
MESSAGE_PLAIN=$(echo "$MESSAGE_HTML" | sed 's/<[^>]*>//g')
# 3. Send to Telegram with HTML
curl -s -d "chat_id=$CHAT_ID" \
-d "text=$MESSAGE_HTML" \
-d "parse_mode=HTML" \
https://api.telegram.org/bot$BOT_TOKEN/sendMessage
# 4. Send to Pushover with plain text
curl -s --form-string "message=$MESSAGE_PLAIN" \
https://api.pushover.net/1/messages.json
SKILL_SCRIPT_EOF_2
# Fire-and-forget background notifications (don't block restarts)
"$NOTIFY_SCRIPT" "crash" "$EXIT_CODE" "$INFO_FILE" "$CONTEXT_FILE" &
Before deploying:
&, <, >)stat (not find -newermt)_, ., -)Key Lessons:
& → &, < → <, > → >stat for file detection on macOS (not find -newermt)For detailed information, see:
Bundled Examples:
examples/notify-restart.sh - Complete dual-channel notification scriptexamples/bot-wrapper.sh - watchexec wrapper with restart detectionexamples/setup-example.sh - Setup guide and installation steps| Issue | Cause | Solution |
|---|---|---|
| Telegram escaping errors | Using Markdown instead of HTML | Switch to HTML mode with parse_mode=HTML |
| Pushover shows HTML tags | HTML not stripped | Strip tags with sed before sending to Pushover |
| Notifications not arriving | Credentials missing | Verify BOT_TOKEN, CHAT_ID, Pushover keys |
| Special chars broken | Missing HTML escaping | Escape &, <, > in dynamic content |
| find -newermt fails macOS | macOS incompatibility | Use stat for file detection instead |
| Notifications blocking | Not running in background | Add & to run notify script fire-and-forget |
| Duplicate notifications | Restart loop | Add debounce logic or cooldown period |
| Missing crash context | Context file not written | Verify watchexec info file path exists |
After this skill completes, check before closing:
Only update if the issue is real and reproducible — not speculative.