Get the FREE Ultimate OpenClaw Setup Guide →

macos-calendar

Scanned
npx machina-cli add skill lucaperret/agent-skills/macos-calendar --openclaw
Files (1)
SKILL.md
5.4 KB

macOS Calendar

Manage Apple Calendar events via $SKILL_DIR/scripts/calendar.sh. All date handling uses relative math (current date + N * days) to avoid locale issues (FR/EN/DE date formats).

Quick start

List calendars

Always list calendars first to find the correct calendar name:

"$SKILL_DIR/scripts/calendar.sh" list-calendars

Create an event

echo '<json>' | "$SKILL_DIR/scripts/calendar.sh" create-event

JSON fields:

FieldRequiredDefaultDescription
summaryyes-Event title
calendarnofirst calendarCalendar name (from list-calendars)
descriptionno""Event notes
offset_daysno0Days from today (0=today, 1=tomorrow, 7=next week)
iso_dateno-Absolute date YYYY-MM-DD (overrides offset_days)
hourno9Start hour (0-23)
minuteno0Start minute (0-59)
duration_minutesno30Duration
alarm_minutesno0Alert N minutes before (0=no alarm)
all_daynofalseAll-day event
recurrenceno-iCal RRULE string. See references/recurrence.md

Interpreting natural language

Map user requests to JSON fields:

User saysJSON
"tomorrow at 2pm"offset_days: 1, hour: 14
"in 3 days"offset_days: 3
"next Monday at 10am"Calculate offset_days from today to next Monday, hour: 10
"February 25 at 3:30pm"iso_date: "2026-02-25", hour: 15, minute: 30
"every weekday at 9am"hour: 9, recurrence: "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR"
"remind me 1 hour before"alarm_minutes: 60
"all day event on March 1"iso_date: "2026-03-01", all_day: true

For "next Monday", "next Friday" etc: compute the day offset using the current date. Use date command if needed:

# Days until next Monday (1=Monday)
target=1; today=$(date +%u); echo $(( (target - today + 7) % 7 ))

Example prompts

These are real user prompts and the commands you should run:

"Remind me to call the dentist in 2 days"

"$SKILL_DIR/scripts/calendar.sh" list-calendars

Then:

echo '{"calendar":"Personnel","summary":"Call dentist","offset_days":2,"hour":9,"duration_minutes":15,"alarm_minutes":30}' | "$SKILL_DIR/scripts/calendar.sh" create-event

"Schedule a team sync every Tuesday at 2pm with a 10-min reminder"

echo '{"calendar":"Work","summary":"Team sync","hour":14,"duration_minutes":60,"recurrence":"FREQ=WEEKLY;BYDAY=TU","alarm_minutes":10}' | "$SKILL_DIR/scripts/calendar.sh" create-event

"Block July 15 as a vacation day"

echo '{"calendar":"Personnel","summary":"Vacances","iso_date":"2026-07-15","all_day":true}' | "$SKILL_DIR/scripts/calendar.sh" create-event

"I have a doctor appointment next Thursday at 3:30pm, remind me 1 hour before"

# First compute offset_days to next Thursday (4=Thursday)
target=4; today=$(date +%u); offset=$(( (target - today + 7) % 7 )); [ "$offset" -eq 0 ] && offset=7

Then:

echo "{\"calendar\":\"Personnel\",\"summary\":\"Doctor appointment\",\"offset_days\":$offset,\"hour\":15,\"minute\":30,\"duration_minutes\":60,\"alarm_minutes\":60}" | "$SKILL_DIR/scripts/calendar.sh" create-event

"Set up a daily standup at 9am on weekdays for the next 4 weeks"

echo '{"calendar":"Work","summary":"Daily standup","hour":9,"duration_minutes":15,"recurrence":"FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;COUNT=20"}' | "$SKILL_DIR/scripts/calendar.sh" create-event

"Add a biweekly 1-on-1 with my manager on Fridays at 11am"

