Skip to content

ericrisco/rsc-harness / skills/calendar-scheduling

calendar-scheduling

Verified

Use when a product needs a booking surface — a pick-a-slot page, a Cal.com/Calendly embed, or real availability plus the confirmed meeting written to Google/Outlook — or when fixing double-booking, DST drift, or orphaned reschedule events. NOT calendar CRUD with no booking surface (that is `google-workspace`), NOT the payment (that is `stripe`).

FileKindSize
SKILL.mdskill md10.3 KB
evals/README.mdmarkdown899 B
evals/cases.yamlconfig3.3 KB
references/google-calendar-sync.mdmarkdown3.1 KB
references/provider-matrix.mdmarkdown3.5 KB
scripts/verify.shexecutablescript4.6 KB

references/google-calendar-sync.md

View on GitHub
# Google Calendar sync — payloads and edge cases

Facts dated 2026-06-02. Source: developers.google.com/workspace/calendar/api.
For non-booking calendar work (internal dashboards, raw event CRUD), use the
`google-workspace` sibling — this file is the booking-specific subset.

## 1. Availability — `freebusy.query`

POST `https://www.googleapis.com/calendar/v3/freeBusy`. Always query every
calendar that can block time (primary plus secondary calendars).

```json
{
  "timeMin": "2026-06-02T00:00:00Z",
  "timeMax": "2026-06-09T00:00:00Z",
  "timeZone": "Europe/Andorra",
  "items": [{ "id": "primary" }, { "id": "team-room@group.calendar.google.com" }]
}
```

Response returns `calendars.<id>.busy` as an array of `{start, end}` blocks.
Compute open slots = working hours − busy − buffers − minimum-notice window,
**server-side**. The browser renders the result; it never computes it.

## 2. Write — `events.insert` (with a Meet link)

POST `.../calendars/{calendarId}/events?conferenceDataVersion=1`. Set
`timeZone` on both `start` and `end`, or the time drifts to the calendar's
default zone.

```json
{
  "summary": "Intro call",
  "start": { "dateTime": "2026-10-25T10:00:00", "timeZone": "Europe/Andorra" },
  "end":   { "dateTime": "2026-10-25T10:30:00", "timeZone": "Europe/Andorra" },
  "attendees": [{ "email": "invitee@example.com" }],
  "conferenceData": {
    "createRequest": {
      "requestId": "uuid-per-booking",
      "conferenceSolutionKey": { "type": "hangoutsMeet" }
    }
  }
}
```

Persist the returned event `id` — you need it for reschedule and cancel.

## 3. Reschedule / cancel — no orphans

- Reschedule → `events.update` (or PATCH) the **stored event id** with new
  times. Never `events.insert` a second event.
- Cancel → `events.delete` the stored id (or PATCH `status: "cancelled"`), then
  release any slot lock so the old time is offerable again.

## 4. Stay in sync — `watch` + sync tokens, not polling

- **Push channels:** `events.watch` registers a channel that POSTs to your
  callback URL on changes. Channels expire — renew before expiry.
- **Incremental sync:** store the `nextSyncToken` from a list call; pass it as
  `syncToken` next time to fetch only deltas. A `410 Gone` means the token
  expired → do a full resync and capture a fresh token.
- Polling instead is slower, rate-limited, and misses edits between polls.

## 5. Recurring-event edge cases

- A recurring series has one master event; individual occurrences carry a
  `recurringEventId` pointing back to it.
- Editing a single occurrence creates an **exception instance** — update that
  instance's id, not the master, or you mutate the whole series.
- When reading availability, expand instances (`singleEvents=true`) so each
  occurrence's busy block is counted, not just the master.

## 6. Refresh tokens

- The refresh token arrives once (first consent with `access_type=offline`).
  Store it; access tokens are short-lived and you mint new ones from it.
- A `401` on an API call means refresh the access token and retry; a hard
  refresh failure means re-consent (token revoked or scope changed).
planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies.Stars: 108kUpdated Claude CodeCodexVerifiedInstall
meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要".Stars: 108kUpdated Claude CodeCodexVerifiedInstall