Install any skill in seconds. Free to start, no credit card required.
Get Started Free →This skill should be used when the user requests Mac automation via AppleScript, including: Mail operations, Reminders/Calendar management, Safari control, Finder operations, system controls (volume, brightness, notifications, app launching), third-party apps (development tools, task management, media players), or mentions "AppleScript" or "automate Mac".
.claude/skills/aiskillstore-mac-automation/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | 73% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 194% | 0% |
| case-15 | ✗→✓ | ▲ Improved | -22% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 105% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 302% | 0% |
This skill enables control of macOS applications and system functions through AppleScript execution via the osascript command.
Execute AppleScript commands using the Bash tool with osascript:
bashosascript -e 'AppleScript code here'
For multi-line scripts:
bashosascript <<'EOF' tell application "App Name" -- commands here end tell EOF
Many third-party apps support AppleScript. Common categories include development tools (iTerm2, VS Code), task management (OmniFocus, Things), media players (Spotify), browsers (Chrome), and communication tools. To check if an app supports AppleScript, open Script Editor to browse its dictionary, or try basic commands like tell application "AppName" to get name.
Common errors and solutions:
"Application not found" → Check app name spelling"Not authorized" → Guide user to System Preferences > Privacy & Security"Can't get..." → Resource doesn't exist, handle gracefully\" for quotes in stringsbashosascript -e 'display notification "消息内容" with title "标题"'
bashosascript -e 'tell application "AppName" to activate'
bash# Get volume osascript -e 'output volume of (get volume settings)' # Set volume (0-100) osascript -e 'set volume output volume 50' # Mute osascript -e 'set volume output muted true'
bash# Get clipboard osascript -e 'the clipboard' # Set clipboard osascript -e 'set the clipboard to "text"'
For detailed AppleScript patterns by application, consult:
references/mail-applescript.md - Email operations: send, read, search, draftsreferences/reminders-applescript.md - Reminder operations: create, list, completereferences/calendar-applescript.md - Calendar operations: events, calendarsreferences/safari-applescript.md - Safari operations: URLs, tabs, JavaScriptreferences/finder-applescript.md - Finder operations: files, foldersreferences/system-applescript.md - System controls: volume, apps, clipboardWorking examples in examples/:
daily-briefing.applescript - Get today's calendar and unread emailsquick-note.applescript - Create reminder from clipboardScripts in scripts/:
run-applescript.sh - Wrapper for safe AppleScript execution| User Request | Action | |-------------|--------| | "发送邮件给xxx" | Use Mail to create and send | | "提醒我明天..." | Create Reminder with due date | | "添加日历事件" | Create Calendar event | | "打开xxx网站" | Safari open URL | | "调低音量" | Set volume lower | | "显示通知" | Display notification | | "打开文件夹" | Finder reveal |
If AppleScript fails:
For permission issues, guide user to: System Preferences > Privacy & Security > Automation
When an AppleScript execution fails or produces unexpected results, follow this protocol to improve the skill's reference documentation:
references/ directoryWhen you identify a fixable issue in the reference documentation:
For incorrect examples:
For missing edge cases:
For common pitfalls:
Use the Edit tool to modify reference files:
Edit tool on: references/{app}-applescript.md
- Fix incorrect code examples
- Add warning notes for known issues
- Include error messages and solutionsWhen updating reference files, maintain:
After significant improvements:
This protocol ensures the skill continuously improves based on real-world usage and errors encountered.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 6,403 | 11,502 | +80% | 1 | 1 | 0% | 1,087 | 2,520 | +132% | 0 | 0 | — |
case-02 | fail→fail | 13,262 | 7,252 | -45% | 1 | 1 | 0% | 1,325 | 1,964 | +48% | 0 | 0 | — |
case-03 | pass→fail | 2,688 | 3,825 | +42% | 1 | 1 | 0% | 416 | 1,820 | +338% | 0 | 0 | — |
case-04 | fail→fail | 3,898 | 4,443 | +14% | 1 | 1 | 0% | 541 | 1,883 | +248% | 0 | 0 | — |
case-05 | fail→fail | 3,541 | 4,446 | +26% | 1 | 1 | 0% | 428 | 1,810 | +323% | 0 | 0 | — |
case-06 | fail→fail | 3,277 | 4,737 | +45% | 1 | 1 | 0% | 447 | 1,907 | +327% | 0 | 0 | — |
case-07 | pass→fail | 4,458 | 4,341 | -3% | 1 | 1 | 0% | 708 | 1,861 | +163% | 0 | 0 | — |
case-08 | fail→pass | 6,720 | 4,866 | -28% | 1 | 1 | 0% | 1,099 | 1,904 | +73% | 0 | 0 | — |
case-09 | fail→pass | 4,126 | 1,728 | -58% | 1 | 1 | 0% | 655 | 1,923 | +194% | 0 | 0 | — |
case-10 | fail→fail | 3,588 | 6,186 | +72% | 1 | 1 | 0% | 556 | 2,088 | +276% | 0 | 0 | — |
case-11 | pass→fail | 5,836 | 6,678 | +14% | 1 | 1 | 0% | 898 | 1,997 | +122% | 0 | 0 | — |
case-12 | pass→pass | 9,833 | 4,927 | -50% | 1 | 1 | 0% | 1,635 | 2,262 | +38% | 0 | 0 | — |
case-13 | pass→pass | 7,105 | 4,364 | -39% | 1 | 1 | 0% | 1,248 | 2,461 | +97% | 0 | 0 | — |
case-14 | pass→pass | 7,056 | 5,222 | -26% | 1 | 1 | 0% | 1,134 | 2,430 | +114% | 0 | 0 | — |
case-15 | fail→pass | 15,604 | 1,784 | -89% | 1 | 1 | 0% | 2,570 | 2,001 | -22% | 0 | 0 | — |
case-16 | fail→pass | 7,155 | 3,694 | -48% | 1 | 1 | 0% | 1,097 | 2,248 | +105% | 0 | 0 | — |
case-17 | pass→pass | 15,652 | 8,196 | -48% | 1 | 1 | 0% | 2,296 | 2,860 | +25% | 0 | 0 | — |
case-18 | fail→pass | 3,276 | 1,827 | -44% | 1 | 1 | 0% | 478 | 1,923 | +302% | 0 | 0 | — |
case-19 | fail→pass | 8,710 | 2,142 | -75% | 1 | 1 | 0% | 1,243 | 2,024 | +63% | 0 | 0 | — |
case-20 | pass→fail | 4,608 | 7,371 | +60% | 1 | 1 | 0% | 808 | 2,081 | +158% | 0 | 0 | — |
case-21 | pass→fail | 3,361 | 3,934 | +17% | 1 | 1 | 0% | 536 | 2,118 | +295% | 0 | 0 | — |
case-22 | pass→pass | 6,023 | 4,203 | -30% | 1 | 1 | 0% | 936 | 2,440 | +161% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 13 counted toward the lift figure. The other 9 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +5 percentage points is the difference between those two pass rates over the 13 comparable cases. 6 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.