需要准备 Git 这个 是必要的
然后下载脚本
我用夸克网盘给你分享了「windows-notification.ps1」,点击链接或复制整段内容,打开「夸克APP」即可获取。
/~bdb33Y9gpc~:/
链接:https://pan.quark.cn/s/5d7e91f16ee5
放在 .claude/hooks
其实放哪里都行只要 下面在
settings.json中设置的 路径能找到都行别弄丢了
然后下载脚本
我用夸克网盘给你分享了「windows-notification.ps1」,点击链接或复制整段内容,打开「夸克APP」即可获取。
/~bdb33Y9gpc~:/
链接:https://pan.quark.cn/s/5d7e91f16ee5
放在 .claude/hooks
其实放哪里都行只要 下面在
settings.json中设置的 路径能找到都行别弄丢了
PLAINTEXT
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -ExecutionPolicy Bypass -File \"C:/Users/SmallXY/.claude/hooks/windows-notification.ps1\" -Title \"Claude Code\" -Message \"任务已完成\"",
"timeout": 10
}
]
}
],
"Notification": [
{
"matcher": "permission_prompt",
"hooks": [
{
"type": "command",
"command": "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -ExecutionPolicy Bypass -File \"C:/Users/SmallXY/.claude/hooks/windows-notification.ps1\" -Title \"Claude Code\" -Message \"需要权限审批\"",
"timeout": 10
}
]
},
{
"matcher": "idle_prompt",
"hooks": [
{
"type": "command",
"command": "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -ExecutionPolicy Bypass -File \"C:/Users/SmallXY/.claude/hooks/windows-notification.ps1\" -Title \"Claude Code\" -Message \"等待你的输入\"",
"timeout": 10
}
]
}
]
},