gog-calendar
Use gog (gogcli) for Google Calendar: agenda (events list) and keyword search across calendars.
Output rule (tokens vs reliability)
gogcli stdout should stay parseable; prefer --plain / --json and put hints to stderr. oai_citation:0‡GitHub
- Default to
--plain for read-only listing you only summarize (cheaper tokens):
- agenda listing (today / next days / range)
- calendars list
- Use
--json only when structure is required:
- aggregating results across calendars (cross-calendar keyword search)
- deduping / sorting / extracting IDs for follow-up calls
- any write workflow where exact fields matter
- In automation runs, add
--no-input (fail instead of prompting). oai_citation:1‡GitHub
Calendar exclusions (post-processing)
Users may explicitly exclude certain calendars from searches/agenda (e.g., “National holidays”).
When answering, you MUST:
- Query broadly (e.g.,
events --all or iterate all calendars for search),
- Then filter out excluded calendars in post-processing.
How to determine excluded calendars:
- First, check the user’s preferences/memory for an explicit “exclude calendars” list.
- If none is provided, apply a conservative default filter for obvious noise calendars:
- calendars whose name/summary contains:
holiday, holidays, national holidays (and localized equivalents)
- Never filter out user-owned calendars unless explicitly excluded.
Filtering rule:
- If you have calendar metadata (from
gog calendar calendars), filter by calendar name/summary.
- If you only have events output, filter by matching event’s calendarId to the excluded calendarIds resolved from the calendars list.
Always mention filtering briefly if it materially changes the answer:
- “(Filtered out: National holidays)”
Agenda (always cross-calendar, then filter)
For “what’s on my calendar today / tomorrow / this week / between X and Y”:
- MUST query all calendars:
gog calendar events --all --from <date_or_iso> --to <date_or_iso> --plain
- Then apply calendar exclusions (above).
- Do not answer “nothing scheduled” unless you ran the command for the correct window and applied filtering.
Examples:
- Today:
gog calendar events --all --from 2026-02-04 --to 2026-02-05 --plain
- Next 7 days:
gog calendar events --all --from 2026-02-04 --to 2026-02-11 --plain
Output formatting:
- sort by start time
- group by day
- show: time range, summary, location (calendar name only if it helps)
Keyword search across calendars (best-effort, aggregate, then filter)
Calendar event queries are scoped to a calendarId (API is /calendars/{calendarId}/events), so keyword search must iterate calendars and aggregate results. oai_citation:2‡Google for Developers
Default window:
- if user didn’t specify a range: next 6 months from today (inclusive)
- if user specified date/range: use it
Workflow (do not skip):
- List calendars (need IDs + names for filtering):
gog calendar calendars --json
- Build the set of excluded calendarIds from the exclusions rule.
- For EACH non-excluded
calendarId, search (JSON required for merge/dedupe):
gog calendar search "<query>" --calendar <calendarId> --from <from> --to <to> --max 50 --json --no-input
- Aggregate all matches across calendars (do NOT stop on first match unless user asked).
- Deduplicate by
(calendarId, eventId), sort by start time.
- Report results and explicitly mention the searched window (and any filters applied).
If nothing found in default window:
- say: “No events found in the next 6 months ( → ). Want me to search further (e.g., 12 months) or within specific dates?”
Fallback if user is sure it exists:
- ask/derive an approximate date and list around it (then filter):
gog calendar events --all --from <date-7d> --to <date+7d> --plain
- then match by title tokens locally (casefold + token overlap)
Writes (create/update/delete/RSVP)
Before any write action:
- summarize exact intent (calendar, title, start/end, timezone, attendees, location)
- ask for explicit “yes”
- then run the command
1---
2name: gog-calendar
3description: "Google Calendar via gogcli: reliable cross-calendar agenda
4 (today/week/range) and best-effort keyword search across calendars (iterate +
5 aggregate). Token-efficient output (`--plain` default, `--json` only when
6 needed). Post-filters unwanted calendars (e.g., holidays) and confirms before
7 writes."
8metadata:
9 source: https://skillmd.com/skills/modbender/gog-calendar
10---
11
12
13# gog-calendar
14
15Use `gog` (gogcli) for Google Calendar: agenda (events list) and keyword search across calendars.
16
17## Output rule (tokens vs reliability)
18
19gogcli stdout should stay parseable; prefer `--plain` / `--json` and put hints to stderr. [oai_citation:0‡GitHub](https://github.com/steipete/gogcli/blob/main/AGENTS.md?utm_source=chatgpt.com)
20
21- Default to **`--plain`** for read-only listing you only summarize (cheaper tokens):
22 - agenda listing (today / next days / range)
23 - calendars list
24- Use **`--json`** only when structure is required:
25 - aggregating results across calendars (cross-calendar keyword search)
26 - deduping / sorting / extracting IDs for follow-up calls
27 - any write workflow where exact fields matter
28- In automation runs, add **`--no-input`** (fail instead of prompting). [oai_citation:1‡GitHub](https://github.com/steipete/gogcli/blob/main/README.md?utm_source=chatgpt.com)
29
30## Calendar exclusions (post-processing)
31
32Users may explicitly exclude certain calendars from searches/agenda (e.g., “National holidays”).
33When answering, you MUST:
341) Query broadly (e.g., `events --all` or iterate all calendars for search),
352) Then **filter out excluded calendars in post-processing**.
36
37How to determine excluded calendars:
38- First, check the user’s preferences/memory for an explicit “exclude calendars” list.
39- If none is provided, apply a conservative default filter for obvious noise calendars:
40 - calendars whose name/summary contains: `holiday`, `holidays`, `national holidays` (and localized equivalents)
41- Never filter out user-owned calendars unless explicitly excluded.
42
43Filtering rule:
44- If you have calendar metadata (from `gog calendar calendars`), filter by **calendar name/summary**.
45- If you only have events output, filter by matching event’s calendarId to the excluded calendarIds resolved from the calendars list.
46
47Always mention filtering briefly if it materially changes the answer:
48- “(Filtered out: National holidays)”
49
50## Agenda (always cross-calendar, then filter)
51
52For “what’s on my calendar today / tomorrow / this week / between X and Y”:
53- MUST query all calendars:
54 - `gog calendar events --all --from <date_or_iso> --to <date_or_iso> --plain`
55- Then apply calendar exclusions (above).
56- Do not answer “nothing scheduled” unless you ran the command for the correct window and applied filtering.
57
58Examples:
59- Today: `gog calendar events --all --from 2026-02-04 --to 2026-02-05 --plain`
60- Next 7 days: `gog calendar events --all --from 2026-02-04 --to 2026-02-11 --plain`
61
62Output formatting:
63- sort by start time
64- group by day
65- show: time range, summary, location (calendar name only if it helps)
66
67## Keyword search across calendars (best-effort, aggregate, then filter)
68
69Calendar event queries are scoped to a `calendarId` (API is `/calendars/{calendarId}/events`), so keyword search must iterate calendars and aggregate results. [oai_citation:2‡Google for Developers](https://developers.google.com/workspace/calendar/api/v3/reference/events/list?utm_source=chatgpt.com)
70
71Default window:
72- if user didn’t specify a range: **next 6 months from today** (inclusive)
73- if user specified date/range: use it
74
75Workflow (do not skip):
761) List calendars (need IDs + names for filtering):
77 - `gog calendar calendars --json`
782) Build the set of excluded calendarIds from the exclusions rule.
793) For EACH non-excluded `calendarId`, search (JSON required for merge/dedupe):
80 - `gog calendar search "<query>" --calendar <calendarId> --from <from> --to <to> --max 50 --json --no-input`
814) Aggregate all matches across calendars (do NOT stop on first match unless user asked).
825) Deduplicate by `(calendarId, eventId)`, sort by start time.
836) Report results and explicitly mention the searched window (and any filters applied).
84
85If nothing found in default window:
86- say: “No events found in the next 6 months (<from> → <to>). Want me to search further (e.g., 12 months) or within specific dates?”
87
88Fallback if user is sure it exists:
89- ask/derive an approximate date and list around it (then filter):
90 - `gog calendar events --all --from <date-7d> --to <date+7d> --plain`
91- then match by title tokens locally (casefold + token overlap)
92
93## Writes (create/update/delete/RSVP)
94
95Before any write action:
96- summarize exact intent (calendar, title, start/end, timezone, attendees, location)
97- ask for explicit “yes”
98- then run the command