Receive important event notifications from Claude Code via Telegram or Discord.
Commands
/notify init — Initialize setup
Guide the user through creating the notification configuration file. Ask the user which channels to enable (multiple selections allowed).
Telegram setup steps:
- Ask the user to provide the Telegram Bot Token (obtained from @BotFather)
- Ask the user to provide the Chat ID (obtained from @userinfobot)
Discord setup steps:
- Ask the user to provide the Discord Webhook URL (obtained from Discord channel settings → Integrations → Webhooks)
Configuration file example ~/.config/claude-notify/config.json:
{
"channels": {
"telegram": {
"enabled": true,
"bot_token": "<使用者提供的 token>",
"chat_id": "<使用者提供的 chat_id>"
},
"discord": {
"enabled": true,
"webhook_url": "<使用者提供的 webhook URL>"
}
},
"events": {
"task_complete": true,
"task_failed": true,
"needs_input": true,
"tool_rejected": true
}
}
After creation is complete, automatically run /notify test to verify the connection.
Note:
- Ensure the directory exists:
mkdir -p ~/.config/claude-notify - If the user only wants one of the channels, set the other to
"enabled": falseor simply omit it - If a configuration file already exists, ask whether to add a channel or overwrite it
/notify test — Test connection
Run the following command to send a test message:
node "<skill_path>/scripts/notify.js" --test
- Success: Inform the user "The test message has been sent, please check the notification channel"
- Failure: Display the error message and help troubleshoot
/notify <訊息> — Manually send notification
When the user enters /notify followed by any text, send that text as a notification:
node "<skill_path>/scripts/notify.js" --manual --message "<使用者的訊息>"
Example:
/notify 部署完成,請來檢查/notify 測試全部通過
/notify config — View current settings
Read and display the contents of ~/.config/claude-notify/config.json (hide the middle part of bot_token and webhook_url).
/notify toggle <event> — Toggle event notifications
Modify the ~/.config/claude-notify/config.json settings in events .
Available event names:
task_complete— Task completion notificationtask_failed— Tool execution failure notificationneeds_input— User decision required notificationtool_rejected— Tool denied notification
Example: /notify toggle task_complete — Toggle the on/off state of task completion notifications
Automatic notifications
npx skills Only this skill is installed, the Claude Code plugin is not installed. Automatic notifications are handled by
custom-skills-notify plugin
, which listens for the following Claude Code hook events:
| Event | Trigger timing |
|---|---|
Notification |
Permission required, idle prompt, question needs answering |
Stop |
Claude finishes responding |
PostToolUseFailure |
Tool execution failed |
When automatic notifications are needed, additionally run:
claude plugin marketplace add https://github.com/ValorVie/custom-skills.git
claude plugin install custom-skills-notify@custom-skills
This plugin installation is a separate operation and is not part of the results of npx skills add .
Script path
The notification script is located at:<skill_path>/scripts/notify.js
Use <skill_path> to represent the root directory path of this skill. When executing commands, replace it with the actual absolute path.