Interacts with Google Calendar API via Python CLI to view, create, update, and delete events, check free/busy time, and manage calendars with safety confirmations.
Ships in dcjanus. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
通过本 skill 调用 Google Calendar API。读取日程时只取当前任务需要的日历与时间范围,不要把无关事件详情、参会人或会议链接带入上下文。
--json,且全局参数必须放在子命令前。./scripts/google_calendar_cli.py <command> --help。先运行:
./scripts/google_calendar_cli.py --json auth doctor
CLI 可以复用现有 Google Workspace / Sheets Desktop OAuth Client,但 Calendar token 始终单独保存在 $XDG_CONFIG_HOME/google-calendar-cli/token.json。缺少 client secret、Calendar API 未启用、scope 未配置或 Workspace 策略阻止时,读取 google-workspace-oauth.md。
--confirm-create、--confirm-update、--confirm-delete。--send-updates 默认 none,不会主动发参会人邮件。只有用户明确要求通知时才使用 all 或 externalOnly;即使选择 none,Google 仍可能在部分场景发送必要通知。events patch 是局部更新,但 JSON 数组字段会整体替换。更新 attendees、recurrence、reminders 等数组前先 events get 并保留需要的元素。events get 回读;删除后记录 API 成功结果和准确 event ID。calendar scope,不提供修改 ACL、共享设置、清空主日历或删除整个日历的能力。命令族:
auth login|doctor|logout|pathscalendars list|getevents list|get|instances|create|patch|deletefreebusy query列出日历与事件:
./scripts/google_calendar_cli.py --json calendars list
./scripts/google_calendar_cli.py --json events list \
--calendar-id primary \
--time-min '2026-09-04T00:00:00+08:00' \
--time-max '2026-09-11T00:00:00+08:00' \
--query '项目同步'
查询多人空闲时间:
./scripts/google_calendar_cli.py --json freebusy query \
--calendar-id '[email protected]' \
--calendar-id '[email protected]' \
--time-min '2026-09-04T09:00:00+08:00' \
--time-max '2026-09-04T18:00:00+08:00' \
--time-zone 'Asia/Shanghai'
创建普通事件。start.dateTime / end.dateTime 应包含 RFC3339 时区偏移;不带偏移时必须在对应对象内提供 IANA timeZone。全天事件改用 date,且 end.date 是不包含在事件内的结束日期:
./scripts/google_calendar_cli.py --json events create \
--calendar-id primary \
--event-json '{"summary":"项目同步","start":{"dateTime":"2026-09-05T10:00:00+08:00"},"end":{"dateTime":"2026-09-05T10:30:00+08:00"}}' \
--confirm-create
带参会人与重复规则的复杂事件优先使用临时 JSON 文件:
./scripts/google_calendar_cli.py --json events create \
--calendar-id primary \
--event-json @/tmp/calendar-event.json \
--send-updates all \
--confirm-create \
&& rm -- /tmp/calendar-event.json
只有当 JSON 文件由 Agent 为本次操作临时创建、写入成功后不再需要验证或回滚时,才能按上例用 && rm -- <明确路径> 清理。失败时保留文件;不要使用 ;、变量、通配符或目录作为清理目标,也不要删除用户提供的文件。
更新前先读取事件,再传递局部 patch:
./scripts/google_calendar_cli.py --json events get \
--calendar-id primary --event-id <event-id>
./scripts/google_calendar_cli.py --json events patch \
--calendar-id primary \
--event-id <event-id> \
--event-json '{"summary":"新的标题"}' \
--confirm-update
查看重复事件实例:
./scripts/google_calendar_cli.py --json events instances \
--calendar-id primary \
--event-id <recurring-event-id> \
--time-min '2026-09-01T00:00:00+08:00' \
--time-max '2026-10-01T00:00:00+08:00'
CLI 只请求:
calendar.calendarlist.readonly:读取用户已订阅的日历列表和元数据。calendar.events:读取和管理用户有权访问的事件。calendar.events.freebusy:读取用户有权查询的忙碌时间。这些权限不包含修改日历共享 ACL、删除整个日历或清空主日历。
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/dcjanus-dcjanus-plugins-dcjanus:google-calendar-clifrom dcjanus
Generated from the plugin's indexed repository (dcjanus/prompts) — no native marketplace selected
npx claudepluginhub p/dcjanus-dcjanus-plugins-dcjanus27 skills in this plugin
/codex-thread-close-check检查当前 Codex thread(会话)是否还有遗留事项,适用于用户准备关闭、归档当前对话,或询问当前 thread 是否可以收尾时。/codex-thread-namer为当前 Codex thread 设置名称;仅当用户手动调用或明确要求命名、重命名、整理当前 Codex 会话标题时使用,永远不要自动调用。/confluence-cli查询、检索与阅读 Confluence 文档/页面。/dcjanus-merge-policy将 GitHub 或 GitLab 仓库配置为 DCjanus 偏好的合并策略,包括 squash、组织仓库的 merge queue、提交消息模板和源分支删除设置。适用于明确要求采用 DCjanus 个人合并策略的场景,不用于一般 PR/MR 合并操作。/dcjanus-preferences适用于创建、修改或评审 Skill,配置或复刻 GitHub 个人仓库与长期自用 fork 的维护、CI、发布、合并策略和 Dependabot 更新,设计或评审 CLI 的命名、输入手感、输出与补全,设计或评审前端界面的布局、信息层级和文案,或在前端技术栈与无障碍组件、Connect/Protobuf API、well-known types、FieldMask/PATCH、AIP-127 HTTP 映射与 Protovalidate 校验、项目开发工具(含 mbx/Cargo)及版本管理、用户级程序的 XDG 数据目录、跨语言的数据存储、分析、压缩、归档、哈希、Telegram Bot 消息呈现及 Python/Rust/Go 第三方库之间做技术选择的场景。/dcjanus-tasklog查询或管理 DCjanus 的 Linear 事项、提醒、长期文档、模板(含周期事项)、视图或团队配置,以及按个人任务模型整理目标、进展和关联时使用。Other plugins' skills for the same job