AgentSkillsCN

claude-bell

当你需要在终端外向用户发出提醒、在继续操作前获取确认,或收集用户输入时,这一技能将为你提供便捷支持。触发条件包括:任务完成、需重点关注的错误、需要审批的破坏性操作,或需要用户做出决策的问题。

SKILL.md
--- frontmatter
name: claude-bell
description: Use when you need to alert the user outside the terminal, get confirmation before proceeding, or collect text input. Triggers include task completion, errors requiring attention, destructive operations needing approval, or questions requiring user decision.

Claude Bell

Send macOS notifications to communicate with users outside the terminal.

When to Use

Use for:

  • Task completion (build done, tests passed, deploy finished)
  • Errors requiring attention
  • Confirmation before destructive operations
  • Collecting text input (release notes, commit messages)
  • Status updates during long operations

Don't use for:

  • Routine progress updates (use terminal)
  • Information user is actively watching
  • Rapid-fire notifications (spam)

Quick Reference

PatternCommand
Alertcb -t "Done" -m "Build complete"
Alert with soundcb -t "Done" -m "Build complete" --sound Glass
Yes/Nocb -t "Deploy?" -a "Yes,No" --default "No"
Multiple choicecb -t "Action" -a "A,B,C,Cancel" --default "Cancel"
Text inputcb -t "Notes" -r "Enter notes..." --timeout 5m
Templatecb --template build-done --var 'project:myapp'

Exit Codes

CodeMeaningAction
0SuccessProceed with returned value
1TimeoutUse --default value
2DismissedUse --default value
3User errorCheck arguments
4System errorCheck permissions (cb doctor)
5App errorReport bug

Critical Rules

  1. Always provide --default for interactive notifications
  2. Always check exit code - don't assume success
  3. Use --timeout for non-critical prompts
  4. Don't spam - one notification per logical event

References

  • references/cli.md - Full CLI documentation
  • references/examples.md - Workflow patterns
  • references/setup.md - Installation & setup (read only when user requests setup)
  • references/troubleshooting.md - Diagnosing issues