Query and manage macOS Calendar events. Use when the user asks about calendar events, appointments, schedules, or wants to create/modify calendar entries.
Query and manage macOS Calendar events using icalBuddy for fast reads and AppleScript for creating, modifying, or deleting entries. Use when users ask about schedules, appointments, or want to add/update calendar events.
/plugin marketplace add stbenjam/claude-nine/plugin install calendar@claude-nineThis skill inherits all available tools. When active, it can use any tool Claude has access to.
You are helping the user query and manage their macOS Calendar using icalBuddy and AppleScript.
Installation: brew install ical-buddy
Why use icalBuddy:
Basic Usage:
# Today's events
icalBuddy -f eventsToday
# Tomorrow's events
icalBuddy -f eventsToday+1
# Next 7 days
icalBuddy -f eventsFrom:today to:today+7
# Specific date range
icalBuddy -f eventsFrom:'2025-11-04' to:'2025-11-11'
# Events for a specific day
icalBuddy -f eventsOn:'2025-11-04'
Filtering by Calendar:
# Include only specific calendars
icalBuddy -ic "Work,Home" -f eventsToday
# Exclude specific calendars
icalBuddy -ec "Holidays in United States,US Holidays" -f eventsToday
Output Options:
# No formatting (plain text)
icalBuddy -n -f eventsToday
# Custom separators
icalBuddy -ps "| - |" -f eventsToday
# Show only bullet points and times
icalBuddy -b "• " -f eventsToday
Common Patterns:
# Work events for the week
icalBuddy -ic "stbenjam@redhat.com" -f eventsFrom:today to:today+7
# Personal events only
icalBuddy -ic "Home,stephen@bitbin.de" -f eventsToday
# Exclude all holiday calendars
icalBuddy -ec "Holidays,US Holidays" -f eventsToday+1
Why use AppleScript:
IMPORTANT NOTES:
Basic Event Creation:
tell application "Calendar"
set targetCalendar to calendar "calendar-name"
-- Create start date
set startDate to current date
set year of startDate to 2025
set month of startDate to 11
set day of startDate to 11
set hours of startDate to 13
set minutes of startDate to 30
set seconds of startDate to 0
-- Create end date (add duration)
set endDate to startDate + (1 * hours)
-- Create the event
set newEvent to make new event at end of events of targetCalendar with properties {
summary:"Event Title",
start date:startDate,
end date:endDate,
location:"Event Location",
description:"Event description or notes"
}
return "Event created successfully"
end tell
Event with Alert/Reminder:
tell application "Calendar"
set targetCalendar to calendar "calendar-name"
set startDate to current date
-- ... set date properties ...
set newEvent to make new event at end of events of targetCalendar with properties {
summary:"Event Title",
start date:startDate,
end date:endDate
}
-- Add alert (minutes before event)
tell newEvent
make new display alarm at end of display alarms with properties {
trigger interval:-15 -- 15 minutes before
}
end tell
return "Event created with alert"
end tell
All-Day Event:
tell application "Calendar"
set targetCalendar to calendar "calendar-name"
set eventDate to current date
set year of eventDate to 2025
set month of eventDate to 11
set day of eventDate to 15
set time of eventDate to 0
set newEvent to make new event at end of events of targetCalendar with properties {
summary:"All Day Event",
start date:eventDate,
allday event:true
}
return "All-day event created"
end tell
Recurring Event:
tell application "Calendar"
set targetCalendar to calendar "calendar-name"
set startDate to current date
-- ... set date properties ...
set newEvent to make new event at end of events of targetCalendar with properties {
summary:"Weekly Meeting",
start date:startDate,
end date:endDate,
recurrence:"FREQ=WEEKLY;COUNT=10" -- Every week for 10 occurrences
}
return "Recurring event created"
end tell
Common Recurrence Patterns:
"FREQ=DAILY""FREQ=WEEKLY""FREQ=WEEKLY;INTERVAL=2""FREQ=MONTHLY""FREQ=YEARLY""FREQ=WEEKLY;UNTIL=20251231T235959Z""FREQ=DAILY;COUNT=30"Finding and Updating an Event:
tell application "Calendar"
set targetCalendar to calendar "calendar-name"
-- Find event by summary
set foundEvents to (every event of targetCalendar whose summary is "Event Title")
if (count of foundEvents) > 0 then
set theEvent to item 1 of foundEvents
-- Update properties
tell theEvent
set location to "New Location"
set description to "Updated description"
end tell
return "Event updated"
else
return "Event not found"
end if
end tell
Deleting an Event:
tell application "Calendar"
set targetCalendar to calendar "calendar-name"
set foundEvents to (every event of targetCalendar whose summary is "Event Title")
if (count of foundEvents) > 0 then
delete item 1 of foundEvents
return "Event deleted"
else
return "Event not found"
end if
end tell
The user has these calendars configured (use icalBuddy or AppleScript to get current list):
To list all calendars:
# Using icalBuddy
icalBuddy calendars
# Using AppleScript
osascript -e 'tell application "Calendar" to get name of calendars'
today, today+1, today+7)icalBuddy -ec "Holidays in United States,US Holidays,Holidays" -f eventsToday
icalBuddy -ic "stbenjam@redhat.com" -f eventsFrom:today to:today+7
Use AppleScript with user-provided details:
icalBuddy -ic "stephen@bitbin.de" -f eventsFrom:today to:today+30 | grep -i "workout\|gym\|orangetheory"
brew install ical-buddyUser: "What's on my calendar tomorrow?"
icalBuddy -ec "Holidays" -f eventsToday+1
User: "Add a haircut appointment on Nov 15 at 2pm"
osascript <<'EOF'
tell application "Calendar"
set targetCalendar to calendar "Home"
set startDate to current date
set year of startDate to 2025
set month of startDate to 11
set day of startDate to 15
set hours of startDate to 14
set minutes of startDate to 0
set seconds of startDate to 0
set endDate to startDate + (1 * hours)
make new event at end of events of targetCalendar with properties {
summary:"Haircut",
start date:startDate,
end date:endDate
}
return "Haircut appointment created"
end tell
EOF
User: "Show me my work schedule for next week"
icalBuddy -ic "stbenjam@redhat.com" -f eventsFrom:today+7 to:today+14