Sends dual-channel notifications (Telegram + Pushover) on watchexec events with proper formatting. Use when monitoring file changes, process restarts, or setting up alerts.
/plugin marketplace add terrylica/cc-skills/plugin install devops-tools@cc-skillsThis skill is limited to using the following tools:
examples/bot-wrapper.shexamples/notify-restart.shexamples/setup-example.shreference.mdreferences/common-pitfalls.mdreferences/credential-management.mdreferences/pushover-integration.mdreferences/telegram-html.mdreferences/watchexec-patterns.mdSend reliable notifications to both Telegram and Pushover when watchexec detects file changes or process crashes.
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 stepsThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.