简介
通过 OpenClaw 在 IM 工作流中管理 macOS 日历,支持截图解析、幂等写入、冲突检测、日程迁移与重复清理。
原始描述
Manage macOS Calendar with OpenClaw in IM-first workflows (Telegram/Discord/Feishu/iMessage/Slack), including screenshot-to-schedule extraction, idempotent c...
通过你的 Agent 添加
安装目录:macos-calendar-assistant/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
macos-calendar-assistant 是一款专为 macOS 设计的本地日历管理 Skill,通过 Python 与 Swift 脚本调用系统 EventKit 框架,实现与 Calendar.app 的深度集成。用户可通过 Telegram、Discord、飞书、iMessage、Slack 等 IM 工具直接对话操作日历,支持从聊天截图中智能提取日程信息,自动识别时间、地点、参与人等关键字段。
该 Skill 采用幂等写入机制,通过 upsert_event.py 实现创建/更新/跳过的一致性操作,避免重复事件。核心工作流包括:提取事件要素 → 冲突检测(list_events.swift)→ 幂等写入 → 设置提醒 → 定期清理重复。同时支持事件移动、延期、调整时长、每日回顾同步等进阶功能,并可通过 Cron 实现自动化通知。
显著优点
- 纯本地零依赖:仅使用 Python 标准库与系统 Swift 环境,无第三方包,杜绝供应链攻击风险
- IM-first 设计:深度适配即时通讯场景,支持从聊天截图和消息中提取日程,符合现代工作流
- 智能冲突处理:内置冲突检测与智能调度策略,优先保护 P0 事件,灵活调整可选项
- 幂等操作保障:创建/更新/跳过机制确保重复执行不会产生脏数据,适合自动化场景
- 隐私安全优先:所有数据本地处理,无网络外联,日历信息不上传云端
- 多日历智能路由:根据事件类型自动归类至 Training/Work/Product/Life 等日历
潜在缺点与局限性
- 平台锁定:仅限 macOS 系统,Windows/Linux 用户无法使用
- 权限门槛:需要用户授予 Calendar 完全访问权限,初次设置成本较高
- 无跨设备同步:依赖 iCloud/CalDAV 底层同步,Skill 本身不解决跨平台状态同步问题
- Swift 环境依赖:部分功能需要 Xcode Command Line Tools 支持
- 维护者单一:目前由个人开发者维护,长期更新可持续性存疑
适合的目标群体
- 重度 IM 用户:习惯在 Telegram/Discord/飞书/Slack 中处理事务的远程工作者
- macOS 生态深度用户:已全面使用 Apple 日历、iCloud 同步的苹果用户
- 效率工具爱好者:追求自动化日程管理、定期回顾复盘的生产力极客
- 隐私敏感用户:拒绝将日历数据上传至第三方 SaaS 服务的安全意识人群
- 小型团队管理者:需要快速协调会议时间、检测冲突的敏捷团队负责人
使用风险
- 数据操作风险:
calendar_clean.py的--apply模式会直接删除重复事件,建议始终先 dry-run 验证 - Cron 任务残留:
install.sh会修改用户 Crontab,停用后需运行uninstall.sh清理 - 时区配置依赖:默认使用
config.json中的时区设置,配置错误可能导致事件时间偏差 - 日历权限变更:macOS 系统升级可能重置隐私权限,需重新授权
- 脚本执行失败:Swift/Python 版本差异或系统更新可能导致脚本异常,建议定期运行
regression_test.py验证
技能正文
name: macos-calendar-assistant description: Manage macOS Calendar with OpenClaw in IM-first workflows (Telegram/Discord/Feishu/iMessage/Slack), including screenshot-to-schedule extraction, idempotent create/update, move/extend/reschedule, reminders, conflict checks, daily review sync, and duplicate cleanup. Use when users ask to add/edit/move/postpone events, parse schedule screenshots/chat messages, adjust weekly plans into daily execution, or keep calendar and review notes in sync.
macos-calendar-assistant
Use bundled scripts for reliable Calendar.app operations.
Workflow
- Extract title, start/end, timezone, calendar, location, notes, alarm.
- Check conflicts before writing:
scripts/list_events.swift <start_iso> <end_iso>
- Prefer idempotent writes:
scripts/upsert_event.py(create/update/skip)
- Apply alarm if requested:
scripts/set_alarm.py --uid <event_uid> --alarm-minutes <n>
- For hygiene, run duplicate scan:
scripts/calendar_clean.py --start <iso> --end <iso>
Calendar routing defaults
- Workout / Run / Training →
Training - Work / Meeting / Client →
Work - Product / Development / Building →
Product - Personal / Social / Travel →
Life - If unspecified: prefer writable iCloud/CalDAV calendars over local calendars.
Note: Calendar names vary by user setup. Map the intent to the closest local calendar name before writing.
Commands
List calendars
swift scripts/list_calendars.swift
List events in range
swift scripts/list_events.swift "2026-03-06T00:00:00+08:00" "2026-03-06T23:59:59+08:00"
Output includes uid for follow-up alarm/edit operations.
Idempotent create/update (recommended)
python3 scripts/upsert_event.py \
--title "Team sync" \
--start "2026-03-06T19:00:00+08:00" \
--end "2026-03-06T20:00:00+08:00" \
--calendar "Work" \
--notes "Agenda" \
--location "Online" \
--alarm-minutes 15
Result is one of: CREATED, UPDATED, SKIPPED.
Use --dry-run for preview.
Legacy direct add (always creates)
python3 scripts/add_event.py --title "..." --start "..." --end "..."
Set alarm by UID
python3 scripts/set_alarm.py --uid "EVENT_UID" --alarm-minutes 15
Move event (legacy utility)
swift scripts/move_event.swift "Team sync" "Work" "2026-03-07T10:00:00+08:00" 60 --search-days 7
# optional precise match:
# --original-start "2026-03-06T10:00:00+08:00"
Prefer upsert_event.py for most rescheduling flows; use move_event.swift for direct title-based move when needed.
Duplicate scan / cleanup
python3 scripts/calendar_clean.py --start "2026-03-01T00:00:00+08:00" --end "2026-03-08T23:59:59+08:00"
python3 scripts/calendar_clean.py --start "..." --end "..." --apply --confirm yes --snapshot-out ./delete-plan.json
Upcoming events (within 2 hours)
python3 scripts/within_2h.py
Environment + tests
python3 scripts/env_check.py
python3 scripts/regression_test.py
scripts/smoke_test.sh
Daily auto-check notifier
scripts/install.sh # run env check + install cron from config.json
scripts/uninstall.sh # remove cron
Extraction & scheduling heuristics (from real usage)
-
Speaker ownership from chat screenshots
- Treat the user's message bubble as primary intent.
- Treat counterpart bubbles as constraints (availability/travel window), not direct auto-create tasks.
-
Conflict policy
- If user explicitly says "override" (for example, "replace this slot"), allow replacing an existing slot and reschedule the displaced event.
- If not explicit, warn and ask for a choice before overwriting.
-
Time-window intent parsing
- Phrases like "4–6 PM for the other person" should first be interpreted as an availability window.
- Convert to a formal event only after user confirmation.
-
Reschedule priority
- Prefer moving flexible events (workouts/optional blocks) before strategic P0 work blocks.
- Do not auto-move P0 items unless user explicitly requests.
-
Confirmation prompt template
- Use: "I identified X as your intent and Y as counterpart constraints. I will apply Z. Confirm?"
- Keep it short; avoid over-confirming when intent is explicit.
Constraints
- macOS only (EventKit + Calendar permission required)
- Default timezone comes from
config.json.timezone(fallback Asia/Shanghai) when user does not specify - Use
--applyonly after reviewing dry-run output
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。