
notify
Send notifications to Telegram or Desktop when tasks complete, need approval, or errors occur. Use w
作者 AdemKao|オープンソース
Notify Skill
Send notifications to keep the user informed about task progress.
When to Use
- Task Completed: After completing a significant task or feature
- Approval Needed: When waiting for user confirmation before proceeding
- Error Occurred: When encountering an error that needs attention
- Session Idle: When waiting for user input
Usage
Send Telegram Notification
# Basic notification
./scripts/send-telegram.sh "Your message here"
# With event type (for formatting)
./scripts/send-telegram.sh "Task completed: implemented search API" "task_completed"
./scripts/send-telegram.sh "Need approval to delete files" "approval_needed"
./scripts/send-telegram.sh "Build failed: missing dependency" "error_occurred"
Send Desktop Notification
# macOS, Linux, and Windows supported
./scripts/send-desktop.sh "Title" "Message body"
Check Configuration
# Verify notification setup is working
./scripts/test-notify.sh
Event Types
| Event | Emoji | Use Case |
|---|---|---|
task_completed | ✅ | Task finished successfully |
approval_needed | 🔔 | Waiting for user confirmation |
input_required | 💬 | Need user input to continue |
error_occurred | ❌ | Error that needs attention |
session_idle | 💤 | Session is idle |
Configuration
Scripts read configuration from these locations (in priority order):
-
Environment variables (highest priority)
AI_DEV_TG_BOT_TOKEN- Telegram bot tokenAI_DEV_TG_CHAT_ID- Telegram chat ID
-
Project config:
.ai/config/notifications.yaml -
User config:
~/.ai-dev/notifications.yaml -
Project .env:
.envfile in project root -
User .env:
~/.ai-dev/.env
Quick Setup
- Create a Telegram bot via @BotFather
- Get your chat ID by messaging the bot and visiting:
https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates - Set environment variables or create config file
See setup-guide.md for detailed instructions.
Examples
After completing a feature
./scripts/send-telegram.sh "✅ Implemented user authentication
Changes:
- Added login/register endpoints
- Created JWT middleware
- Added unit tests
Ready for review!" "task_completed"
When needing approval
./scripts/send-telegram.sh "🔔 Ready to deploy to production
Changes will affect:
- 3 API endpoints
- Database migration required
Reply to approve or reject." "approval_needed"
On error
./scripts/send-telegram.sh "❌ Build failed
Error: Missing dependency 'lodash'
File: src/utils/helpers.ts:15
Please check and advise." "error_occurred"
Troubleshooting
If notifications aren't working:
- Run
./scripts/test-notify.shto verify setup - Check that bot token and chat ID are correct
- Ensure the bot has permission to message you (send /start to the bot first)
- Check script permissions:
chmod +x ./scripts/*.sh