gcalcli-calendar
Use gcalcli to read/search/manage Google Calendar with minimal tool calls and minimal output.
Rules
CLI flag placement (critical)
- Global flags (
--nocolor, --calendar) go BEFORE the subcommand.
- Subcommand-specific flags go AFTER the subcommand name.
- Example:
gcalcli --nocolor delete --iamaexpert "query" start end — NOT gcalcli --nocolor --iamaexpert delete ....
- This applies to ALL subcommand flags:
--iamaexpert (delete), --noprompt/--allday (add), --use-legacy-import (import), etc.
Output & language
- Don't print CLI commands/flags/tool details unless the user explicitly asks (e.g. "show commands used", "/debug", "/commands").
- If asked for commands: print ALL executed commands in order (including retries) and nothing else.
- Don't mix languages within one reply.
- Be concise. No scope unless nothing found.
Dates & formatting
- Human-friendly dates by default. ISO only if explicitly requested.
- Don't quote event titles unless needed to disambiguate.
Calendar scope
- Trust gcalcli config (default/ignore calendars). Don't broaden scope unless user asks "across all calendars" or results are clearly wrong.
Agenda (today-only by default)
- If user asks "agenda" without a period, return today only.
- Expand only if explicitly asked (tomorrow / next N days / date range).
Weekday requests (no mental math)
If user says "on Monday/Tuesday/..." without a date:
- fetch next 14 days agenda once,
- pick matching day/event from tool output,
- proceed (or disambiguate if multiple).
Finding events: prefer deterministic agenda scan (meaning-first)
When locating events to cancel/delete/edit:
- Prefer
agenda over search.
- Use a bounded window and match events by meaning (semantic match) rather than exact text.
- Default locate windows:
- If user gives an exact date: scan that day only.
- If user gives a weekday: scan next 14 days.
- If user gives only meaning words ("train", "lecture", etc.) with no date: scan next 30 days first.
- If still not found: expand to 180 days and say so only if still empty.
Use gcalcli search only as a fallback when:
- the time window would be too large to scan via agenda (token-heavy), or
- the user explicitly asked to "search".
Search (bounded)
- Default search window: next ~180 days (unless user specified otherwise).
- If no matches: say "No matches in next ~6 months (->)" and offer to expand.
- Show scope only when nothing is found.
Tool efficiency
- Default: use
--nocolor to reduce formatting noise and tokens.
- Use
--tsv only if you must parse/dedupe/sort.
Actions policy (optimized for conversational speed)
This skill is designed for personal assistant use where the user expects fast, low-friction calendar management. The confirmation policy below is an intentional UX choice — see README.md for rationale and safety guards.
Unambiguous actions: execute immediately
For cancel/delete/edit actions, skip confirmation when ALL of these hold:
- The user explicitly requested the action (e.g. "delete my dentist appointment").
- Exactly one event matches in a tight time window.
- The match is unambiguous (single clear result on an exact date, or user specified date+time).
Ambiguous actions: always ask first
If multiple candidates match, or the match is uncertain:
- Ask a short disambiguation question listing the candidates (1-3 lines) and wait for the user's choice.
Create events: overlap check MUST be cross-calendar (non-ignored scope)
When creating an event:
- Always run a best-effort overlap check across ALL non-ignored calendars by scanning agenda WITHOUT
--calendar.
- This ensures overlaps are detected even if the new event is created into a specific calendar.
- If overlap exists with busy events:
- Ask for confirmation before creating.
- If no overlap:
Choose the right create method
add — default for one-off events. Supports --allday, --reminder, --noprompt. Does NOT support recurrence or free/busy (transparency).
import via stdin — use ONLY when you need recurrence (RRULE) or free/busy (TRANSP:TRANSPARENT). Pipe ICS content via stdin; NEVER write temp .ics files (working directory is unreliable in exec sandbox).
quick — avoid unless user explicitly asks for natural-language add. Less deterministic.
Deletes must be verified
- Use non-interactive delete with
--iamaexpert (a delete subcommand flag — goes AFTER delete). This is gcalcli's built-in flag for non-interactive/scripted deletion.
- Always verify via agenda in the same tight window after deletion.
- If verification still shows the event, do one retry with
--refresh.
- Never claim success unless verification confirms the event is gone.
Canonical commands
Agenda (deterministic listing)
- Today:
gcalcli --nocolor agenda today tomorrow
- Next 14d (weekday resolution):
gcalcli --nocolor agenda today +14d
- Next 30d (meaning-first locate):
gcalcli --nocolor agenda today +30d
- Custom:
gcalcli --nocolor agenda <start> <end>
Search (fallback / explicit request)
- Default (~6 months):
gcalcli --nocolor search "<query>" today +180d
- Custom:
gcalcli --nocolor search "<query>" <start> <end>
Create — add (one-off events)
- Overlap preflight (tight, cross-calendar):
gcalcli --nocolor agenda <start> <end>
- IMPORTANT: do NOT add
--calendar here; overlaps must be checked across all non-ignored calendars.
- Timed event:
gcalcli --nocolor --calendar "<Cal>" add --noprompt --title "<Title>" --when "<Start>" --duration <minutes>
- All-day event:
gcalcli --nocolor --calendar "<Cal>" add --noprompt --allday --title "<Title>" --when "<Date>"
- With reminders (repeatable flag):
--reminder "20160 popup" → 14 days before (20160 = 14×24×60)
--reminder "10080 popup" → 7 days before
--reminder "0 popup" → at event start
- Time unit suffixes:
w (weeks), d (days), h (hours), m (minutes). No suffix = minutes.
- Method:
popup (default), email, sms.
Create — import via stdin (recurrence / free/busy)
Use ONLY when add can't cover the need (recurring events, TRANSP, etc.).
Pipe ICS directly via stdin — never write temp files.
echo 'BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
DTSTART;VALUE=DATE:20260308
SUMMARY:Event Title
RRULE:FREQ=YEARLY
TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR' | gcalcli import --calendar "<Cal>"
DTSTART;VALUE=DATE:YYYYMMDD for all-day; DTSTART:YYYYMMDDTHHmmSS for timed.
RRULE:FREQ=YEARLY — yearly recurrence. Also: DAILY, WEEKLY, MONTHLY.
TRANSP:TRANSPARENT — free; TRANSP:OPAQUE — busy (default).
- One import call = one event (one VEVENT block). For multiple events, run separate piped imports.
- Add
--reminder "TIME" flag(s) to set reminders (overrides any VALARM in ICS).
- All import-specific flags (
--use-legacy-import, --verbose, etc.) go AFTER import.
Delete (with post-delete verification)
- Locate via agenda (preferred):
gcalcli --nocolor agenda <dayStart> <dayEnd> (exact date)
gcalcli --nocolor agenda today +14d (weekday)
gcalcli --nocolor agenda today +30d (meaning only)
- Delete (non-interactive, bounded):
gcalcli --nocolor delete --iamaexpert "<query>" <start> <end>
- Verify (same window):
gcalcli --nocolor agenda <dayStart> <dayEnd>
- Optional one retry if still present:
gcalcli --nocolor --refresh agenda <dayStart> <dayEnd>
Edit / Modify existing events
gcalcli edit is interactive — cannot be used in non-interactive exec.
- To change properties not editable in-place: delete + recreate the event.
- Locate → delete (with
--iamaexpert) → create with updated properties → verify.
- For bulk property changes (e.g. setting all events to free): iterate delete+recreate per event.
1---2name: gcalcli-calendar3description: "Google Calendar via gcalcli: today-only agenda by default, bounded meaning-first lookup via agenda scans, and fast create/delete with verification--optimized for low tool calls and minimal output."4metadata:5 source: https://skillmd.com/skills/levalencia/gcalcli-calendar6 openclaw:7 emoji: 📅8 requires:9 bins:10 - gcalcli11---1213# gcalcli-calendar1415Use `gcalcli` to read/search/manage Google Calendar with minimal tool calls and minimal output.1617## Rules1819### CLI flag placement (critical)20- Global flags (`--nocolor`, `--calendar`) go BEFORE the subcommand.21- Subcommand-specific flags go AFTER the subcommand name.22- Example: `gcalcli --nocolor delete --iamaexpert "query" start end` — NOT `gcalcli --nocolor --iamaexpert delete ...`.23- This applies to ALL subcommand flags: `--iamaexpert` (delete), `--noprompt`/`--allday` (add), `--use-legacy-import` (import), etc.2425### Output & language26- Don't print CLI commands/flags/tool details unless the user explicitly asks (e.g. "show commands used", "/debug", "/commands").27- If asked for commands: print ALL executed commands in order (including retries) and nothing else.28- Don't mix languages within one reply.29- Be concise. No scope unless nothing found.3031### Dates & formatting32- Human-friendly dates by default. ISO only if explicitly requested.33- Don't quote event titles unless needed to disambiguate.3435### Calendar scope36- Trust gcalcli config (default/ignore calendars). Don't broaden scope unless user asks "across all calendars" or results are clearly wrong.3738### Agenda (today-only by default)39- If user asks "agenda" without a period, return today only.40- Expand only if explicitly asked (tomorrow / next N days / date range).4142### Weekday requests (no mental math)43If user says "on Monday/Tuesday/..." without a date:441) fetch next 14 days agenda once,452) pick matching day/event from tool output,463) proceed (or disambiguate if multiple).4748### Finding events: prefer deterministic agenda scan (meaning-first)49When locating events to cancel/delete/edit:50- Prefer `agenda` over `search`.51- Use a bounded window and match events by meaning (semantic match) rather than exact text.52- Default locate windows:53 - If user gives an exact date: scan that day only.54 - If user gives a weekday: scan next 14 days.55 - If user gives only meaning words ("train", "lecture", etc.) with no date: scan next 30 days first.56 - If still not found: expand to 180 days and say so only if still empty.5758Use gcalcli `search` only as a fallback when:59- the time window would be too large to scan via agenda (token-heavy), or60- the user explicitly asked to "search".6162### Search (bounded)63- Default search window: next ~180 days (unless user specified otherwise).64- If no matches: say "No matches in next ~6 months (<from>-><to>)" and offer to expand.65- Show scope only when nothing is found.6667### Tool efficiency68- Default: use `--nocolor` to reduce formatting noise and tokens.69- Use `--tsv` only if you must parse/dedupe/sort.7071## Actions policy (optimized for conversational speed)7273This skill is designed for personal assistant use where the user expects fast, low-friction calendar management. The confirmation policy below is an intentional UX choice — see README.md for rationale and safety guards.7475### Unambiguous actions: execute immediately76For cancel/delete/edit actions, skip confirmation when ALL of these hold:77- The user explicitly requested the action (e.g. "delete my dentist appointment").78- Exactly one event matches in a tight time window.79- The match is unambiguous (single clear result on an exact date, or user specified date+time).8081### Ambiguous actions: always ask first82If multiple candidates match, or the match is uncertain:83- Ask a short disambiguation question listing the candidates (1-3 lines) and wait for the user's choice.8485### Create events: overlap check MUST be cross-calendar (non-ignored scope)86When creating an event:87- Always run a best-effort overlap check across ALL non-ignored calendars by scanning agenda WITHOUT `--calendar`.88 - This ensures overlaps are detected even if the new event is created into a specific calendar.89- If overlap exists with busy events:90 - Ask for confirmation before creating.91- If no overlap:92 - Create immediately.9394### Choose the right create method95- **`add`** — default for one-off events. Supports `--allday`, `--reminder`, `--noprompt`. Does NOT support recurrence or free/busy (transparency).96- **`import` via stdin** — use ONLY when you need recurrence (RRULE) or free/busy (TRANSP:TRANSPARENT). Pipe ICS content via stdin; NEVER write temp .ics files (working directory is unreliable in exec sandbox).97- **`quick`** — avoid unless user explicitly asks for natural-language add. Less deterministic.9899### Deletes must be verified100- Use non-interactive delete with `--iamaexpert` (a `delete` subcommand flag — goes AFTER `delete`). This is gcalcli's built-in flag for non-interactive/scripted deletion.101- Always verify via agenda in the same tight window after deletion.102- If verification still shows the event, do one retry with `--refresh`.103- Never claim success unless verification confirms the event is gone.104105## Canonical commands106107### Agenda (deterministic listing)108- Today: `gcalcli --nocolor agenda today tomorrow`109- Next 14d (weekday resolution): `gcalcli --nocolor agenda today +14d`110- Next 30d (meaning-first locate): `gcalcli --nocolor agenda today +30d`111- Custom: `gcalcli --nocolor agenda <start> <end>`112113### Search (fallback / explicit request)114- Default (~6 months): `gcalcli --nocolor search "<query>" today +180d`115- Custom: `gcalcli --nocolor search "<query>" <start> <end>`116117### Create — `add` (one-off events)118- Overlap preflight (tight, cross-calendar):119 - `gcalcli --nocolor agenda <start> <end>`120 - IMPORTANT: do NOT add `--calendar` here; overlaps must be checked across all non-ignored calendars.121- Timed event:122 - `gcalcli --nocolor --calendar "<Cal>" add --noprompt --title "<Title>" --when "<Start>" --duration <minutes>`123- All-day event:124 - `gcalcli --nocolor --calendar "<Cal>" add --noprompt --allday --title "<Title>" --when "<Date>"`125- With reminders (repeatable flag):126 - `--reminder "20160 popup"` → 14 days before (20160 = 14×24×60)127 - `--reminder "10080 popup"` → 7 days before128 - `--reminder "0 popup"` → at event start129 - Time unit suffixes: `w` (weeks), `d` (days), `h` (hours), `m` (minutes). No suffix = minutes.130 - Method: `popup` (default), `email`, `sms`.131132### Create — `import` via stdin (recurrence / free/busy)133Use ONLY when `add` can't cover the need (recurring events, TRANSP, etc.).134Pipe ICS directly via stdin — never write temp files.135```136echo 'BEGIN:VCALENDAR137VERSION:2.0138BEGIN:VEVENT139DTSTART;VALUE=DATE:20260308140SUMMARY:Event Title141RRULE:FREQ=YEARLY142TRANSP:TRANSPARENT143END:VEVENT144END:VCALENDAR' | gcalcli import --calendar "<Cal>"145```146- `DTSTART;VALUE=DATE:YYYYMMDD` for all-day; `DTSTART:YYYYMMDDTHHmmSS` for timed.147- `RRULE:FREQ=YEARLY` — yearly recurrence. Also: `DAILY`, `WEEKLY`, `MONTHLY`.148- `TRANSP:TRANSPARENT` — free; `TRANSP:OPAQUE` — busy (default).149- One import call = one event (one VEVENT block). For multiple events, run separate piped imports.150- Add `--reminder "TIME"` flag(s) to set reminders (overrides any VALARM in ICS).151- All import-specific flags (`--use-legacy-import`, `--verbose`, etc.) go AFTER `import`.152153### Delete (with post-delete verification)154- Locate via agenda (preferred):155 - `gcalcli --nocolor agenda <dayStart> <dayEnd>` (exact date)156 - `gcalcli --nocolor agenda today +14d` (weekday)157 - `gcalcli --nocolor agenda today +30d` (meaning only)158- Delete (non-interactive, bounded):159 - `gcalcli --nocolor delete --iamaexpert "<query>" <start> <end>`160- Verify (same window):161 - `gcalcli --nocolor agenda <dayStart> <dayEnd>`162- Optional one retry if still present:163 - `gcalcli --nocolor --refresh agenda <dayStart> <dayEnd>`164165### Edit / Modify existing events166- `gcalcli edit` is interactive — cannot be used in non-interactive exec.167- To change properties not editable in-place: **delete + recreate** the event.168 - Locate → delete (with `--iamaexpert`) → create with updated properties → verify.169- For bulk property changes (e.g. setting all events to free): iterate delete+recreate per event.