用途
macOS Reminders 用于通过 AppleScript 管理 macOS 提醒事项(Reminders)。当用户要求创建提醒、添加待办、设置任务等时使用。所有操作通过 $SKILL_DIR/scripts/reminders.sh 脚本完成。
主要能力
- 列出提醒列表(list-lists)
- 创建提醒(create-reminder)
- 列出提醒(list-reminders)
所有日期处理使用相对数学计算(当前日期 + 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 字段:
- "remind me tomorrow at 2pm" → offset_days: 1, hour: 14
- "remind me in 3 days" → offset_days: 3
- "add to my shopping list" → list: "Shopping"(匹配最接近的列表名称)
- "high priority" 或 "important" → priority: 1, flagged: true
- "remind me on February 25 at 3:30pm" → iso_date: "2026-02-25", hour: 15, minute: 30
- "remind me next Monday" → 计算从今天到下周一的天数偏移
- "flag this" → flagged: true
对于 "next Monday"、"next Friday" 等:使用当前日期计算天数偏移。如需要可使用 date 命令:
Days until next Monday (1=Monday)
target=1; today=$(date +%u); echo $(( (target - today + 7) % 7 ))
示例提示
以下为真实用户提示及应运行的命令:
"Remind me to buy milk"
"$SKILL_DIR/scripts/reminders.sh" list-lists
然后:
echo '{"name":"Buy milk","list":"Reminders"}' | "$SKILL_DIR/scripts/reminders.sh" create-reminder
"Add a to-do to call the dentist tomorrow at 10am"
echo '{"name":"Call the dentist","offset_days":1,"hour":10}' | "$SKILL_DIR/scripts/reminders.sh" create-reminder
"Remind me to submit the report on February 28 — high priority"
echo '{"name":"Submit the report","iso_date":"2026-02-28","hour":9,"priority":1,"flagged":true}' | "$SKILL_DIR/scripts/reminders.sh" create-reminder
"Add eggs, bread, and butter to my shopping list"
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
"What's on my reminders?"
echo '{}' | "$SKILL_DIR/scripts/reminders.sh" list-reminders
"Show my work to-dos"
echo '{"list":"Work"}' | "$SKILL_DIR/scripts/reminders.sh" list-reminders
关键规则
- 如果用户未指定列表,始终先列出提醒列表——使用最接近匹配的列表名称
- 切勿在 AppleScript 中使用硬编码日期字符串——始终使用 offset_days 或 iso_date
- 如果目标列表不明确,与用户确认列表名称
- 通过 stdin 传递 JSON——切勿作为 CLI 参数(避免在进程列表中泄露数据)
- 所有字段由脚本验证(类型强制转换、范围检查、格式验证)——无效输入会被拒绝并显示错误消息
- 所有操作记录到 logs/reminders.log,包含时间戳、命令、列表和名称
- 到期日可选——没有到期日的提醒是有效的(无日期任务)
- 多个项目:当用户列出多个项目时,为每个项目创建一个提醒
适用场景
适用于需要在 macOS 上通过命令行或自动化方式管理提醒事项的场景,例如创建待办、设置带日期的提醒、按列表查看提醒等。
限制
仅支持 macOS 提醒事项,依赖 AppleScript 和 $SKILL_DIR/scripts/reminders.sh 脚本。其他平台或非提醒事项功能暂未提供。