macOS AppleScript Fallback (Reminders / Notes / Calendar / iMessage)
by @qy-zhang
Reliable macOS AppleScript fallback for creating Apple Reminders, Apple Notes, Apple Calendar events, and sending iMessage when direct tool/plugin routes are...
clawhub install macos-applescript-fallback📖 About This Skill
name: macos-applescript-fallback description: Reliable macOS AppleScript fallback for creating Apple Reminders, Apple Notes, Apple Calendar events, and sending iMessage when direct tool/plugin routes are unavailable or flaky (especially on older macOS versions). Use when users ask to create reminders/notes/calendar events or send a message to their own phone via Messages, and prioritize shell+osascript execution with robust compatibility fallbacks and permission troubleshooting.
macOS AppleScript Fallback
Use local shell + AppleScript for 4 tasks: 1. Create reminder (Reminders) 2. Create note (Notes) 3. Create calendar event (Calendar) 4. Send iMessage (Messages)
Prefer bundled scripts in scripts/ over ad-hoc inline AppleScript for consistency and compatibility.
Quick Start
Run these scripts directly:
# reminder
./scripts/create_reminder.sh "今晚8点吃晚饭" "2026-03-22 20:00:00"note (HTML body required)
./scripts/create_note.sh "武汉三日游
Day1 黄鹤楼...
" "iCloud"calendar
./scripts/create_calendar_event.sh "跑步" "个人" "2026-03-23 08:00:00" "2026-03-23 08:30:00"iMessage
./scripts/send_imessage.sh "zhangqianyi1995@icloud.com" "武汉下周末天气:..."
Workflow
Step 1: Clarify user intent + required fields
If missing required fields, ask one concise follow-up question.
Step 2: Execute script (not plugin)
Always call the corresponding script in scripts/.
Why:
Step 3: Confirm result to user
sent, report success.Step 4: On failure, diagnose quickly
Use checks from references/troubleshooting.md.
Most frequent root causes:
Compatibility Rules (important)
1. Avoid locale-fragile date strings where possible.
2. Messages: resolve service by service type = iMessage, not by hard-coded service name.
3. Calendar: if named calendar doesn’t exist, fallback to first calendar.
4. Notes: if account iCloud is missing, fallback to default account.
5. Notes body uses HTML (, ) for stable rendering.
Output style to user
Keep concise and concrete:
Bundled Resources
scripts/
create_reminder.sh ["YYYY-MM-DD HH:MM:SS"]
create_note.sh [account-name]
create_calendar_event.sh
send_imessage.sh references/
troubleshooting.md💡 Examples
Run these scripts directly:
# reminder
./scripts/create_reminder.sh "今晚8点吃晚饭" "2026-03-22 20:00:00"note (HTML body required)
./scripts/create_note.sh "武汉三日游
Day1 黄鹤楼...
" "iCloud"calendar
./scripts/create_calendar_event.sh "跑步" "个人" "2026-03-23 08:00:00" "2026-03-23 08:30:00"iMessage
./scripts/send_imessage.sh "zhangqianyi1995@icloud.com" "武汉下周末天气:..."