Calendar Hold Sync
/install calendar-hold-sync
Calendar Hold Sync
Implement hold mirroring from source Google calendars into target calendars to prevent double-booking.
Dependency
- Require
gogCLI inPATH. - Require user OAuth already configured for each account used in
mappings. - Do not hardcode account emails, calendar IDs, or event IDs in code.
If gog is not configured, use this setup flow:
- Run
gog auth credentials /path/to/client_secret.json. - Run
gog auth add [email protected] --services calendar. - Verify with
gog auth list.
Only add additional Google services if you explicitly need them for another workflow.
Official gog references:
- Homepage: https://gogcli.sh/
- Source: https://github.com/steipete/gogcli
Config Contract
Use a user-provided JSON config file with this shape:
mappings[]mappings[].namemappings[].targetAccountmappings[].targetCalendarId(defaultprimary)mappings[].sources[]with{ account, calendarId }mappings[].lookaheadDays(default30)mappings[].allDayMode:ignore|mirrormappings[].overlapPolicy:skip|allowhold.summary(defaultBusy)hold.visibility(private)hold.transparency(busy)hold.notifications(none)hold.reminders(none)metadata.format(SYNCV1)metadata.encoding(base64url(json))metadata.fields:srcAccount,srcCalendar,eventId,start,end,titlescheduling.reconcileCronscheduling.daytimeCron(optional)scheduling.driftWindowDays(optional)scheduling.watchIntervalSeconds(optional, default20)safety.dryRunsafety.maxChangesPerRunsafety.excludeIfSummaryMatches[]safety.excludeIfDescriptionPrefix[]gog.listEventsCmd|createEventCmd|updateEventCmd|deleteEventCmd(optional template overrides)gog.allowCustomCommands(must betrueto enable anygog.*Cmdoverride)
Custom Command Template Safety
When custom commands are enabled:
- Only
gogcommand templates are accepted. - Templates are rendered by replacing placeholders like
{account}and{calendarId}. - Rendered commands are executed as argv tokens (no shell interpolation).
- Keep
gog.allowCustomCommands=falseunless you fully trust and audit the config file.
Metadata Encoding
Store source linkage in hold description as:
SYNCV1:\x3Cbase64url(JSON)>
JSON fields:
srcAccountsrcCalendareventIdstartendtitle
Behavior
For each mapping:
- Read source events in the active window.
- Build desired hold events (
private,busy, no reminders). - Detect existing managed holds by
SYNCV1:prefix. - Reconcile idempotently:
- Create missing holds.
- Update drifted holds.
- Delete stale holds.
- If overlap policy is
skip, do not create a hold when a non-managed target event overlaps. - Enforce
maxChangesPerRun. - Respect
dryRun.
Backfill
Backfill mode upgrades legacy hold events (matching expected hold signature but lacking SYNCV1) by attaching encoded metadata when a unique source match exists.
Command Surface
hold-sync validate-confighold-sync reconcile --mapping \x3Cname>|--all [--dry-run]hold-sync backfill --mapping \x3Cname>|--all [--dry-run]hold-sync status --mapping \x3Cname>|--allhold-sync install-cron --mapping \x3Cname>|--allhold-sync watch --mapping \x3Cname>|--all [--dry-run] [--interval-seconds \x3Cn>]
Watch Cadence
Require watch cadence to be configurable from user config:
scheduling.watchIntervalSecondscontrols watch poll frequency.mappings[].lookaheadDayscontrols rolling watch/reconcile window.
Recommend baseline values:
watchIntervalSeconds: 900(15 minutes)lookaheadDays: 1(24 hours)
Working Model
- Use polling-based watch mode (
hold-sync watch) for fast updates. - Expect update latency approximately equal to
watchIntervalSeconds. - Treat this as self-hosted/operator-run automation.
Known Limits
- Do not assume webhook/push subscriptions are present; current fast sync path is polling.
- Keep periodic scheduled reconcile as fallback even when watch mode is enabled.
Required Tests
- metadata encode/decode round-trip
- overlap detection correctness
- idempotent reconcile upsert/delete behavior
Attribution: gog setup flow adapted from:
Provider Notes (openclaw)
Use this variant when publishing to ClawHub/OpenClaw.
- Keep instructions implementation-focused and command-oriented.
- Keep dependency explicit:
gogmust be preconfigured by user. - Prefer deterministic script execution over speculative edits.
- Avoid provider-specific APIs; treat the CLI as the boundary.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install calendar-hold-sync - 安装完成后,直接呼叫该 Skill 的名称或使用
/calendar-hold-sync触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Calendar Hold Sync 是什么?
Sync one or more source Google calendars into private Busy hold events in one or more target calendars using gog. Use when users need idempotent double-booki... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 815 次。
如何安装 Calendar Hold Sync?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install calendar-hold-sync」即可一键安装,无需额外配置。
Calendar Hold Sync 是免费的吗?
是的,Calendar Hold Sync 完全免费(开源免费),可自由下载、安装和使用。
Calendar Hold Sync 支持哪些平台?
Calendar Hold Sync 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Calendar Hold Sync?
由 misfit.dev(@tdewitt)开发并维护,当前版本 v1.0.1。