14
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill terrylica/cc-skills --skill dual-channel-watchexec- reference.md15.9 KB
- SKILL.md5.4 KB
Overview
This skill sends reliable dual-channel notifications (Telegram + Pushover) when watchexec detects file changes, process crashes, or restarts. It provides a lightweight wrapper pattern and concrete message formatting rules to ensure consistent delivery and readable alerts. The goal is fast, fire-and-forget notifications that work across platforms and reduce troubleshooting time.
How this skill works
A watchexec wrapper monitors the target process and on relevant events calls a notify script with context (reason, exit code, info file). The notify script builds an HTML message for Telegram, strips HTML to plain text for Pushover, escapes the three required characters for HTML, and sends both requests asynchronously. Notifications are archived for debugging and credentials are loaded from environment variables.
When to use it
- Monitor file changes or application restarts and alert operators immediately
- Notify on process crashes with exit code and contextual info files
- Wrap bots or long-running scripts managed by watchexec to add alerts
- Ensure message formatting works across Telegram (HTML) and Pushover (plain text)
- Troubleshoot delivery or escaping issues across both channels
Best practices
- Use HTML parse_mode for Telegram and escape only &, <, >
- Strip all HTML tags before sending to Pushover (plain text only)
- Load BOT_TOKEN, CHAT_ID, and Pushover keys from env vars or a secret manager
- Run notify commands in background (fire-and-forget) to avoid blocking restarts
- Archive outgoing messages and log delivery attempts for debugging
- Use stat-based file detection on macOS instead of find -newermt
Example use cases
- A watchexec wrapper that restarts a Python bot and notifies a dev channel on crashes
- File watcher that announces critical config file edits to Telegram and Pushover
- CI helper that alerts on build script failures via both channels
- Operational script that logs and forwards restart reasons and exit codes
- Debugging tool that shows escaped filenames with special chars in alerts
FAQ
HTML requires escaping only &, <, > while Markdown needs many more escapes for punctuation and special characters, making HTML simpler and more reliable.
How do I prevent notifications from blocking restarts?
Invoke the notify script with an ampersand (&) so it runs in the background and does not block watchexec from restarting the process.