返回顶部
m

macos-calendarmacOS日历管理

Create, list, and manage macOS Calendar events via AppleScript. Use when the user asks to add a reminder, schedule an event, create a calendar entry, set a deadline, or anything involving Apple Calendar on macOS. Triggers on requests like "remind me in 3 days", "add to my calendar", "schedule a meeting next Monday at 2pm", "create a recurring weekly event". macOS only.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.2.0
安全检测
已通过
6,732
下载量
免费
免费
4
收藏
概述
安装方式
版本历史

macos-calendar

macOS日历

通过 $SKILL_DIR/scripts/calendar.sh 管理 Apple 日历事件。所有日期处理均使用相对计算(当前日期 + N * 天)以避免区域设置问题(FR/EN/DE 日期格式)。

快速开始

列出日历

始终先列出日历以找到正确的日历名称:

bash
$SKILL_DIR/scripts/calendar.sh list-calendars

创建事件

bash
echo | $SKILL_DIR/scripts/calendar.sh create-event

JSON 字段:

字段必填默认值描述
summary-事件标题
calendar
否 | 第一个日历 | 日历名称(来自 list-calendars) |
| description | 否 | | 事件备注 |
| offset_days | 否 | 0 | 从今天起的天数(0=今天,1=明天,7=下周) |
| isodate | 否 | - | 绝对日期 YYYY-MM-DD(覆盖 offsetdays) |
| hour | 否 | 9 | 开始小时(0-23) |
| minute | 否 | 0 | 开始分钟(0-59) |
| duration_minutes | 否 | 30 | 持续时间 |
| alarm_minutes | 否 | 0 | 提前 N 分钟提醒(0=无提醒) |
| all_day | 否 | false | 全天事件 |
| recurrence | 否 | - | iCal RRULE 字符串。参见 references/recurrence.md |

自然语言解析

将用户请求映射到 JSON 字段:

用户表述JSON
明天下午2点offsetdays: 1, hour: 14
3天后
offsetdays: 3 |
| 下周一上午10点 | 计算从今天到下周一的天数,hour: 10 |
| 2月25日下午3:30 | iso_date: 2026-02-25, hour: 15, minute: 30 |
| 每个工作日上午9点 | hour: 9, recurrence: FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR |
| 提前1小时提醒我 | alarm_minutes: 60 |
| 3月1日的全天活动 | isodate: 2026-03-01, allday: true |

对于下周一、下周五等:使用当前日期计算天数偏移。必要时使用 date 命令:

bash

距离下周一的天数(1=周一)


target=1; today=$(date +%u); echo $(( (target - today + 7) % 7 ))

示例提示

以下是真实的用户提示及应运行的命令:

提醒我2天后给牙医打电话
bash
$SKILL_DIR/scripts/calendar.sh list-calendars

然后:
bash
echo {calendar:Personnel,summary:Call dentist,offsetdays:2,hour:9,durationminutes:15,alarmminutes:30} | $SKILLDIR/scripts/calendar.sh create-event

安排每周二下午2点的团队同步会议,提前10分钟提醒
bash
echo {calendar:Work,summary:Team sync,hour:14,durationminutes:60,recurrence:FREQ=WEEKLY;BYDAY=TU,alarmminutes:10} | $SKILL_DIR/scripts/calendar.sh create-event

将7月15日设为休假
bash
echo {calendar:Personnel,summary:Vacances,isodate:2026-07-15,allday:true} | $SKILL_DIR/scripts/calendar.sh create-event

我下周四下午3:30有医生预约,提前1小时提醒我
bash

首先计算到下周四的天数(4=周四)


target=4; today=$(date +%u); offset=$(( (target - today + 7) % 7 )); [ $offset -eq 0 ] && offset=7

然后:
bash
echo {\calendar\:\Personnel\,\summary\:\Doctor appointment\,\offsetdays\:$offset,\hour\:15,\minute\:30,\durationminutes\:60,\alarmminutes\:60} | $SKILLDIR/scripts/calendar.sh create-event

设置未来4周工作日上午9点的每日站会
bash
echo {calendar:Work,summary:Daily standup,hour:9,durationminutes:15,recurrence:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;COUNT=20} | $SKILLDIR/scripts/calendar.sh create-event

添加与经理每两周一次周五上午11点的一对一会议
bash
echo {calendar:Work,summary:1-on-1 Manager,hour:11,durationminutes:30,recurrence:FREQ=WEEKLY;INTERVAL=2;BYDAY=FR,alarmminutes:5} | $SKILL_DIR/scripts/calendar.sh create-event

关键规则

  1. 1. 如果用户未指定日历,始终先列出日历 — 标记为 [read-only] 的日历不能用于创建事件
  2. 切勿在 AppleScript 中使用硬编码的日期字符串 — 始终使用 offsetdays 或 isodate
  3. 如果存在多个个人日历,请与用户确认日历名称
  4. 切勿针对 [read-only] 日历 — 脚本会拒绝并报错
  5. 对于重复事件,请查阅 references/recurrence.md 了解 RRULE 语法
  6. 通过标准输入传递 JSON — 切勿作为 CLI 参数(避免在进程列表中泄露数据)
  7. 所有字段均由脚本验证(类型强制转换、范围检查、格式验证)— 无效输入将被拒绝并显示错误信息
  8. 所有操作均记录到 logs/calendar.log,包含时间戳、命令、日历和摘要

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 macos-calendar-1776420070 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 macos-calendar-1776420070 技能

通过命令行安装

skillhub install macos-calendar-1776420070

下载

⬇ 下载 macos-calendar v1.2.0(免费)

文件大小: 6.49 KB | 发布时间: 2026-4-17 20:17

v1.2.0 最新 2026-4-17 20:17
- Added detailed usage instructions and examples to the documentation (SKILL.md).
- Clarified JSON fields for event creation, listing all supported options and their defaults.
- Provided best practices for parsing natural language and mapping to calendar actions.
- Introduced critical rules for reliability, including always listing calendars first and strict input validation.
- Explained handling of recurring events and alarm settings.
- Improved sample commands for a wide range of scheduling scenarios.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部