LaunchKit · 2026
Back to Skills

macos-native-automation

Hardware-level mouse, keyboard & dialog automation on macOS via CGEvent + AppleScript.

0
0 downloads
by @theagentwire

Setup & Installation

openclaw skills install @theagentwire/macos-native-automation

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install macos-native-automation

What This Skill Does

CGEvent injects hardware-level HID mouse events directly into the macOS event stream, bypassing all application-layer filtering. Works where CDP .click(), JavaScript .click(), and AppleScript fail: file upload dialogs, React dropzones, native macOS prompts. Zero dependencies, Python 3 stdlib only.

CGEvent operates at the HID layer below all application logic, so no app can filter or ignore its events the way they can with CDP, JavaScript click methods, or AppleScript.

When to use it

  • Uploading files through React dropzones that ignore CDP automation
  • Clicking native macOS dialog buttons invisible to browser automation
  • Automating Electron apps when accessibility APIs return nothing
  • Navigating multi-step UI flows across any macOS application
  • Triggering and completing file picker dialogs in security-blocked web apps

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: upload /Users/me/image.png to a web app with a React dropzone

AGENT
  1. 1Take a screenshot to identify the upload area coordinates
  2. 2Run macos_click.py click 750 400 to open the native file dialog via CGEvent
  3. 3Use AppleScript to open Go to Folder (Cmd+Shift+G) and paste the full file path
  4. 4Confirm navigation and press return to complete the upload
OUTPUT

File uploaded successfully through the native file dialog

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

Accessibility permission granted to terminal app in System Settings > Privacy & Security > Accessibility