skills/7sageer/mac-automation/SKILL.md
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".
npx skillsauth add aiskillstore/marketplace mac-automationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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:
osascript -e 'AppleScript code here'
For multi-line scripts:
osascript <<'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.
Permission Prompts: First-time use of certain apps triggers macOS permission dialogs. Inform user if automation fails due to permissions.
Sensitive Operations: For destructive operations (delete, shutdown), confirm with user before executing.
Privacy-Sensitive Data: When reading emails or calendar events, only display what user explicitly requests.
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 stringsosascript -e 'display notification "消息内容" with title "标题"'
osascript -e 'tell application "AppName" to activate'
# 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'
# 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 solutions
When updating reference files, maintain:
After significant improvements:
This protocol ensures the skill continuously improves based on real-world usage and errors encountered.
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.