AgentSkillsCN

notify

向用户发送桌面通知,以提醒其注意输入、互动,或在长时间运行的任务完成后及时获得关注。当需要用户立即回应时使用此功能。

SKILL.md
--- frontmatter
name: notify
description: Send a desktop notification to alert the user. Use when you need immediate user attention for input, interaction, or when a long-running task completes.
user-invocable: true
allowed-tools: Bash
model: haiku

Desktop Notification

Send a Windows toast notification to get the user's attention.

CRITICAL: When you send a notification, STOP

After sending a notification, you MUST:

  1. STOP all activity immediately
  2. WAIT for the user to respond
  3. DO NOT continue with other attempts, workarounds, or approaches
  4. DO NOT ask follow-up questions or make suggestions

The notification means: "I need you right now. I'm waiting."

When to use this skill

Use this skill when:

  1. A command requires user interaction (keyboard input, clicking, browser actions)
  2. A long-running process completes and needs user review
  3. An error occurs that requires user intervention
  4. You need to alert the user before running an interactive command

After using this skill, STOP and WAIT.

Usage

The notification script is located at ~/.claude/scripts/notify.js.

Basic notification

bash
node $USERPROFILE/.claude/scripts/notify.js "Claude Code" "Your attention is needed!"

Custom notification

bash
node $USERPROFILE/.claude/scripts/notify.js "Custom Title" "Custom message text"

Examples

Before an interactive command:

bash
node $USERPROFILE/.claude/scripts/notify.js "Action Required" "GitHub CLI needs your device code"
gh auth login

After a long build:

bash
npm run build
node $USERPROFILE/.claude/scripts/notify.js "Build Complete" "Build finished - please review"

On error:

bash
node $USERPROFILE/.claude/scripts/notify.js "Error Occurred" "Deployment failed - check logs"

Implementation

The notification system uses Windows PowerShell toast notifications. It will:

  1. Display a native Windows notification with custom title and message
  2. Fallback to a beep if notifications fail
  3. Return success/failure status