macos-automation

$npx mdskill add vellum-ai/vellum-assistant/macos-automation

Automate macOS apps and system interactions using AppleScript via osascript

  • Solve tasks involving native macOS apps like Messages, Finder, and Calendar
  • Relies on osascript and AppleScript for system-level automation
  • Chooses actions based on app-specific scripting capabilities and user intent
  • Executes scripts through host_bash and returns results or status to the agent

SKILL.md

.github/skills/macos-automationView on GitHub ↗
---
name: macos-automation
description: Automate native macOS apps and system interactions via osascript (AppleScript)
compatibility: "Designed for Vellum personal assistants"
metadata:
  icon: assets/icon.svg
  emoji: "🍎"
  vellum:
    category: "system"
    display-name: "macOS Automation"
    activation-hints:
      - "Interacting with native macOS apps (Messages, Contacts, Calendar, Mail, Reminders, Music, Finder, etc.) via osascript"
    avoid-when:
      - "Tasks that can be done entirely in the sandbox or via CLI tools"
---

Use this skill to interact with native macOS apps and system-level features via `osascript` (AppleScript) through `host_bash`. Always prefer osascript over browser automation or computer-use for anything involving a native macOS app.

## Supported Apps

**Communication:** Messages, Mail, Microsoft Outlook, FaceTime
**Contacts & Calendar:** Contacts, Calendar, Reminders
**Notes & Writing:** Notes, TextEdit, Pages, BBEdit, CotEditor
**Files:** Finder, Path Finder
**Browsers:** Safari, Google Chrome
**Music & Media:** Music (iTunes), Spotify, VLC, Podcasts, TV
**Productivity:** OmniFocus, Things 3, OmniOutliner, OmniPlan, OmniGraffle
**Office:** Microsoft Word, Microsoft Excel, Numbers, Keynote
**Developer tools:** Xcode, Terminal, iTerm2, Script Editor
**System:** System Events (UI scripting for any app), System Settings
**Automation:** Keyboard Maestro, Alfred, Automator
**Creative:** Adobe Photoshop, Final Cut Pro

For any unlisted app, check scriptability first:

```bash
osascript -e 'tell application "AppName" to get name'
```

## Examples

```bash
# Send an iMessage
osascript -e 'tell application "Messages" to send "Hello!" to buddy "user@example.com"'

# Look up a contact
osascript -e 'tell application "Contacts" to get {name, phones} of every person whose name contains "Marina"'

# Read upcoming calendar events
osascript -e 'tell application "Calendar" to get summary of every event of calendar "Home" whose start date > (current date)'

# Create a reminder
osascript -e 'tell application "Reminders" to make new reminder with properties {name:"Buy milk", due date:((current date) + 1 * hours)}'

# Send an email
osascript -e 'tell application "Mail" to send (make new outgoing message with properties {subject:"Hi", content:"Hello", visible:true})'

# Create a note
osascript -e 'tell application "Notes" to make new note at folder "Notes" with properties {body:"My note"}'

# Open a URL in Safari
osascript -e 'tell application "Safari" to open location "https://example.com"'

# Play/pause Music
osascript -e 'tell application "Music" to playpause'

# Display a system notification
osascript -e 'display notification "Done!" with title "Vellum"'
```

## Tips

- For multi-line scripts, write them to a `.applescript` file and run with `osascript path/to/script.applescript`
- Use `System Events` for UI scripting apps that don't have their own AppleScript dictionary
- AppleScript permissions are gated by macOS TCC - if a command fails with a permission error, use `request_system_permission` to prompt the user

More from vellum-ai/vellum-assistant

SkillDescription
acpSpawn external coding agents via the Agent Client Protocol (ACP)
amazonShop on Amazon and Amazon Fresh through your browser
api-mappingRecord and analyze API surfaces of web services
app-builderBuild and edit small, personal visual tools and artifacts — dashboards, trackers, calculators, data visualizations, charts, simple landing pages, and slide decks the user wants for THEMSELVES. This is the right skill whenever the user asks to "visualize this," "make a chart," or "build an artifact" for their own use, or to edit an app they already built here. Do NOT reach for a ui_show dynamic_page to fake an artifact — build a real persistent app here. NOT for complex, multi-user, or shippable products — those go to a real project folder with a coding agent (see Scope below).
app-controlDrive a specific named macOS app via raw input bypassing the Accessibility tree
assistant-migrationMigrate from ChatGPT, Claude, OpenClaw, Hermes, Manus, and other AI assistants into Vellum by inspecting their data exports, conversation archives, files, prompts, custom instructions, memory, saved memories, tools, GPTs, workflows, integrations, and relationships, then mapping as much as safely possible into Vellum primitives. Handles single-source and multi-source migrations with a unified, deduplicated inventory.
chatgpt-importImport conversation history from ChatGPT into Vellum
cli-discoverDiscover which CLI tools are installed, their versions, and authentication status
computer-useControl the macOS desktop
contactsManage contacts, communication channels, access control, and invite links