claude-notify
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "claude-notify" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-fea58ac57ee0d5d7ff0cc15930d6b84b803584339725a2ad47a970032848f22b. Verify the upstream source and version against https://skillhub.cn/skills/user_88546431/claude-notify-user-88546431 before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Manage notification hooks for Claude Code. Used to initialize macOS, DingTalk, Lark, or WeCom notification channels, test notifications, view notification status, enable one-time long-task completion notifications, and enable or disable notification channels.
Introduction source: third_party · user_88546431 · 0.2.1 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Software, accounts and paid services
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: claude-notify
description: 管理 Claude Code 通知 hooks。用于初始化 macOS / 钉钉 / 飞书 / 企微通知、测试通知、查看状态、开启一次性长任务完成通知、开启或关闭通知通道。
slug: claude-notify-user-88546431
displayName: Claude Notify
version: 0.2.1
summary: 离开屏幕也不错过 Claude Code 的关键时刻——任务完成或等待确认时,桌面弹通知 + 音效提醒,点击直接跳回终端窗口。同时支持飞书、钉钉、企微推送,团队协作不掉线。
tags:
- claude-code
- notification
- hooks
- dingtalk
- feishu
- wecom
- workflow
license: MITClaude Notify
Claude Code 通知配置 Skill。用于配置 Claude Code Hooks,让 Claude Code 在等待确认或长任务完成时通知用户。
Core Model
claude-notify Skill
-> ~/.claude/settings.json hooks
-> ~/.claude/hooks/notify-router.sh (thin wrapper)
-> ~/.claude/hooks/notify-router.js (Node.js entry)
-> ~/.claude/hooks/src/channels/ (macos / dingtalk / feishu / wecom)
Supported Events
Notification: Claude Code 需要用户注意时通知,标题 "Claude Code — 等待确认",播放 Ping 音效。PreToolUse: 记录本轮工具任务开始时间,用于长任务判断。Stop: Claude Code 停止生成时判断是否需要通知。Stop 与 Notification 互斥去重(5s 窗口)。
Notification Strategy
Notification→ 立即通知所有已启用通道(标题含 hook 来源)Stop→ 检查 Notification 是否在 5s 内刚发过(互斥去重),再检查一次性标记,再检查工具运行时长 >= 100sPreToolUse→ 静默记录 started_at / tool_count,不通知
Supported Channels
| Channel | Method | Features |
|---|---|---|
| macOS | terminal-notifier (+ osascript fallback) | 桌面横幅 + 点击跳转终端 + afplay 音效 |
| 钉钉 | Webhook | Markdown 消息 |
| 飞书 | Webhook | 卡片消息 + 可选 HMAC-SHA256 签名 |
| 企微 | Webhook | Markdown 消息 |
Runtime Files
~/.claude/skills/claude-notify
~/.claude/hooks/notify-router.sh (bash thin wrapper)
~/.claude/hooks/notify-router.js (Node.js main entry)
~/.claude/hooks/lib/config.js
~/.claude/hooks/lib/state.js
~/.claude/hooks/lib/i18n.js
~/.claude/hooks/channels/macos.js
~/.claude/hooks/channels/dingtalk.js
~/.claude/hooks/channels/feishu.js
~/.claude/hooks/channels/wecom.js
~/.claude/notify/config.json
~/.claude/notify/state.json
~/.claude/notify/notify-on-stop
~/.claude/notify/notify.log
Configuration
~/.claude/notify/config.json:
{
"channels": {
"macos": true,
"dingtalk": false,
"feishu": false,
"wecom": false
},
"dingtalk": { "webhook_url": "" },
"feishu": { "webhook_url": "", "secret": "" },
"wecom": { "webhook_url": "" },
"macos": { "sound": "Glass" },
"audio": { "enabled": true },
"long_task": {
"auto_detect": true,
"duration_seconds": 100,
"manual_once": true
}
}
Webhook token 只保存在用户本机,不应提交到仓库。
Install
bash claude-notify/setup.sh
脚本会:检查 Node.js 18+、检测已有安装(升级模式)、备份旧配置、交互式配置各通道、写入 config.json、合并 settings.json hooks、发送测试通知。
升级模式保留旧的 webhook URL,新增字段写入默认值。
Commands
| 命令 | 说明 |
|---|---|
notify-router.sh Status |
查看所有通道状态、阈值、配置文件位置 |
notify-router.sh Doctor |
自检:Skill/Hooks/Config/Node/macOS/terminal-notifier/Webhook |
notify-router.sh TestMacOS |
测试 macOS 桌面通知 |
notify-router.sh TestDingTalk |
测试钉钉通知 |
notify-router.sh TestFeishu |
测试飞书通知 |
notify-router.sh TestWeCom |
测试企微通知 |
notify-router.sh EnableOnce |
开启一次性长任务完成通知 |
notify-router.sh Disable |
软关闭所有通知通道 |
notify-router.sh SetThreshold 600 |
调整长任务阈值(>=60s) |
notify-router.sh UninstallHooks |
从 settings.json 移除 hooks |
bash claude-notify/scripts/test-install.sh |
回归测试 |
Safety Rules
- 修改
~/.claude/settings.json前必须备份。 - 合并 hooks 时不得覆盖已有配置。
- 通知脚本失败不得阻塞 Claude Code(
exit 0)。 - Webhook token 只能保存在用户本机
~/.claude/notify/config.json。 - 非 macOS 环境自动跳过桌面通知和音频,仅使用 Webhook 通道。
Stop防刷屏:Notification 5s 内已发则跳过;无 once 标记且未达 100s 工具时长时不通知。
Requirements
- Node.js 18+
- macOS 通知需
terminal-notifier(可选,未安装时降级为 osascript;brew install terminal-notifier)
Current listing version
0.2.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决 Claude Code 长任务完成或等待确认时的通知痛点,支持多通道推送
- 具备明确的实用价值,受众为使用 Claude Code 的开发者/团队
Highlights
- description 明确描述了 Skill 的功能和用途,触发词清晰完整
Highlights
- 文档结构完整,包含核心模型、事件、策略、通道、配置、安装、命令等详细章节
- 提供了配置示例和命令说明,frontmatter 完整
Highlights
- 工具来源明确,参数配置清晰,覆盖了主要异常处理
- 不可逆操作有备份机制,通知失败不阻塞 Claude Code
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 137 -
Invoke commands or scripts
Read the script and arguments first. Use ordinary privileges and a scoped directory; confirm installation or execution in your host tool.
Mentioned in main document · lines 102, 123
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Translation pending; see source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.