echo '{"calendar":"Work","summary":"1-on-1 Manager","hour":11,"duration_minutes":30,"recurrence":"FREQ=WEEKLY;INTERVAL=2;BYDAY=FR","alarm_minutes":5}' | "$SKILL_DIR/scripts/calendar.sh" create-event

Critical rules

  1. Always list calendars first if the user hasn't specified one — calendars marked [read-only] cannot be used for event creation
  2. Never use hardcoded date strings in AppleScript — always use offset_days or iso_date
  3. Confirm the calendar name with the user if multiple personal calendars exist
  4. Never target a [read-only] calendar — the script will reject it with an error
  5. For recurring events, consult references/recurrence.md for RRULE syntax
  6. Pass JSON via stdin — never as a CLI argument (avoids leaking data in process list)
  7. All fields are validated by the script (type coercion, range checks, format validation) — invalid input is rejected with an error message
  8. All actions are logged to logs/calendar.log with timestamp, command, calendar, and summary

Source

git clone https://github.com/lucaperret/agent-skills/blob/main/skills/macos-calendar/SKILL.mdView on GitHub

Overview

macOS Calendar helps you create, list, and manage Apple Calendar events using AppleScript. It exposes a JSON interface via a shell script (calendar.sh) and uses relative date math to avoid locale issues, supporting reminders, deadlines, all-day events, and recurring entries on macOS.

How This Skill Works

User requests are converted into a JSON payload for create-event. The calendar.sh script runs with osascript (AppleScript) and Python3 to parse JSON and create or update the Calendar entry. It first lists available calendars to identify the target, then applies fields like summary, iso_date, offset_days, hour, minute, duration_minutes, alarm_minutes, all_day, and recurrence to create the event.

When to Use It

  • Remind me in 3 days or set a reminder for an upcoming task
  • Add a specific event to a calendar on macOS
  • Schedule a meeting next Monday at 2pm
  • Create a recurring weekly event (e.g., team standup every Tuesday)
  • Set a deadline or all-day block on a fixed date

Quick Start

  1. Step 1: List calendars using the calendar.sh script: $SKILL_DIR/scripts/calendar.sh list-calendars
  2. Step 2: Create an event by piping a JSON payload to create-event
  3. Step 3: Review and adjust fields like offset_days, iso_date, hour, minute, and recurrence as needed

Best Practices

  • Always run list-calendars first to identify the correct calendar
  • Use iso_date for absolute dates to avoid offset errors
  • Use offset_days for relative dates like tomorrow or next Monday
  • Include recurrence in iCal RRULE format for repeating events
  • Set alarm_minutes to receive a reminder before the event

Example Use Cases

  • Remind dentist in 2 days -> {\"calendar\":\"Personnel\",\"summary\":\"Call dentist\",\"offset_days\":2,\"hour\":9,\"duration_minutes\":15,\"alarm_minutes\":30}
  • Team sync every Tuesday at 2pm -> {\"calendar\":\"Work\",\"summary\":\"Team sync\",\"hour\":14,\"duration_minutes\":60,\"recurrence\":\"FREQ=WEEKLY;BYDAY=TU\",\"alarm_minutes\":10}
  • Vacations on July 15 -> {\"calendar\":\"Personnel\",\"summary\":\"Vacances\",\"iso_date\":\"2026-07-15\",\"all_day\":true}
  • Doctor appointment next Thursday at 3:30pm -> {\"calendar\":\"Personnel\",\"summary\":\"Doctor appointment\",\"offset_days\":4,\"hour\":15,\"minute\":30,\"duration_minutes\":60,\"alarm_minutes\":60}
  • Submit monthly report every month -> {\"calendar\":\"Work\",\"summary\":\"Submit monthly report\",\"offset_days\":30,\"hour\":17,\"minute\":0,\"recurrence\":\"FREQ=MONTHLY\"}

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers