macos-calendar by lucaperret/agent-skills
npx skills add https://github.com/lucaperret/agent-skills --skill macos-calendar通过 $SKILL_DIR/scripts/calendar.sh 管理 Apple 日历事件。所有日期处理均使用相对计算(当前日期 + N * 天)以避免区域设置问题(FR/EN/DE 日期格式)。
始终首先列出日历以找到正确的日历名称:
"$SKILL_DIR/scripts/calendar.sh" list-calendars
echo '<json>' | "$SKILL_DIR/scripts/calendar.sh" create-event
JSON 字段:
| 字段 | 必填 | 默认值 | 描述 |
|---|---|---|---|
summary | 是 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| - |
| 事件标题 |
calendar | 否 | 第一个日历 | 日历名称(来自 list-calendars) |
description | 否 | "" | 事件备注 |
offset_days | 否 | 0 | 距今天的天数(0=今天,1=明天,7=下周) |
iso_date | 否 | - | 绝对日期 YYYY-MM-DD(覆盖 offset_days) |
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 点" | offset_days: 1, hour: 14 |
| "3 天后" | offset_days: 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 日的全天事件" | iso_date: "2026-03-01", all_day: true |
对于"下周一"、"下周五"等:使用当前日期计算天数偏移。如果需要,使用 date 命令:
# 距离下周一还有几天(1=周一)
target=1; today=$(date +%u); echo $(( (target - today + 7) % 7 ))
以下是真实的用户提示以及您应该运行的命令:
"提醒我两天后给牙医打电话"
"$SKILL_DIR/scripts/calendar.sh" list-calendars
然后:
echo '{"calendar":"Personnel","summary":"Call dentist","offset_days":2,"hour":9,"duration_minutes":15,"alarm_minutes":30}' | "$SKILL_DIR/scripts/calendar.sh" create-event
"安排每周二下午 2 点的团队同步会议,并设置 10 分钟前提醒"
echo '{"calendar":"Work","summary":"Team sync","hour":14,"duration_minutes":60,"recurrence":"FREQ=WEEKLY;BYDAY=TU","alarm_minutes":10}' | "$SKILL_DIR/scripts/calendar.sh" create-event
"将 7 月 15 日标记为休假日"
echo '{"calendar":"Personnel","summary":"Vacances","iso_date":"2026-07-15","all_day":true}' | "$SKILL_DIR/scripts/calendar.sh" create-event
"我下周四下午 3:30 有医生预约,提前 1 小时提醒我"
# 首先计算到下周四的天数偏移(4=周四)
target=4; today=$(date +%u); offset=$(( (target - today + 7) % 7 )); [ "$offset" -eq 0 ] && offset=7
然后:
echo "{\"calendar\":\"Personnel\",\"summary\":\"Doctor appointment\",\"offset_days\":$offset,\"hour\":15,\"minute\":30,\"duration_minutes\":60,\"alarm_minutes\":60}" | "$SKILL_DIR/scripts/calendar.sh" create-event
"为接下来 4 周的工作日安排每天上午 9 点的站会"
echo '{"calendar":"Work","summary":"Daily standup","hour":9,"duration_minutes":15,"recurrence":"FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;COUNT=20"}' | "$SKILL_DIR/scripts/calendar.sh" create-event
"添加一个每两周一次、周五上午 11 点与我的经理进行的 1 对 1 会议"
echo '{"calendar":"Work","summary":"1-on-1 Manager","hour":11,"duration_minutes":30,"recurrence":"FREQ=WEEKLY;INTERVAL=2;BYDAY=FR","alarm_minutes":5}' | "$SKILL_DIR/scripts/calendar.sh" create-event
[read-only] 的日历不能用于创建事件offset_days 或 iso_date[read-only] 日历为目标——脚本将报错并拒绝logs/calendar.log,包含时间戳、命令、日历和摘要每周安装次数
173
代码仓库
GitHub 星标数
2
首次出现
2026 年 2 月 17 日
安全审计
安装于
opencode171
gemini-cli170
codex170
kimi-cli169
amp169
github-copilot169
Manage Apple Calendar events via $SKILL_DIR/scripts/calendar.sh. All date handling uses relative math (current date + N * days) to avoid locale issues (FR/EN/DE date formats).
Always list calendars first to find the correct calendar name:
"$SKILL_DIR/scripts/calendar.sh" list-calendars
echo '<json>' | "$SKILL_DIR/scripts/calendar.sh" create-event
JSON fields:
| Field | Required | Default | Description |
|---|---|---|---|
summary | yes | - | Event title |
calendar | no | first calendar | Calendar name (from list-calendars) |
description | no | "" | Event notes |
offset_days | no | 0 | Days from today (0=today, 1=tomorrow, 7=next week) |
iso_date | no | - | Absolute date YYYY-MM-DD (overrides offset_days) |
hour | no | 9 | Start hour (0-23) |
minute | no | 0 | Start minute (0-59) |
duration_minutes | no | 30 | Duration |
alarm_minutes | no | 0 | Alert N minutes before (0=no alarm) |
all_day | no | false | All-day event |
recurrence | no | - | iCal RRULE string. See references/recurrence.md |
Map user requests to JSON fields:
| User says | JSON |
|---|---|
| "tomorrow at 2pm" | offset_days: 1, hour: 14 |
| "in 3 days" | offset_days: 3 |
| "next Monday at 10am" | Calculate offset_days from today to next Monday, hour: 10 |
| "February 25 at 3:30pm" | iso_date: "2026-02-25", hour: 15, minute: 30 |
| "every weekday at 9am" | hour: 9, recurrence: "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR" |
| "remind me 1 hour before" | alarm_minutes: 60 |
For "next Monday", "next Friday" etc: compute the day offset using the current date. Use date command if needed:
# Days until next Monday (1=Monday)
target=1; today=$(date +%u); echo $(( (target - today + 7) % 7 ))
These are real user prompts and the commands you should run:
"Remind me to call the dentist in 2 days"
"$SKILL_DIR/scripts/calendar.sh" list-calendars
Then:
echo '{"calendar":"Personnel","summary":"Call dentist","offset_days":2,"hour":9,"duration_minutes":15,"alarm_minutes":30}' | "$SKILL_DIR/scripts/calendar.sh" create-event
"Schedule a team sync every Tuesday at 2pm with a 10-min reminder"
echo '{"calendar":"Work","summary":"Team sync","hour":14,"duration_minutes":60,"recurrence":"FREQ=WEEKLY;BYDAY=TU","alarm_minutes":10}' | "$SKILL_DIR/scripts/calendar.sh" create-event
"Block July 15 as a vacation day"
echo '{"calendar":"Personnel","summary":"Vacances","iso_date":"2026-07-15","all_day":true}' | "$SKILL_DIR/scripts/calendar.sh" create-event
"I have a doctor appointment next Thursday at 3:30pm, remind me 1 hour before"
# First compute offset_days to next Thursday (4=Thursday)
target=4; today=$(date +%u); offset=$(( (target - today + 7) % 7 )); [ "$offset" -eq 0 ] && offset=7
Then:
echo "{\"calendar\":\"Personnel\",\"summary\":\"Doctor appointment\",\"offset_days\":$offset,\"hour\":15,\"minute\":30,\"duration_minutes\":60,\"alarm_minutes\":60}" | "$SKILL_DIR/scripts/calendar.sh" create-event
"Set up a daily standup at 9am on weekdays for the next 4 weeks"
echo '{"calendar":"Work","summary":"Daily standup","hour":9,"duration_minutes":15,"recurrence":"FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;COUNT=20"}' | "$SKILL_DIR/scripts/calendar.sh" create-event
"Add a biweekly 1-on-1 with my manager on Fridays at 11am"
echo '{"calendar":"Work","summary":"1-on-1 Manager","hour":11,"duration_minutes":30,"recurrence":"FREQ=WEEKLY;INTERVAL=2;BYDAY=FR","alarm_minutes":5}' | "$SKILL_DIR/scripts/calendar.sh" create-event
[read-only] cannot be used for event creationoffset_days or iso_date[read-only] calendar — the script will reject it with an errorlogs/calendar.log with timestamp, command, calendar, and summaryWeekly Installs
173
Repository
GitHub Stars
2
First Seen
Feb 17, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode171
gemini-cli170
codex170
kimi-cli169
amp169
github-copilot169
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
33,600 周安装
| "all day event on March 1" | iso_date: "2026-03-01", all_day: true |