用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/L-LesterYu/OpenClaw-hot-skills-zh --skill caldav-calendar-zh命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | caldav-calendar-zh |
| description | 使用 vdirsyncer + khal 同步和查询 CalDAV 日历(iCloud、Google、Fastmail、Nextcloud 等)。适用于 Linux 系统。 |
| metadata | {"clawdbot":{"emoji":"📅","os":["linux"],"requires":{"bins":["vdirsyncer","khal"]},"install":[{"id":"apt","kind":"apt","packages":["vdirsyncer","khal"],"bins":["vdirsyncer","khal"],"label":"通过 apt 安装 vdirsyncer + khal"}]}} |
vdirsyncer 将 CalDAV 日历同步到本地 .ics 文件。khal 负责读取和写入这些文件。
查询前或修改后务必先同步:
vdirsyncer sync
khal list # 今天
khal list today 7d # 未来7天
khal list tomorrow # 明天
khal list 2026-01-15 2026-01-20 # 日期范围
khal list -a Work today # 特定日历
khal search "会议"
khal search "牙医" --format "{start-date} {title}"
khal new 2026-01-15 10:00 11:00 "会议标题"
khal new 2026-01-15 "全天事件"
khal new tomorrow 14:00 15:30 "电话" -a Work
khal new 2026-01-15 10:00 11:00 "带备注" :: 这里写描述
创建后,同步以推送更改:
vdirsyncer sync
khal edit 是交互式的 — 需要 TTY。自动化时请使用 tmux:
khal edit "搜索词"
khal edit -a CalendarName "搜索词"
khal edit --show-past "旧事件"
菜单选项:
s → 编辑摘要d → 编辑描述t → 编辑日期时间范围l → 编辑位置D → 删除事件n → 跳过(保存更改,下一个匹配项)q → 退出编辑后,同步:
vdirsyncer sync
使用 khal edit,然后按 D 删除。
用于脚本化:
khal list --format "{start-date} {start-time}-{end-time} {title}" today 7d
khal list --format "{uid} | {title} | {calendar}" today
占位符:{title}、{description}、{start}、{end}、{start-date}、{start-time}、{end-date}、{end-time}、{location}、{calendar}、{uid}
khal 在 ~/.local/share/khal/khal.db 中缓存事件。如果同步后数据看起来过时:
rm ~/.local/share/khal/khal.db
~/.config/vdirsyncer/config)iCloud 示例:
[general]
status_path = "~/.local/share/vdirsyncer/status/"
[pair icloud_calendar]
a = "icloud_remote"
b = "icloud_local"
collections = ["from a", "from b"]
conflict_resolution = "a wins"
[storage icloud_remote]
type = "caldav"
url = "https://caldav.icloud.com/"
username = "your@icloud.com"
password.fetch = ["command", "cat", "~/.config/vdirsyncer/icloud_password"]
[storage icloud_local]
type = "filesystem"
path = "~/.local/share/vdirsyncer/calendars/"
fileext = ".ics"
服务提供商 URL:
https://caldav.icloud.com/google_calendar 存储类型https://caldav.fastmail.com/dav/calendars/user/EMAIL/https://YOUR.CLOUD/remote.php/dav/calendars/USERNAME/~/.config/khal/config)[calendars]
[[my_calendars]]
path = ~/.local/share/vdirsyncer/calendars/*
type = discover
[default]
default_calendar = Home
highlight_event_days = True
[locale]
timeformat = %H:%M
dateformat = %Y-%m-%d
vdirsyncer discover # 仅首次运行
vdirsyncer sync