
Macos Automation
- 278 installs
- 6 repo stars
- Updated March 13, 2026
- alphaonedev/openclaw-graph
macos-automation is an agent skill that automates repetitive macOS tasks with AppleScript, JXA, Shortcuts, Automator, osascript, and the accessibility API for developers maintaining local environments and QA setups.
About
macos-automation is an agent skill in alphaonedev/openclaw-graph that automates tasks on macOS using AppleScript, JXA (JavaScript for Automation), Shortcuts, Automator, osascript, System Events, and the accessibility API. Key capabilities include executing AppleScript via osascript for Finder or Safari control, running JXA against macOS APIs, invoking Shortcuts programmatically, converting Automator workflows to scripts, and simulating keyboard or mouse input through System Events when apps lack CLI interfaces. The skill sits in the macos cluster within openclaw-graph's graph-native skill workspace and notes macOS permission requirements for accessibility and full disk access. Developers reach for macos-automation when automating repetitive file operations, controlling GUI-only macOS apps, wiring Shortcuts into dev or QA scripts, or maintaining local macOS dev environments without writing one-off shell hacks from scratch.
- AppleScript and shell-friendly patterns
- Cuts manual Mac busywork
- Supports dev and QA environment setup
- Agent-driven local workflow glue
- Improves daily operator productivity
Macos Automation by the numbers
- 278 all-time installs (skills.sh)
- Ranked #504 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/alphaonedev/openclaw-graph --skill macos-automationAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 278 |
|---|---|
| repo stars | ★ 6 |
| Last updated | March 13, 2026 |
| Repository | alphaonedev/openclaw-graph ↗ |
How do you automate macOS tasks with AppleScript?
Automate repetitive macOS tasks—file ops, app control, shortcuts, and shell glue—for personal productivity, QA setups, or local dev environment maintenance.
Who is it for?
Developers on macOS automating file ops, app control, Shortcuts, or accessibility-driven UI tasks for local dev and QA workflows.
Skip if: Teams on Linux or Windows hosts, or production server deployments that do not run macOS desktop automation.
When should I use this skill?
User asks to automate macOS file operations, control apps without CLI, run AppleScript/JXA/Shortcuts, or simulate UI interactions locally.
What you get
AppleScript or JXA scripts, Shortcuts invocations, Automator workflow runs, and UI automation commands via System Events.
- AppleScript or JXA automation scripts
- Shortcuts or Automator workflow invocations
- Shell commands wiring macOS automation glue
By the numbers
- Covers 6 automation surfaces: AppleScript, JXA, Shortcuts, Automator, osascript, and accessibility API
Files
macos-automation
Purpose
This skill automates tasks on macOS using tools like AppleScript, JXA, Shortcuts, Automator, osascript, System Events, and the accessibility API, enabling script-based control of apps and system functions.
When to Use
- Automate repetitive workflows, such as file management or app interactions.
- Integrate with macOS apps for custom behaviors, like triggering actions via keyboard shortcuts.
- Script complex sequences involving multiple apps, e.g., when Shortcuts alone isn't sufficient.
- Handle accessibility tasks, like UI element manipulation, when apps don't expose direct APIs.
- Use for rapid prototyping of automations in environments like shell scripts or IDEs.
Key Capabilities
- Execute AppleScript via osascript for app control, e.g., manipulating Finder or Safari.
- Run JXA (JavaScript for Automation) to interact with macOS APIs, supporting modern JavaScript syntax.
- Create and invoke Shortcuts programmatically for quick actions, like sharing files.
- Use Automator workflows as scripts, convertible to applications or services.
- Leverage System Events for UI automation, including keyboard/mouse simulation via accessibility API.
- Access macOS-specific APIs like NSAppleScript for embedding in Objective-C/Swift code.
Usage Patterns
- Run scripts from the command line using osascript; for example, pipe AppleScript code directly.
- Embed JXA in Node.js environments by loading the JXA module and executing via
Application('Finder').activate(). - Chain Shortcuts with other tools by exporting as URLs and invoking via
opencommand. - Use Automator to build workflows, then save as .applescript files for osascript execution.
- For accessibility, ensure "Accessibility" is enabled in System Preferences > Security & Privacy, then use System Events to target UI elements like
tell application "System Events" to click button "OK" of window "Main". - Always check for required permissions, such as Full Disk Access, before running scripts that access files.
Common Commands/API
- osascript CLI: Use
osascript -e 'tell application "Finder" to make new folder at desktop'to create a folder; handle errors by checking the exit code. - JXA Example: In a JavaScript file, use
const app = Application('Safari'); app.activate(); app.documents[0].url = 'https://example.com';to open and navigate a URL. - Shortcuts Integration: Run a shortcut via
shortcuts run "My Shortcut" -i '{"input": "text"}'; pass inputs as JSON for parameterized execution. - Automator API: Convert workflows to AppleScript with
tell application "Automator" to run workflow "path/to/workflow". - System Events API: For UI automation, use
osascript -e 'tell application "System Events" to keystroke "a" using {command down}'to simulate Command+A. - Config Formats: Store scripts in plain text files (.applescript) and invoke with
osascript path/to/script.applescript; for JXA, use ES6 modules in .js files.
Integration Notes
- Integrate with other tools by wrapping osascript calls in shell scripts; e.g., use
$ export APPLESCRIPT_PATH='/path/to/script'and run viaosascript $APPLESCRIPT_PATH. - For JXA, require the OSA module in Node.js:
npm install osaand useconst OSA = require('osa'); OSA.runAppleScript('...'). - If accessibility features are needed, set the env var
$ACCESSIBILITY_ENABLED=1after granting permissions in System Preferences. - Auth/keys: For scripts accessing protected resources, use env vars like
$osascript_API_KEY(though rare); more commonly, handle macOS permissions viatccutilCLI, e.g.,tccutil reset AppleEvents com.example.appto reset access. - Embed in larger apps by compiling AppleScript into bundles or using JXA in Electron apps for cross-tool integration.
Error Handling
- Check osascript exit codes: If a script fails, capture with
osascript -e 'script' 2>&1and parse stderr for messages like "Execution error: ...". - In JXA, wrap code in try-catch:
try { Application('Finder').activate(); } catch (e) { console.error(e.message); }to handle app not found errors. - For Shortcuts, verify with
shortcuts run "Name" --wait-for-resultand check output for failures. - Use Automator's built-in logging by enabling in workflow settings, then review logs via Console app.
- General pattern: Always run scripts with elevated privileges if needed, e.g., via
sudo osascript -e '...', and handle permission errors by prompting users to adjust settings.
Concrete Usage Examples
1. Automate App Launch and Action: Use osascript to open Safari and load a page: osascript -e 'tell application "Safari" to open location "https://example.com"' followed by 'tell application "Safari" to activate'. This is useful for daily workflows; extend by adding error checks. 2. UI Automation with Shortcuts: Create a Shortcut to resize windows, then invoke via CLI: shortcuts run "Resize Window" -i '{"app": "Finder", "width": 800}'. Combine with JXA for dynamic inputs, e.g., in a script: Application('Shortcuts').run('Resize Window', {input: JSON.stringify({app: 'Finder'})}).
Graph Relationships
- Related to: macos cluster (direct parent), applescript skill (sub-skill for scripting), shortcuts skill (integrated tool), automation cluster (broader category).
- Dependencies: Requires macos-os (base system), interacts with accessibility-api skill for UI tasks.
Related skills
How it compares
Pick macos-automation over generic shell scripting when tasks require controlling macOS GUI apps, Shortcuts, or accessibility-driven UI simulation.
FAQ
Which macOS automation tools does macos-automation cover?
macos-automation covers AppleScript, JXA, Shortcuts, Automator, osascript, System Events, and the accessibility API. Agents use these to control apps, run workflows, and simulate UI interactions on macOS.
What permissions does macos-automation require on macOS?
macos-automation notes that UI automation through System Events and file operations may require macOS accessibility and full disk access permissions, which appear as system prompts when scripts control apps or protected directories.