Extracts calendar event information from natural language text and generates AppleScript to create macOS Calendar events. Invoke when user wants to create calendar events from text descriptions on macOS.
This skill extracts structured calendar event information from natural language text and generates executable AppleScript code to create events in macOS Calendar app.
CRITICAL: This skill requires the current system date to accurately parse relative dates (like "明天", "下周一").
The execution environment MUST provide the current date in the context. Include this information when invoking the skill:
Current system date: 2026-03-13 (YYYY-MM-DD format)
Current system time: 14:30 (optional, for time reference)
Without the system date, the skill cannot accurately calculate relative dates.
| Field | Format | Description |
|---|---|---|
title | string | Event title (concise, 1-5 keywords) |
start_time | YYYY-MM-DD HH:MM:SS | Event start time (24-hour format) |
end_time | YYYY-MM-DD HH:MM:SS | Event end time (24-hour format) |
location | string or null | Event location (if mentioned) |
description | string or null | Event description |
CRITICAL: System Date Dependency
You MUST obtain the current system date from the execution environment before parsing any time information. DO NOT use your training data's knowledge of dates. All date calculations must be based on the actual system current date.
How to Get System Date:
date +%Y-%m-%d or equivalentDate Calculation Rules:
Always Base on System Current Date:
Relative Date Parsing (calculate from system current date):
Year Handling:
Month/Day Handling:
Default Start Times (when not specified):
Default Durations (when not specified):
Title must be extremely concise:
Examples:
After extracting the information, generate AppleScript code in this exact format:
tell application "Calendar"
tell calendar "Home"
make new event with properties {summary:"EVENT_TITLE", start date:date "START_TIME", end date:date "END_TIME", description:"DESCRIPTION", location:"LOCATION"}
end tell
end tell
Important Notes:
EVENT_TITLE, START_TIME, END_TIME, DESCRIPTION, and LOCATION with actual valuesYYYY-MM-DD HH:MM:SS (e.g., "2026-03-14 15:00:00")" with \"System Context Provided:
Current system date: 2026-03-13
User Input: "明天下午3点到5点和张三在会议室A开会讨论项目进度"
Calculation Process:
Extracted Information:
Generated AppleScript:
tell application "Calendar"
tell calendar "Home"
make new event with properties {summary:"项目进度会议", start date:date "2026-03-14 15:00:00", end date:date "2026-03-14 17:00:00", description:"与张三讨论项目进度", location:"会议室A"}
end tell
end tell
System Context Provided:
Current system date: 2026-03-13
User Input: "1月15号下午2点开会"
Calculation Process:
Extracted Information:
Generated AppleScript:
tell application "Calendar"
tell calendar "Home"
make new event with properties {summary:"会议", start date:date "2027-01-15 14:00:00", end date:date "2027-01-15 15:00:00"}
end tell
end tell
Provide the generated AppleScript code to the user or system. The code can be executed on macOS using:
osascript -e 'APPLESCRIPT_CODE' (command line)