智能日历助手:通过REST API 与 Claw Calendar (claw-calendar.com) 交互,管理日历和事件。凭证从环境变量读取,支持创建日历、添加事件、查询日程。
用户需要 管理日历、 创建事件、 设置提醒 或 订阅日历 时使用本 skill。
面向 Claw Calendar 云服务:通过 REST API 创建日历、添加事件,支持 .ics 订阅链接同步到手机原生日历。
变量说明CLAW_CALENDAR_API_KEYClaw Calendar API 密钥(在用户设置中生成)CLAW_CALENDAR_API_URLAPI 地址(可选,默认为 https://claw-calendar.com)
脚本会校验 API Key,缺失时报错并退出。
https://claw-calendar.com/api(默认)脚本作用scripts/list-calendars.js列出用户所有日历scripts/create-calendar.js创建新日历,返回订阅链接scripts/list-events.js列出指定日历的事件scripts/create-event.js在日历中创建新事件
bash
node scripts/list-calendars.js
输出:日历 ID、名称、颜色、订阅链接。
bash
# 必填:日历名称
node scripts/create-calendar.js --name "我的日历"
# 可选:描述、颜色
node scripts/create-calendar.js --name "股票提醒" --description "持仓股票重要日期" --color "#4f46e5"
输出:日历 ID、订阅链接(用于添加到手机日历)。
bash
# 列出所有日历的事件
node scripts/list-events.js --calendar-id <calendarId>
# 按日期范围筛选
node scripts/list-events.js --calendar-id <calendarId> --start 2026-04-01 --end 2026-04-30
bash
# 必填:日历ID、标题、开始日期
node scripts/create-event.js --calendar-id <calendarId> --title "会议" --start-date 2026-04-15
# 完整参数示例
node scripts/create-event.js \
--calendar-id <calendarId> \
--title "招商银行分红" \
--description "分红除权日,请注意股价变动" \
--start-date 2026-04-15 \
--end-date 2026-04-15 \
--start-time "09:30:00" \
--end-time "10:30:00" \
--alarm \
--alarm-minutes 1440
事件参数:
参数说明必填--calendar-id日历 ID✅--title事件标题✅--start-date开始日期 (YYYY-MM-DD)✅--end-date结束日期 (YYYY-MM-DD)否--start-time开始时间 (HH:MM:SS)否--end-time结束时间 (HH:MM:SS)否--description事件描述否--location地点否--alarm启用提醒否--alarm-minutes提前多少分钟提醒(默认 15)否
创建日历后,会返回 .ics 订阅链接,按以下方式添加到手机日历:
export CLAW_CALENDAR_API_KEY=your-key错误原因解决401 UnauthorizedAPI Key 无效或过期检查环境变量或重新生成 Key403 Forbidden无权访问该日历检查日历 ID 是否正确404 Not Found日历不存在确认日历 ID 或列出日历检查