macpilot-automation

Core macOS automation skill using MacPilot CLI. Enables Claude Code to control apps, type text, click elements, run shell commands, and automate workflows on macOS via the `macpilot` command.

3,807 stars

Best use case

macpilot-automation is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Core macOS automation skill using MacPilot CLI. Enables Claude Code to control apps, type text, click elements, run shell commands, and automate workflows on macOS via the `macpilot` command.

Teams using macpilot-automation should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/macpilot-automation/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/adhikjoshi/macpilot/skills/macpilot-automation/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/macpilot-automation/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How macpilot-automation Compares

Feature / Agentmacpilot-automationStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Core macOS automation skill using MacPilot CLI. Enables Claude Code to control apps, type text, click elements, run shell commands, and automate workflows on macOS via the `macpilot` command.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# MacPilot Automation

Use the `macpilot` CLI tool to automate macOS. MacPilot provides 100+ commands for mouse, keyboard, app, window, UI, clipboard, dialog, shell, and system control. All commands support `--json` for structured output.

## When to Use

Use this skill when the user asks to:
- Automate macOS tasks (open apps, click buttons, type text, navigate menus)
- Control mouse and keyboard programmatically
- Interact with running applications via accessibility APIs
- Chain multiple automation steps into workflows
- Run shell commands or interact with Terminal
- Manage clipboard, notifications, audio, display settings

## Prerequisites

MacPilot must be installed at `/Applications/MacPilot.app` with a symlink at `/usr/local/bin/macpilot` or `~/bin/macpilot`. The app requires Accessibility permission in System Settings > Privacy & Security > Accessibility.

## Core Commands Reference

### Mouse Control
```bash
macpilot click <x> <y>              # Left click at coordinates
macpilot doubleclick <x> <y>        # Double click
macpilot rightclick <x> <y>         # Right click
macpilot move <x> <y>               # Move cursor
macpilot drag <x1> <y1> <x2> <y2>  # Drag from point to point
macpilot scroll <up|down|left|right> [amount]  # Scroll (default: 3)
macpilot mouse-position --json      # Get current cursor position
```

### Keyboard Control
```bash
macpilot keyboard type "Hello World"           # Type text
macpilot keyboard key cmd+c                    # Press shortcut
macpilot keyboard key enter                    # Press single key
macpilot chain "type:hello" "key:tab" "type:world"  # Chain actions
```
Modifier keys: `cmd`, `shift`, `alt`, `ctrl`, `fn`
Special keys: `enter`, `tab`, `space`, `escape`, `delete`, `f1`-`f12`, `up`, `down`, `left`, `right`

### App Management
```bash
macpilot app open "Safari"          # Open/launch app
macpilot app focus "Safari"         # Bring app to front
macpilot app frontmost --json       # Get frontmost app
macpilot app list --json            # List running apps
macpilot app quit "Safari"          # Quit app
macpilot app quit "Safari" --force  # Force quit
macpilot app hide "Safari"          # Hide app
```

### Menu Interaction
```bash
macpilot menu click File Open --app Safari      # Click menu item
macpilot menu list --app Safari --json           # List all menus
macpilot menu list --app Safari --menu File      # List specific menu
```

### Clipboard
```bash
macpilot clipboard get --json              # Read clipboard text
macpilot clipboard set "text"              # Set clipboard text
macpilot clipboard image photo.png         # Copy image to clipboard
macpilot clipboard info --json             # Content type, size, preview
macpilot clipboard types --json            # List all UTI types
macpilot clipboard clear --json            # Clear clipboard
macpilot clipboard paste --json            # Simulate Cmd+V
macpilot clipboard copy file.txt --json    # Copy file(s) to clipboard
macpilot clipboard save /tmp/out.png       # Save clipboard content to file

# Clipboard history (background daemon, max 50 items)
macpilot clipboard history start --json    # Start tracking
macpilot clipboard history stop --json     # Stop tracking
macpilot clipboard history list --json     # Show history
macpilot clipboard history search "text"   # Search history
macpilot clipboard history clear --json    # Delete history
```

### Shell Commands
```bash
macpilot shell run "ls -la"                # Run command, get output
macpilot shell interactive "top"           # Open in Terminal
macpilot shell type "git status"           # Type into active terminal
macpilot shell paste "long command here"   # Paste via clipboard
```

### System Controls
```bash
macpilot audio volume get --json           # Get volume (0-100)
macpilot audio volume set 50               # Set volume
macpilot audio volume mute                 # Mute
macpilot display brightness set 75         # Set brightness
macpilot appearance dark                   # Dark mode
macpilot appearance light                  # Light mode
macpilot notification send "Title" "Body"  # System notification
macpilot notification list --json          # List visible notifications
macpilot notification click --title "match" # Click notification by title
macpilot notification dismiss --json       # Dismiss top notification
macpilot notification dismiss --all        # Dismiss all notifications
macpilot system info --json                # System info
macpilot network wifi-name --json          # Wi-Fi name
macpilot network ip --json                 # IP address
```

