Automatically flashes the Windows taskbar icon when Claude Code finishes responding, so you can step away during long tasks and know exactly when to come back.
- Uses Claude Code's
Stophook to trigger a PowerShell script on response completion - Calls Windows API
FlashWindowExto flash the terminal's taskbar button - Smart detection: checks if the terminal is in the foreground or background
- Foreground → flashes 5 times (brief reminder)
- Background → keeps flashing until you switch back
一句话安装(推荐)
直接告诉 Claude Code:
帮我从 https://github.com/chen1guan/claude-code-taskbar-flash 安装任务栏闪烁功能
Claude 会自动:下载 skill → 复制脚本 → 配置 hook → 验证。全部一步完成。
如果 Claude 没有自动执行配置,补充一句:
/taskbar-flash
Option B: Manual install
-
Copy
skills/taskbar-flash/references/flash-terminal.ps1to~/.claude/flash-terminal.ps1 -
Add the Stop hook to
~/.claude/settings.json:
{
"hooks": {
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"C:\\Users\\<your-username>\\.claude\\flash-terminal.ps1\""
}
]
}
]
}
}- Restart Claude Code and test.
- Windows 10/11
- PowerShell 5.1+
- Claude Code CLI
| Terminal | Support |
|---|---|
| Windows Terminal | ✅ Best experience |
| cmd.exe | ✅ |
| PowerShell window | ✅ |
| VS Code integrated terminal |
Check the log file at ~/.claude/flash-hook.log:
Get-Content "$env:USERPROFILE\.claude\flash-hook.log" -Tail 5- No log entries → Hook format is wrong in settings.json. Must use nested
{matcher, hooks[{type, command}]}format. - HWND is 0 → Cannot find terminal window. Make sure you're running in a supported terminal.
- Result: False → Invalid window handle. Try restarting the terminal.
Claude Code 回复完成后,自动闪烁 Windows 任务栏图标。长时间任务等待时,你可以放心去做别的事情,完成时立刻知道。
- 利用 Claude Code 的
Stophook,回复完成时触发 PowerShell 脚本 - 通过 Windows API
FlashWindowEx闪烁终端窗口的任务栏按钮 - 智能策略:自动检测窗口前后台状态
- 前台(正在看)→ 闪 5 次
- 后台(切走了)→ 持续闪烁直到切回
一句话安装(推荐)
直接告诉 Claude Code:
帮我从 https://github.com/chen1guan/claude-code-taskbar-flash 安装任务栏闪烁功能
Claude 会自动:下载 skill → 复制脚本 → 配置 hook → 验证。全部一步完成。
如果 Claude 没有自动执行配置,补充一句:
/taskbar-flash
手动安装
-
将
skills/taskbar-flash/references/flash-terminal.ps1复制到~/.claude/flash-terminal.ps1 -
在
~/.claude/settings.json中添加 Stop hook:
{
"hooks": {
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"C:\\Users\\<你的用户名>\\.claude\\flash-terminal.ps1\""
}
]
}
]
}
}- 重启 Claude Code 测试。
- Windows 10/11
- PowerShell 5.1+
- Claude Code CLI
查看日志文件 ~/.claude/flash-hook.log:
Get-Content "$env:USERPROFILE\.claude\flash-hook.log" -Tail 5| 现象 | 原因 | 解法 |
|---|---|---|
| 没有日志 | Hook 格式错误 | 检查 settings.json 是否用嵌套格式 |
| HWND 为 0 | 找不到终端窗口 | 确认在受支持的终端中运行 |
| Result: False | 窗口句柄无效 | 重启终端 |
| 一直闪烁不停 | 用了 FLASHW_TIMER 标志 |
确保脚本用的是 FLASHW_ALL | FLASHW_TIMERNOFG |
| 完全不闪烁 | 用了 FLASHW_TIMERNOFG 且窗口在前台 |
脚本需要 GetForegroundWindow() 判断前后台 |