关于 macos-reminders
macos-reminders 是通过脚本管理 Apple Reminders 的技能,适用于需要创建和查看提醒事项的用户。它支持按日期、清单、优先级和标记处理提醒,并通过标准输入传递 JSON。
主要功能
- 01查看提醒清单
- 02创建和筛选提醒事项
- 03设置日期、时间与优先级
- 04标记提醒并包含备注
适用场景
- 01创建带截止时间的待办事项
- 02查看指定清单中的任务
- 03添加购物清单中的多项提醒
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ lucaperret/ agent-skills --skill macos-reminders安装后在 Claude Code 中输入/macos-reminders确认已加载。
附带文件references/priorities.mdscripts/reminders.sh
详细介绍
macOS 提醒事项
通过 $SKILL_DIR/scripts/reminders.sh 管理 Apple 提醒事项。所有日期处理都使用相对计算(当前日期 + N * 天),以避免受地区设置影响(FR/EN/DE 日期格式)。
快速开始
列出提醒事项列表
务必先列出提醒事项列表,以找到正确的列表名称:
"$SKILL_DIR/scripts/reminders.sh" list-lists
创建提醒事项
echo '<json>' | "$SKILL_DIR/scripts/reminders.sh" create-reminder
JSON 字段:
| 字段 | 必填 | 默认值 | 描述 |
|---|---|---|---|
name | 是 | - | 提醒事项标题 |
list | 否 | 默认列表 | 提醒事项列表名称(来自 list-lists) |
body | 否 | "" | 备注/详情 |
offset_days | 否 | - | 截止日期相对于今天的天数(0=今天,1=明天) |
iso_date | 否 | - | 绝对截止日期 YYYY-MM-DD(优先于 offset_days) |
hour | 否 | 9 | 截止时间的小时(0-23) |
minute | 否 | 0 | 截止时间的分钟(0-59) |
priority | 否 | 0 | 优先级:0=无,1=高,5=中,9=低 |
flagged | 否 | false | 标记为已加旗标 |
列出提醒事项
echo '<json>' | "$SKILL_DIR/scripts/reminders.sh" list-reminders
JSON 字段:
| 字段 | 必填 | 默认值 | 描述 |
|---|---|---|---|
list | 否 | 所有列表 | 按列表名称筛选 |
include_completed | 否 | false | 包含已完成的提醒事项 |
解读自然语言
将用户请求映射到 JSON 字段:
| 用户说 | JSON |
|---|---|
| “明天下午 2 点提醒我” | offset_days: 1, hour: 14 |
| “3 天后提醒我” | offset_days: 3 |
| “添加到我的购物清单” | list: "Shopping"(匹配最接近的列表名称) |
| “高优先级”或“重要” | priority: 1, flagged: true |
| “2 月 25 日下午 3:30 提醒我” | iso_date: "2026-02-25", hour: 15, minute: 30 |
| “下周一提醒我” | 计算从今天到下周一的 offset_days |
| “给这个加旗标” | flagged: true |
对于“下周一”“下周五”等:根据当前日期计算天数偏移量。如有需要,使用 date 命令:
# Days until next Monday (1=Monday)
target=1; today=$(date +%u); echo $(( (target - today + 7) % 7 ))
提示词示例
以下是真实的用户提示词,以及你应运行的命令:
“提醒我买牛奶”
"$SKILL_DIR/scripts/reminders.sh" list-lists
然后:
echo '{"name":"Buy milk","list":"Reminders"}' | "$SKILL_DIR/scripts/reminders.sh" create-reminder
“添加一项待办事项,明天上午 10 点给牙医打电话”
echo '{"name":"Call the dentist","offset_days":1,"hour":10}' | "$SKILL_DIR/scripts/reminders.sh" create-reminder
“提醒我在 2 月 28 日提交报告——高优先级”
echo '{"name":"Submit the report","iso_date":"2026-02-28","hour":9,"priority":1,"flagged":true}' | "$SKILL_DIR/scripts/reminders.sh" create-reminder
“把鸡蛋、面包和黄油添加到我的购物清单”
echo '{"name":"Eggs","list":"Shopping"}' | "$SKILL_DIR/scripts/reminders.sh" create-reminder
echo '{"name":"Bread","list":"Shopping"}' | "$SKILL_DIR/scripts/reminders.sh" create-reminder
echo '{"name":"Butter","list":"Shopping"}' | "$SKILL_DIR/scripts/reminders.sh" create-reminder
“我的提醒事项里有什么?”
echo '{}' | "$SKILL_DIR/scripts/reminders.sh" list-reminders
“显示我的工作待办事项”
echo '{"list":"Work"}' | "$SKILL_DIR/scripts/reminders.sh" list-reminders
关键规则
- 如果用户没有指定列表,务必先列出提醒事项列表——使用最匹配的列表名称
- 绝不要在 AppleScript 中使用硬编码日期字符串——始终使用
offset_days或iso_date - 如果目标列表不明确,向用户确认列表名称
- 通过 stdin 传递 JSON——绝不要将其作为 CLI 参数(避免在进程列表中泄露数据)
- 脚本会验证所有字段(类型转换、范围检查、格式验证)——无效输入会被拒绝并显示错误消息
- 所有操作都会记录到
logs/reminders.log,包含时间戳、命令、列表和名称 - 截止日期为可选项——不带截止日期的提醒事项也是有效的(无日期任务)
- 多个项目:用户列出多个项目时,每个项目创建一条提醒事项
评论
支持 Markdown