### Waiting & Synchronization
```bash
macpilot wait seconds 2                          # Sleep 2 seconds
macpilot wait element "Save" --app TextEdit       # Wait for UI element
macpilot wait window "Untitled" --timeout 10      # Wait for window
macpilot watch events --duration 5 --json         # Monitor events
```

### Spaces & Dock
```bash
macpilot space list --json                  # List spaces
macpilot space switch right                 # Switch space
macpilot dock hide                          # Auto-hide dock
macpilot dock show                          # Always show dock
```

## Critical Patterns

1. **Always focus the app before interacting**: `macpilot app focus "AppName"` must come before clicking, typing, or menu operations. The first click after focus may be consumed by window activation - click the app's content area first, then click the target.

2. **Use `--json` for parsing**: Always add `--json` when you need to parse output programmatically.

3. **Use `ui find-text` for coordinates**: When you need to click a specific element, first find its coordinates with `macpilot ui find-text "label" --app AppName --json`, then click at the returned position.

4. **Chain for complex sequences**: Use `macpilot chain` for multi-step keyboard workflows instead of multiple separate commands.

5. **AX value set over keyboard**: Setting text field values via `macpilot ui set-value` is more reliable than keyboard typing when focus is uncertain.

6. **Wait for elements**: Use `macpilot wait element` before interacting with UI elements that may not have appeared yet.

## Example Workflows

### Open a URL in Safari
```bash
macpilot app open Safari
macpilot wait window Safari --timeout 5
macpilot app focus Safari
macpilot keyboard key cmd+l
macpilot keyboard type "https://example.com"
macpilot keyboard key enter
```

### Copy text from one app to another
```bash
macpilot app focus "TextEdit"
macpilot keyboard key cmd+a
macpilot keyboard key cmd+c
macpilot app focus "Notes"
macpilot keyboard key cmd+v
```

### Create a new file in TextEdit
```bash
macpilot app open TextEdit
macpilot wait window TextEdit --timeout 5
macpilot keyboard type "Hello from MacPilot!"
macpilot keyboard key cmd+s
macpilot wait seconds 1
macpilot dialog navigate "/Users/me/Desktop"
macpilot dialog set-field "myfile.txt"
macpilot dialog click-button "Save"
```

Related Skills

n8n Workflow Mastery — Complete Automation Engineering System

3807
from openclaw/skills

You are an expert n8n workflow architect. You design, build, debug, optimize, and scale n8n automations following production-grade methodology. Every workflow you create is complete, functional, and follows the patterns in this guide.

Workflow & Productivity

Insurance Operations Automation

3807
from openclaw/skills

Comprehensive insurance operations framework for AI agents. Covers the full insurance lifecycle — underwriting, claims, policy management, renewals, compliance, and broker operations.

Workflow & Productivity

afrexai-business-automation

3807
from openclaw/skills

Turn your AI agent into a business automation architect. Design, document, implement, and monitor automated workflows across sales, ops, finance, HR, and support — no n8n or Zapier required.

Workflow & Productivity

Business Automation Strategy — AfrexAI

3807
from openclaw/skills

> The complete methodology for identifying, designing, building, and scaling business automations. Platform-agnostic — works with n8n, Zapier, Make, Power Automate, custom code, or any combination.

AI Automation Agency Blueprint

3807
from openclaw/skills

You are an AI Automation Agency strategist. Help the user build, price, sell, and scale an AI agent services business — from solo consultant to 7-figure agency. Every recommendation must be specific, actionable, and backed by real economics.

Business Strategy & Growth

Accounts Payable Automation Framework

3807
from openclaw/skills

You are an AP process optimizer. When the user describes their payable workflows, vendor relationships, or payment processes, generate a complete accounts payable management framework.

Workflow & Productivity

n8n-workflow-automation

3807
from openclaw/skills

Designs and outputs n8n workflow JSON with robust triggers, idempotency, error handling, logging, retries, and human-in-the-loop review queues. Use when you need an auditable automation that won’t silently fail.

Workflow & Productivity

google-workspace-automation

3807
from openclaw/skills

Design Gmail, Drive, Sheets, and Calendar automations with scope-aware plans. Use for repeatable daily task automation with explicit OAuth scopes and audit-ready outputs.

Workflow & Productivity

docs-pipeline-automation

3807
from openclaw/skills

Build repeatable data-to-Docs pipelines from Sheets and Drive sources. Use for automated status reports, template-based document assembly, and scheduled publishing workflows.

Workflow & Productivity

agentic-workflow-automation

3807
from openclaw/skills

Generate reusable multi-step agent workflow blueprints. Use for trigger/action orchestration, deterministic workflow definitions, and automation handoff artifacts.

Workflow & Productivity

multi-skill-automation-suite

3807
from openclaw/skills

Comprehensive automation suite combining multiple OpenClaw skills for security, development, content processing, and utilities. Includes healthcheck, git essentials, summarization, weather, and more in one integrated package.

n8n-automation

3807
from openclaw/skills

Trigger n8n workflows using natural language. Automate lead nurturing, email sequences, CRM updates, social media posting, meeting follow-ups, competitor monitoring, and invoice reminders by simply describing what you want done. Built for automation agencies, content creators, and solo founders using n8n.