Get the FREE Ultimate OpenClaw Setup Guide →
a

Calendar Reminders (gcalcli + CalDAV)

Scanned

@adorostkar

npx machina-cli add skill @adorostkar/calendar-reminders --openclaw
Files (1)
SKILL.md
2.3 KB

gcalcli calendar wrapper + reminder planner

This skill provides:

  • scripts/calendar — wrapper around gcalcli
  • scripts/calendar_reminder_plan.py — produces a JSON plan for reminder scheduling
  • references/openclaw-calendar.example.json — example config format

Config

Copy the example config to a private location and edit it:

  • Default path: ~/.config/openclaw/calendar.json
  • Override with env: OPENCLAW_CALENDAR_CONFIG=/path/to/calendar.json

Requirements

  • Required: python3, gcalcli
  • Optional (for CalDAV/iCloud): vdirsyncer, khal

Security notes (why ClawHub may flag this)

This skill invokes external binaries and is config-driven.

  • The planner runs gcalcli/khal using subprocess.check_output([...], shell=False) (argument-list form; safe against shell injection from event titles).
  • If you wire a cron job to run vdirsyncerSyncCommand, make sure you run it as an argv list (subprocess.run(cmd_list, shell=False)), not as a shell string.
  • Only point gcalcliPath / khalBin to trusted binaries (prefer absolute paths). Don’t run untrusted paths.

Auth (Google)

gcalcli requires OAuth. On headless servers you may need SSH port-forwarding. The wrapper uses --noauth_local_server to print instructions.

Reminder planning

The planner outputs a JSON blob describing reminders to schedule. A separate cron job (or an agent turn) can read it and create one-shot OpenClaw reminders.

Defaults:

  • Ignore birthdays.
  • Timed events are considered important.
  • All-day events only trigger reminders if their title matches configured keywords.

Wiring a daily reminder scheduler (OpenClaw)

Create a daily cron job (e.g. 00:05 local time) that:

  1. If CalDAV is enabled in config, runs the configured vdirsyncer sync command.
  2. Runs scripts/calendar_reminder_plan.py to get a JSON plan.
  3. For each planned reminder, creates a one-shot OpenClaw systemEvent reminder at reminderAtUtc.
  4. Writes a small state file so you don’t schedule duplicates.

(Our skill intentionally provides the wrapper + planner; scheduling is left to your cron/agent wiring.)

Source

git clone https://clawhub.ai/adorostkar/calendar-remindersView on GitHub

Overview

Calendar Reminders is a config-driven wrapper around gcalcli (Google Calendar) with optional CalDAV integration via vdirsyncer and khal. It ships a wrapper script and a planner that outputs a JSON reminder plan for scheduling one-shot OpenClaw reminders. An example config file demonstrates the expected format and wiring, enabling reproducible automation.

How This Skill Works

The tool invokes gcalcli (and khal when CalDAV is enabled) through subprocess.check_output with shell=False to fetch events. The planner then emits a JSON blob detailing the reminders, which a cron job or agent can consume to create one-shot OpenClaw systemEvent reminders. Configuration is read from ~/.config/openclaw/calendar.json by default, or via the OPENCLAW_CALENDAR_CONFIG environment variable.

When to Use It

  • You want to generate one-shot OpenClaw reminders directly from Google Calendar events.
  • You need to synchronize and plan reminders from CalDAV sources via vdirsyncer/khal.
  • You operate on a headless server and rely on non-interactive OAuth guidance (no local server).
  • You want a reproducible JSON plan to feed into your OpenClaw scheduler.
  • You want to prevent duplicate reminders by maintaining a state file between runs.

Quick Start

  1. Step 1: Install Python3, gcalcli, and optional vdirsyncer/khal; copy the example config to ~/.config/openclaw/calendar.json and customize it.
  2. Step 2: Run scripts/calendar_reminder_plan.py to generate a JSON plan of reminders.
  3. Step 3: Wire a daily cron or agent to read the plan and create OpenClaw one-shot reminders from reminderAtUtc.

Best Practices

  • Use absolute paths for gcalcli/khal binaries in the config to avoid PATH issues.
  • Validate and test the planner output JSON before scheduling reminders.
  • Run vdirsyncer/khal sync commands as argv lists (shell=False) to avoid shell injection.
  • Keep the private calendar.json config file at ~/.config/openclaw and protect it.
  • Split configuration and scheduling: use the planner to generate JSON, then schedule separately.

Example Use Cases

  • A personal Google Calendar-based reminder plan fed into OpenClaw for one-shot alerts.
  • A team calendar using CalDAV sources to generate shared reminders via OpenClaw.
  • Headless server automation that runs daily to produce reminder plans without a UI.
  • A cron-driven workflow that reads the planner's JSON and creates systemEvent reminders.
  • An initial setup using the provided example config calendar.json to test end-to-end.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers