/automating-mac-apps:automating-mac-appsfrom automating-mac-apps
Automates macOS apps via Apple Events using AppleScript, JXA, and PyXA. Foundation skill for app-specific automation (Calendar, Notes, Mail, etc.).
Ships in automating-mac-apps. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
JXA and AppleScript are legacy (last major updates: 2015-2016). Modern alternatives:
Test scripts on target macOS due to:
tell application "Finder" to get name of first item in desktoptry { ... } catch (e) { console.log('Error:', e.message); }try ... on error errMsg ... end tryosascript -e 'tell application "Finder" to get name of home'osascript for CLI or pipeline use.tell application "System Events" to click button 1 of window 1 of process "App"Application('System Events').processes.byName('App').windows[0].buttons[0].click()Application("App").running() returns trueskills/automating-mac-apps/scripts/request_automation_permissions.sh (or .py).skills/automating-<app>/scripts/set_up_<app>_automation.{sh,py} (calendar, notes, mail, keynote, excel, reminders).skills/automating-voice-memos/scripts/set_up_voice_memos_automation.sh to activate app + check data paths; enable Accessibility + consider Full Disk Access.PyXA (Python for macOS Automation) - Preferred for new projects:
app.lists().reminders().title()# Install PyXA
pip install mac-pyxa
# Or with pip3 explicitly
pip3 install mac-pyxa
# Requirements:
# - Python 3.10+ (check with: python3 --version)
# - macOS 12+ (Monterey or later recommended)
# - PyObjC is installed automatically as a dependency
# Verify installation
python3 -c "import PyXA; print(f'PyXA {PyXA.__version__} installed successfully')"
Note: All app-specific skills in this plugin that show PyXA examples assume PyXA is installed. See this section for installation.
import PyXA
# Launch Safari and navigate
safari = PyXA.Safari()
safari.activate()
safari.open_location("https://example.com")
# Get current tab URL
current_url = safari.current_tab.url
print(f"Current URL: {current_url}")
import PyXA
reminders = PyXA.Reminders()
work_list = reminders.lists().by_name("Work")
# Add new reminder
new_reminder = work_list.reminders().push({
"name": "Review PyXA documentation",
"body": "Explore modern macOS automation options"
})
PyXA Official Resources:
PyObjC (Python-Objective-C Bridge) - For Low-Level macOS Integration:
pip install pyobjc
# Installs bridges for major frameworks
from Foundation import NSAppleScript
# Execute AppleScript from Python
script_source = '''
tell application "Safari"
return URL of current tab
end tell
'''
script = NSAppleScript.alloc().initWithSource_(script_source)
result, error = script.executeAndReturnError_(None)
if error:
print(f"Error: {error}")
else:
print(f"Current Safari URL: {result.stringValue()}")
from ScriptingBridge import SBApplication
# Control Mail app
mail = SBApplication.applicationWithBundleIdentifier_("com.apple.Mail")
inbox = mail.inboxes()[0] # Access first inbox
# Get unread message count
unread_count = inbox.unreadCount()
print(f"Unread messages: {unread_count}")
PyObjC Official Resources:
JXA has no updates since 2016. Use PyXA for new projects when possible.
automating-[app] skills as needed)ci-cd-tcc for advanced permission management in automated environmentsmastering-applescript for AppleScript-focused workflowsPermission Management:
Official Apple Security Guidance:
JSON.stringify(result) in JXA.
console.log(JSON.stringify({files: files, count: files.length}))osascript exits with 0 for success, non-zero for failure.automating-mac-apps/references/basics.mdautomating-mac-apps/references/applescript-basics.mdautomating-mac-apps/references/recipes.mdautomating-mac-apps/references/cookbook.mdautomating-mac-apps/references/applescript-performance.mdautomating-mac-apps/references/ci-cd-tcc.mdautomating-mac-apps/references/shell-environment.mdautomating-mac-apps/references/ui-scripting-inspector.mdautomating-mac-apps/references/pyxa-core-api-reference.mdautomating-mac-apps/references/pyxa-basics.md (Modern Python automation fundamentals)automating-mac-apps/references/applescript-to-pyxa-conversion.md (Migration guide with examples)automating-mac-apps/references/translation-checklist.md (Comprehensive guide with examples and pitfalls)automating-mac-apps/references/helpers.jswhose Batching Patterns: automating-mac-apps/references/whos-batching.mdautomating-mac-apps/references/dictionary-strategies.mdautomating-mac-apps/references/applescript-asobjc.mdRelated Skills:
web-browser-automation: Complete browser automation guide (Chrome, Edge, Brave, Arc)references/applescript-asobjc.md (opens in a new tab)references/applescript-basics.md (opens in a new tab)references/applescript-guide.md (opens in a new tab)references/applescript-performance.md (opens in a new tab)references/applescript-timeouts.md (opens in a new tab)references/applescript-to-pyxa-conversion.md (opens in a new tab)references/basics.md (opens in a new tab)references/calendar-notes.md (opens in a new tab)references/chrome.md (opens in a new tab)references/ci-cd-tcc.md (opens in a new tab)references/cookbook.md (opens in a new tab)references/dictionary-strategies.md (opens in a new tab)references/finder.md (opens in a new tab)references/helpers.js (opens in a new tab)references/keynote.md (opens in a new tab)references/mail.md (opens in a new tab)references/meeting-automation-playbook.md (opens in a new tab)references/pages.md (opens in a new tab)references/pyxa-basics.md (opens in a new tab)references/pyxa-core-api-reference.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
macos-automation, applescript, jxa, pyxa, apple-events, osascript
Generated from the plugin's indexed repository (spillwavesolutions/automating-mac-apps-plugin) — no native marketplace selected
npx claudepluginhub p/spillwavesolutions-automating-mac-apps-plugins-automating-mac-apps-plugin16 skills in this plugin
/automating-calendarAutomates macOS Calendar via JXA with AppleScript dictionary discovery. Use when asked to "create calendar events", "automate calendar", "JXA calendar scripting", "EventKit automation", or "PyXA calendar automation". Covers events, calendars, recurrence, time zones, batch operations, and EventKit ObjC bridge./automating-chromeAutomates Google Chrome and Chromium-based browsers via JXA with AppleScript dictionary discovery. Use when asked to "automate Chrome tabs", "control browser with JXA", "Chrome AppleScript automation", "Chromium browser scripting", or "browser tab management". Covers windows, tabs, execute(), tunneling patterns, and permissions./automating-contactsAutomates macOS Contacts via JXA with AppleScript dictionary discovery. Use when asked to "automate contacts", "JXA contacts automation", "macOS address book scripting", "AppleScript contacts", or "Contacts app automation". Covers querying, CRUD, multi-value fields, groups, images, and ObjC bridge fallbacks./automating-excelAutomates Microsoft Excel on macOS via JXA with AppleScript dictionary discovery. Use when asked to "automate Excel spreadsheets", "JXA Excel scripting", "Excel macOS automation", or "bulk Excel data operations". Focuses on workbooks, worksheets, ranges, 2D arrays, performance toggles, and VBA escape hatches./automating-keynoteAutomates Apple Keynote using JXA with AppleScript dictionary discovery. Use when asked to "create Keynote presentations", "automate slide decks", "JXA Keynote scripting", or "generate presentations programmatically". Covers document lifecycle, slides, text, shapes, images, tables, charts, transitions, and UI scripting fallback./automating-mailAutomates Apple Mail via JXA with AppleScript dictionary discovery. Use when asked to "automate email", "send mail via script", "JXA Mail automation", or "filter email messages". Covers accounts, mailboxes, batch message filtering, composition, attachments, and UI fallback.Other plugins' skills for the same job