Skills opys-calendar-skill
A local markdown-backed calendar with CLI and optional two-way Google Calendar sync.
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/21j3phy/opys-calendar" ~/.claude/skills/clawdbot-skills-opys-calendar-skill && rm -rf "$T"
manifest:
skills/21j3phy/opys-calendar/SKILL.mdsource content
Calendar Markdown + Google Sync Skill
Use this skill to query/update the local markdown-backed calendar safely and sync it with Google Calendar.
Source of Truth
- File:
calendar.md - Authoritative section:
(fenced## Event Records
YAML blocks)event - Human summary section:
## Event Checklist
Event Identity Rules
: local identifierid
: stable cross-system identifier used for dedupeexternalId
: per-calendar Google event mappinggoogleEventIds
: event-level timestamp for conflict resolutionupdatedAt
Do not remove
externalId from existing records.
Preferred Interface
Use CLI from repo root:
npm run cli -- <command>
Safe Query Flow
- Run
.npm run cli -- summary - If raw markdown is needed, run
.npm run cli -- export
Safe Update Flow
- Add (preferred for new events):
npm run cli -- add --title "..." --start "<ISO>" --end "<ISO>" --category <id> [--shift-to-next|--allow-overlap] - Update:
If changingnpm run cli -- update --id <event_id> [fields...]
or--start
, include--end
or--shift-to-next
in non-interactive runs.--allow-overlap - Check/uncheck:
ornpm run cli -- check --id <event_id>--undone - Delete:
npm run cli -- delete --id <event_id> - Add category:
npm run cli -- category-add --id <id> --label "Label" --color "#9ca3af" --description "..." - Remove category:
npm run cli -- category-remove --id <id> --reassign <id>
Conflict handling:
and time-changingadd
detect overlaps with existing events.update- Interactive runs can choose accept overlap, shift to next available slot, or provide a custom time.
- Non-interactive runs:
to auto-resolve to the next open window.--shift-to-next
to keep the requested overlapping time.--allow-overlap
Agent snapshot output:
- Every mutating CLI command writes a rolling markdown snapshot.
- Default path:
./agent-snapshot.md - Override with
.CALENDAR_AGENT_SNAPSHOT - Recent window defaults to 14 days and is configurable with
.CALENDAR_AGENT_DAYS - Snapshot also includes upcoming 7 days when events exist.
UI Constraints
- UI does not provide add-event form/button.
- Events are created via CLI agents only.
- UI still supports drag/drop, resize, and check-off.
Google Sync Flow
- In UI, sign in with Google.
- Select target calendar via calendar selector controls.
- Click Sync Now for two-way merge.
Sync state file:
.calendar-google-sync-state.json
Import/Export
- Export:
npm run cli -- export --out backup-calendar.md - Import:
npm run cli -- import --in backup-calendar.md
Notes for Agents
- Keep datetimes in ISO format.
- Prefer CLI operations over manual markdown edits.
- If categories are changed manually in frontmatter, keep
,id
, andlabel
fields valid.color
Environment Variables
This skill uses the following environment variables (defined in
.env):
-
Google Calendar Sync (Optional)
: Google OAuth Client IDGOOGLE_CLIENT_ID
: Google OAuth Client SecretGOOGLE_CLIENT_SECRET
: Should beGOOGLE_REDIRECT_URIhttp://localhost:<PORT>/api/google/auth/callback
-
Agent Configuration (Optional)
: Custom absolute or relative path to write the Markdown snapshot. Defaults toCALENDAR_AGENT_SNAPSHOT
../agent-snapshot.md
: Number of historical days to include in the snapshot (defaults to 14).CALENDAR_AGENT_DAYS
: API server port (defaults to 8787).PORT
: Base URL for the frontend UI.APP_BASE_URL