# Macos Notification

> Send macOS system notifications using osascript. Useful for alerting users when long tasks complete. Use when this capability is needed.

- Skill: `tomevault-io/macos-notification` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/macos-notification`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/macos-notification/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/macos-notification

---


# macOS 系统通知

使用 osascript 发送 macOS 系统通知。

## 使用场景

- 长时间任务完成后通知用户
- 定时提醒
- 需要引起用户注意的重要消息

## 命令参考

### 发送基础通知

```bash
osascript -e 'display notification "任务已完成" with title "小搭子"'
```

### 带副标题的通知

```bash
osascript -e 'display notification "3 个文件已整理完毕" with title "小搭子" subtitle "文件整理"'
```

### 带声音的通知

```bash
osascript -e 'display notification "注意：操作需要确认" with title "小搭子" sound name "default"'
```

### 弹窗对话框（需要用户响应）

```bash
osascript -e 'display dialog "确认删除这 5 个文件吗？" with title "小搭子" buttons {"取消", "删除"} default button "取消"'
```

## 使用规范

- 通知标题统一为「小搭子」
- 通知内容简洁，不超过一行
- 仅在以下场景发送通知：
  - 耗时 > 10 秒的任务完成时
  - 需要用户注意的错误或警告
  - 定时任务触发时
- 不要频繁发送通知（同一任务最多 1 次完成通知）

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/malue-ai) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

