Loading...
Loading...
(macOS only) 通过 osascript 和 reminders-cli 管理 Apple Calendar 和 Reminders,遵循 GTD 方法论。Triggers on "schedule", "calendar", "reminders", "GTD", "todo". 触发场景:用户说「安排会议」「创建提醒」「查看日程」「规划下周」「添加待办」「今天要做什么」「周回顾」「记一下」「别忘了」时触发。
npx skill4agent add niracler/skill schedule-manager| Tool | Type | Required | Install |
|---|---|---|---|
| macOS | system | Yes | This skill requires macOS |
| osascript | cli | Yes | Built-in on macOS |
| reminders-cli | cli | Yes | |
Do NOT proactively verify these tools on skill load. If a command fails due to a missing tool, directly guide the user through installation and configuration step by step.
| 工具 | 用途 | 示例 |
|---|---|---|
| Calendar | 固定时间承诺 | 会议、约会、截止日期 |
| Reminders | 待办事项(无固定时间) | 购物清单、任务、想法 |
有具体时间? → Calendar 事件
无具体时间? → Reminders 待办
需要提醒? → 两者都可设置提醒| 用户意图 | 模式 | 操作 |
|---|---|---|
| 「安排会议」「创建事件」 | Calendar | 创建带时间的事件 |
| 「添加待办」「创建提醒」「记一下」 | Reminders | 创建任务 |
| 「查看日程」「今天有什么」 | 查询 | 查询 Calendar + Reminders |
| 「规划下周」「周回顾」 | 规划 | 综合工作流 |
osascript -e 'tell application "Calendar" to get name of calendars'osascript <<'EOF'
set today to current date
set time of today to 0
set tomorrow to today + (1 * days)
tell application "Calendar"
repeat with cal in calendars
set evts to (every event of cal whose start date ≥ today and start date < tomorrow)
if (count of evts) > 0 then
repeat with e in evts
log (summary of e) & " | " & (start date of e)
end repeat
end if
end repeat
end tell
EOFosascript -e '
tell application "Calendar"
tell calendar "个人"
set startDate to (current date) + (1 * days)
set hours of startDate to 14
set minutes of startDate to 0
set endDate to startDate + (1 * hours)
make new event with properties {summary:"会议标题", start date:startDate, end date:endDate}
end tell
end tell'summarystart dateend datedescriptionlocationallday eventosascript -e '
tell application "Calendar"
tell calendar "个人"
delete (every event whose summary is "要删除的事件名")
end tell
end tell'注意:osascript 访问 Reminders 非常慢(已知问题),推荐使用。reminders-cli详见 reminders-cli-guide.md。
reminders show-lists# 查看所有未完成提醒
reminders show-all
# 查看指定列表
reminders show "工作"
# 按截止日期筛选
reminders show-all --due-date today# 基础创建
reminders add "收件箱" "任务名称"
# 带截止日期
reminders add "工作" "完成报告" --due-date "tomorrow 5pm"
# 带优先级 (low/medium/high)
reminders add "工作" "紧急任务" --priority high# 按索引完成(索引通过 show 命令查看)
reminders complete "收件箱" 0# 取消完成
reminders uncomplete "收件箱" 0
# 编辑提醒
reminders edit "收件箱" 0 "新的任务名称"
# 删除提醒
reminders delete "收件箱" 0reminders add "提醒" "<任务名>"reminders show-allreminders show-all| 错误 | 原因 | 解决 |
|---|---|---|
| 权限未授予 | 在系统设置中授权 |
| 列表不存在 | 先用 |
| 日期格式错误 | 使用 |
| 未安装 | |
| osascript Reminders 卡顿 | 已知性能问题 | 改用 |