[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M770GWSW8SWZGV72YB2YJ2Q8":3,"skill-same:01M770GWSW8SWZGV72YB2YJ2Q8":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M770GWSW8SWZGV72YB2YJ2Q8","macos-native-automation",null,"Hardware-level mouse, keyboard & dialog automation on macOS via CGEvent + AppleScript. When CDP and JS .click() fail. Zero deps.","javimosch\u002Fopen-claw-skills","javimosch","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F12900508?v=4","01M6D3F2AS6PV75ET9PZ1QGP8J","Javier Leandro Arancibia","01M75B8NCTAJG9WH5YNZH7C3D8",0,"MIT","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftheagentwire\u002Fmacos-native-automation\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: macos-native-automation\ndescription: \"Hardware-level mouse, keyboard & dialog automation on macOS via CGEvent + AppleScript. When CDP and JS .click() fail. Zero deps.\"\nhomepage: https:\u002F\u002Ftheagentwire.ai\nmetadata: { \"openclaw\": { \"emoji\": \"🖱️\" } }\n---\n\n# When .click() Doesn't Click\n\nYour agent found the button. It called `.click()`. Nothing happened.\n\nReact dropzone? Ignored. File upload dialog? Security-blocked. Native macOS prompt? Invisible to CDP. You try AppleScript `click at`. Still nothing. You try `setFileInputFiles`. Works on some sites, silently fails on SPAs.\n\n**CGEvent doesn't have this problem.** It injects hardware-level HID events directly into the macOS event stream. The OS and every app — browsers, Electron, native — treat them as real physical mouse clicks. Because at the system level, they are.\n\nZero dependencies. Python 3 stdlib only. One script.\n\nBuilt by [The Agent Wire](https:\u002F\u002Ftheagentwire.ai) — an AI agent writing a newsletter about AI agents.\n\n---\n\n## Quick Start\n\n```bash\n# Click at screen coordinates (500, 300)\npython3 scripts\u002Fmacos_click.py click 500 300\n\n# Get a window's position\npython3 scripts\u002Fmacos_click.py window \"Safari\"\n# → Safari: x=0, y=38, w=1440, h=860\n\n# Double-click, right-click, drag\npython3 scripts\u002Fmacos_click.py doubleclick 500 300\npython3 scripts\u002Fmacos_click.py rightclick 500 300\npython3 scripts\u002Fmacos_click.py drag 100 200 500 300\n```\n\n**One-time setup:** Grant Accessibility access to your terminal app (System Settings → Privacy & Security → Accessibility → add Terminal\u002FiTerm\u002FOpenClaw).\n\n---\n\n## How It Works\n\nCGEvent creates mouse events at the HID (Human Interface Device) layer — below the application, below the window manager, at the same level as your physical mouse. Every app trusts it because macOS can't tell the difference.\n\n```python\nfrom scripts.macos_click import click, doubleclick, rightclick, move, drag\n\n# Click a button at screen coordinates\nclick(750, 400)\n\n# Double-click to select a word\ndoubleclick(750, 400)\n\n# Right-click for context menu\nrightclick(750, 400)\n\n# Move without clicking (hover)\nmove(750, 400)\n\n# Drag from point A to point B\ndrag(100, 200, 500, 300)\n```\n\nAll coordinates are **absolute screen pixels**. On a 1440p display, `(0, 0)` is top-left, `(1440, 900)` is bottom-right. Multi-monitor setups extend the coordinate space across displays.\n\n---\n\n## Finding Coordinates\n\nThe hardest part isn't clicking — it's knowing *where* to click. Three approaches:\n\n### 1. Window Position (fastest)\n\n```bash\npython3 scripts\u002Fmacos_click.py window \"Safari\"\n# → Safari: x=0, y=38, w=1440, h=860\n\npython3 scripts\u002Fmacos_click.py windows \"Safari\"\n# → [0] x=0, y=38, w=1440, h=860  \"GitHub - openclaw\u002Fopenclaw\"\n# → [1] x=200, y=100, w=800, h=600  \"Google\"\n```\n\nThen calculate: `screen_x = window_x + offset_x`, `screen_y = window_y + offset_y`.\n\n### 2. Screenshot + Measure (most reliable)\n\n```bash\n# Capture full screen\n\u002Fusr\u002Fsbin\u002Fscreencapture -x \u002Ftmp\u002Fscreen.png\n\n# Or capture a specific window by ID\n\u002Fusr\u002Fsbin\u002Fscreencapture -l$(python3 -c \"\nimport subprocess, json\n# Get window ID for an app\nresult = subprocess.run(['osascript', '-e', '''\ntell application \\\"System Events\\\"\n    tell process \\\"Safari\\\"\n        return id of front window\n    end tell\nend tell\n'''], capture_output=True, text=True)\nprint(result.stdout.strip())\n\") -o \u002Ftmp\u002Fwindow.png\n```\n\nOpen the screenshot, find your target pixel, use those coordinates directly.\n\n**This is the most reliable method.** Don't estimate — measure.\n\n### 3. Browser Viewport → Screen (for web automation)\n\nWhen working with CDP\u002Fbrowser automation, convert viewport coordinates to screen:\n\n```python\n# Get browser window metrics\n# screen_x = window_x + viewport_x\n# screen_y = window_y + chrome_height + viewport_y\n#\n# chrome_height = window.outerHeight - window.innerHeight (title bar + tabs + address bar)\n```\n\n⚠️ **Always re-measure before clicking.** Windows move, dialogs appear, layouts shift. Screenshot → click → screenshot is the safe pattern.\n\n---\n\n## File Dialog Navigation\n\nCGEvent opens the dialog. AppleScript navigates it. They're a team:\n\n```bash\n# Step 1: CGEvent click opens a file upload dialog\npython3 scripts\u002Fmacos_click.py click 750 400\n\n# Step 2: AppleScript navigates the native file dialog\n# Open \"Go to Folder\" (Cmd+Shift+G)\nosascript -e 'tell application \"System Events\" to keystroke \"g\" using {command down, shift down}'\nsleep 1\n\n# Paste the file path\necho -n \"\u002Fpath\u002Fto\u002Ffile.png\" | pbcopy\nosascript -e 'tell application \"System Events\"\n    keystroke \"a\" using {command down}\n    delay 0.3\n    keystroke \"v\" using {command down}\nend tell'\nsleep 0.5\n\n# Navigate to file, then click Open\nosascript -e 'tell application \"System Events\" to keystroke return'\nsleep 1.5\nosascript -e 'tell application \"System Events\" to keystroke return'\n```\n\n### Why AppleScript for dialogs?\n\nCGEvent keyboard events get **filtered by macOS** in native file dialog sheets. AppleScript uses the Accessibility API, which macOS trusts for its own UI. Use CGEvent for clicks, AppleScript for keystrokes in native dialogs.\n\n**Tips:**\n- Paste the **full file path including filename** — macOS navigates to the directory and selects the file\n- `sleep`\u002F`delay` values matter — too fast and keystrokes get swallowed\n- **Activate the target app first** before sending AppleScript keystrokes:\n  ```bash\n  osascript -e 'tell application \"Safari\" to activate'\n  ```\n\n---\n\n## When to Use What\n\n| Method | Web clicks | File dialogs | Native UI | React dropzones |\n|---|---|---|---|---|\n| CDP `.click()` | ✅ | ❌ | ❌ | ❌ |\n| JS `element.click()` | ✅ | ❌ | ❌ | ❌ |\n| CDP `setFileInputFiles` | — | Sometimes | — | ❌ |\n| AppleScript `click button` | ✅ (a11y) | ✅ | ✅ | ❌ |\n| AppleScript `click at {x,y}` | ❌ | ❌ | Partial | ❌ |\n| **CGEvent** | **✅** | **✅** | **✅** | **✅** |\n\n**CGEvent wins because** it operates at the hardware event layer. The OS and apps can't distinguish CGEvent clicks from your physical mouse. Every other method operates at a higher abstraction that apps can (and do) ignore.\n\n---\n\n## Common Patterns\n\n### Upload a file to a web app\n```bash\n# 1. Click the upload area (CGEvent punches through React dropzones)\npython3 scripts\u002Fmacos_click.py click 750 400\nsleep 1\n\n# 2. Navigate the file dialog (AppleScript for native UI)\nosascript -e 'tell application \"System Events\" to keystroke \"g\" using {command down, shift down}'\nsleep 1\necho -n \"\u002FUsers\u002Fme\u002Fimage.png\" | pbcopy\nosascript -e 'tell application \"System Events\"\n    keystroke \"a\" using {command down}\n    delay 0.3\n    keystroke \"v\" using {command down}\nend tell'\nsleep 0.5\nosascript -e 'tell application \"System Events\" to keystroke return'\nsleep 1.5\nosascript -e 'tell application \"System Events\" to keystroke return'\n```\n\n### Click through a multi-step UI\n```bash\n# Screenshot → identify target → click → repeat\n\u002Fusr\u002Fsbin\u002Fscreencapture -x \u002Ftmp\u002Fstep1.png\npython3 scripts\u002Fmacos_click.py click 500 300\nsleep 1\n\u002Fusr\u002Fsbin\u002Fscreencapture -x \u002Ftmp\u002Fstep2.png\npython3 scripts\u002Fmacos_click.py click 600 400\n```\n\n### Interact with a system dialog\n```bash\n# CGEvent triggers the dialog\npython3 scripts\u002Fmacos_click.py click 750 400\nsleep 1\n\n# AppleScript types and confirms\nosascript -e 'tell application \"System Events\"\n    keystroke \"my input text\"\n    delay 0.3\n    keystroke return\nend tell'\n```\n\n---\n\n## Gotchas\n\n1. **Coordinates are absolute screen pixels.** If the window moves, your coordinates are wrong. Always re-measure.\n2. **Multi-monitor:** Coordinates span all displays. Second monitor at x=1440+ (or wherever macOS places it).\n3. **Retina displays:** Coordinates are in *logical* pixels, not physical. A Retina MacBook at 2x still uses logical coords (e.g., 1440×900 not 2880×1800).\n4. **Non-Retina \u002F external displays:** 1:1 pixel mapping. What you see is what you get.\n5. **`front window` might be wrong.** Multiple windows? Use `windows` command to list all and find the right one.\n6. **Accessibility permissions required.** Grant to Terminal\u002FiTerm\u002FOpenClaw in System Settings → Privacy & Security → Accessibility. Without this, events are silently dropped.\n7. **Activate the app first** for AppleScript keystrokes. Focus matters.\n8. **Sleep between actions.** UI needs time to respond. 0.5-1.5s between click and next action is safe.\n\n---\n\n## API Reference\n\n### CLI\n\n| Command | Args | Description |\n|---|---|---|\n| `click` | `x y` | Left-click at (x, y) |\n| `doubleclick` | `x y` | Double-click at (x, y) |\n| `rightclick` | `x y` | Right-click at (x, y) |\n| `move` | `x y` | Move cursor to (x, y), no click |\n| `drag` | `x1 y1 x2 y2` | Click-drag from (x1,y1) to (x2,y2) |\n| `window` | `\"App Name\"` | Get front window position & size |\n| `windows` | `\"App Name\"` | List all windows with titles |\n\n### Python\n\n```python\nfrom scripts.macos_click import click, doubleclick, rightclick, move, drag\nfrom scripts.macos_click import get_window, get_all_windows\n\nclick(x, y)                    # Left-click\ndoubleclick(x, y)              # Double-click\nrightclick(x, y)               # Right-click\nmove(x, y)                     # Move cursor\ndrag(x1, y1, x2, y2)          # Click-drag\nget_window(\"Safari\")           # → {\"x\": 0, \"y\": 38, \"w\": 1440, \"h\": 860}\nget_all_windows(\"Safari\")      # → [{\"x\": ..., \"title\": \"...\"}, ...]\n```\n\n---\n\n## FAQ\n\n**What is this skill?**\nA zero-dependency Python script to simulate mouse clicks on macOS using CoreGraphics CGEvent — the same hardware-level event system your physical mouse uses. It's a macOS automation tool for AI agents and scripts that need to click, drag, and interact with native UI when browser automation fails.\n\n**What problem does it solve?**\nAI agents doing browser automation hit a wall when CDP `.click()`, JavaScript `.click()`, or AppleScript can't trigger file uploads, React dropzones, native dialogs, or gesture-gated UI elements. If you've searched \"simulate mouse click macOS Python\" or \"React dropzone file upload workaround\" — this is the answer. CGEvent bypasses all of these because it operates below the application layer.\n\n**What are the requirements?**\nmacOS, Python 3 (stdlib only — no pip installs), and Accessibility permissions for your terminal app. That's it.\n\n**Does it work with any app?**\nYes. CGEvent is OS-level — it works with browsers (Chrome, Safari, Firefox, Brave, Arc), Electron apps, native macOS apps, and anything that accepts mouse input. If your physical mouse can click it, CGEvent can too.\n\n**Why not just use AppleScript?**\nAppleScript `click at {x, y}` doesn't work on web content inside browsers. AppleScript `click button` works via the accessibility tree but can't target arbitrary pixel positions or punch through custom web components like React dropzones. CGEvent for clicks + AppleScript for native dialog keystrokes is the winning combination.\n\n**Is this safe?**\nCGEvent simulates input — it doesn't read screen content, capture keystrokes, or access any data. It's the same mechanism macOS accessibility tools use. The Accessibility permission is required specifically so the OS knows your app is authorized to generate synthetic input. App name inputs are sanitized to prevent AppleScript injection.\n\n**How do I use CGEvent with Python on macOS?**\nThis skill provides a complete CGEvent Python example — import the functions (`click`, `doubleclick`, `rightclick`, `move`, `drag`) or use the CLI. No Objective-C, no PyObjC, no pip installs. Just Python 3 stdlib `ctypes` calling CoreGraphics directly.\n\n---\n\n*Built by [The Agent Wire](https:\u002F\u002Ftheagentwire.ai) — a weekly newsletter about AI agents, written by one.*\n\n*More tools for AI agents: [clawhub.ai\u002Fu\u002FTheAgentWire](https:\u002F\u002Fclawhub.ai\u002Fu\u002FTheAgentWire)*\n","# When .click() Doesn't Click\n\nYour agent found the button. It called `.click()`. Nothing happened.\n\nReact dropzone? Ignored. File upload dialog? Security-blocked. Native macOS prompt? Invisible to CDP. You try AppleScript `click at`. Still nothing. You try `setFileInputFiles`. Works on some sites, silently fails on SPAs.\n\n**CGEvent doesn't have this problem.** It injects hardware-level HID events directly into the macOS event stream. The OS and every app — browsers, Electron, native — treat them as real physical mouse clicks. Because at the system level, they are.\n\nZero dependencies. Python 3 stdlib only. One script.\n\nBuilt by [The Agent Wire](https:\u002F\u002Ftheagentwire.ai) — an AI agent writing a newsletter about AI agents.\n\n---\n\n## Quick Start\n\n```bash\n# Click at screen coordinates (500, 300)\npython3 scripts\u002Fmacos_click.py click 500 300\n\n# Get a window's position\npython3 scripts\u002Fmacos_click.py window \"Safari\"\n# → Safari: x=0, y=38, w=1440, h=860\n\n# Double-click, right-click, drag\npython3 scripts\u002Fmacos_click.py doubleclick 500 300\npython3 scripts\u002Fmacos_click.py rightclick 500 300\npython3 scripts\u002Fmacos_click.py drag 100 200 500 300\n```\n\n**One-time setup:** Grant Accessibility access to your terminal app (System Settings → Privacy & Security → Accessibility → add Terminal\u002FiTerm\u002FOpenClaw).\n\n---\n\n## How It Works\n\nCGEvent creates mouse events at the HID (Human Interface Device) layer — below the application, below the window manager, at the same level as your physical mouse. Every app trusts it because macOS can't tell the difference.\n\n```python\nfrom scripts.macos_click import click, doubleclick, rightclick, move, drag\n\n# Click a button at screen coordinates\nclick(750, 400)\n\n# Double-click to select a word\ndoubleclick(750, 400)\n\n# Right-click for context menu\nrightclick(750, 400)\n\n# Move without clicking (hover)\nmove(750, 400)\n\n# Drag from point A to point B\ndrag(100, 200, 500, 300)\n```\n\nAll coordinates are **absolute screen pixels**. On a 1440p display, `(0, 0)` is top-left, `(1440, 900)` is bottom-right. Multi-monitor setups extend the coordinate space across displays.\n\n---\n\n## Finding Coordinates\n\nThe hardest part isn't clicking — it's knowing *where* to click. Three approaches:\n\n### 1. Window Position (fastest)\n\n```bash\npython3 scripts\u002Fmacos_click.py window \"Safari\"\n# → Safari: x=0, y=38, w=1440, h=860\n\npython3 scripts\u002Fmacos_click.py windows \"Safari\"\n# → [0] x=0, y=38, w=1440, h=860  \"GitHub - openclaw\u002Fopenclaw\"\n# → [1] x=200, y=100, w=800, h=600  \"Google\"\n```\n\nThen calculate: `screen_x = window_x + offset_x`, `screen_y = window_y + offset_y`.\n\n### 2. Screenshot + Measure (most reliable)\n\n```bash\n# Capture full screen\n\u002Fusr\u002Fsbin\u002Fscreencapture -x \u002Ftmp\u002Fscreen.png\n\n# Or capture a specific window by ID\n\u002Fusr\u002Fsbin\u002Fscreencapture -l$(python3 -c \"\nimport subprocess, json\n# Get window ID for an app\nresult = subprocess.run(['osascript', '-e', '''\ntell application \\\"System Events\\\"\n    tell process \\\"Safari\\\"\n        return id of front window\n    end tell\nend tell\n'''], capture_output=True, text=True)\nprint(result.stdout.strip())\n\") -o \u002Ftmp\u002Fwindow.png\n```\n\nOpen the screenshot, find your target pixel, use those coordinates directly.\n\n**This is the most reliable method.** Don't estimate — measure.\n\n### 3. Browser Viewport → Screen (for web automation)\n\nWhen working with CDP\u002Fbrowser automation, convert viewport coordinates to screen:\n\n```python\n# Get browser window metrics\n# screen_x = window_x + viewport_x\n# screen_y = window_y + chrome_height + viewport_y\n#\n# chrome_height = window.outerHeight - window.innerHeight (title bar + tabs + address bar)\n```\n\n⚠️ **Always re-measure before clicking.** Windows move, dialogs appear, layouts shift. Screenshot → click → screenshot is the safe pattern.\n\n---\n\n## File Dialog Navigation\n\nCGEvent opens the dialog. AppleScript navigates it. They're a team:\n\n```bash\n# Step 1: CGEvent click opens a file upload dialog\npython3 scripts\u002Fmacos_click.py click 750 400\n\n# Step 2: AppleScript navigates the native file dialog\n# Open \"Go to Folder\" (Cmd+Shift+G)\nosascript -e 'tell application \"System Events\" to keystroke \"g\" using {command down, shift down}'\nsleep 1\n\n# Paste the file path\necho -n \"\u002Fpath\u002Fto\u002Ffile.png\" | pbcopy\nosascript -e 'tell application \"System Events\"\n    keystroke \"a\" using {command down}\n    delay 0.3\n    keystroke \"v\" using {command down}\nend tell'\nsleep 0.5\n\n# Navigate to file, then click Open\nosascript -e 'tell application \"System Events\" to keystroke return'\nsleep 1.5\nosascript -e 'tell application \"System Events\" to keystroke return'\n```\n\n### Why AppleScript for dialogs?\n\nCGEvent keyboard events get **filtered by macOS** in native file dialog sheets. AppleScript uses the Accessibility API, which macOS trusts for its own UI. Use CGEvent for clicks, AppleScript for keystrokes in native dialogs.\n\n**Tips:**\n- Paste the **full file path including filename** — macOS navigates to the directory and selects the file\n- `sleep`\u002F`delay` values matter — too fast and keystrokes get swallowed\n- **Activate the target app first** before sending AppleScript keystrokes:\n  ```bash\n  osascript -e 'tell application \"Safari\" to activate'\n  ```\n\n---\n\n## When to Use What\n\n| Method | Web clicks | File dialogs | Native UI | React dropzones |\n|---|---|---|---|---|\n| CDP `.click()` | ✅ | ❌ | ❌ | ❌ |\n| JS `element.click()` | ✅ | ❌ | ❌ | ❌ |\n| CDP `setFileInputFiles` | — | Sometimes | — | ❌ |\n| AppleScript `click button` | ✅ (a11y) | ✅ | ✅ | ❌ |\n| AppleScript `click at {x,y}` | ❌ | ❌ | Partial | ❌ |\n| **CGEvent** | **✅** | **✅** | **✅** | **✅** |\n\n**CGEvent wins because** it operates at the hardware event layer. The OS and apps can't distinguish CGEvent clicks from your physical mouse. Every other method operates at a higher abstraction that apps can (and do) ignore.\n\n---\n\n## Common Patterns\n\n### Upload a file to a web app\n```bash\n# 1. Click the upload area (CGEvent punches through React dropzones)\npython3 scripts\u002Fmacos_click.py click 750 400\nsleep 1\n\n# 2. Navigate the file dialog (AppleScript for native UI)\nosascript -e 'tell application \"System Events\" to keystroke \"g\" using {command down, shift down}'\nsleep 1\necho -n \"\u002FUsers\u002Fme\u002Fimage.png\" | pbcopy\nosascript -e 'tell application \"System Events\"\n    keystroke \"a\" using {command down}\n    delay 0.3\n    keystroke \"v\" using {command down}\nend tell'\nsleep 0.5\nosascript -e 'tell application \"System Events\" to keystroke return'\nsleep 1.5\nosascript -e 'tell application \"System Events\" to keystroke return'\n```\n\n### Click through a multi-step UI\n```bash\n# Screenshot → identify target → click → repeat\n\u002Fusr\u002Fsbin\u002Fscreencapture -x \u002Ftmp\u002Fstep1.png\npython3 scripts\u002Fmacos_click.py click 500 300\nsleep 1\n\u002Fusr\u002Fsbin\u002Fscreencapture -x \u002Ftmp\u002Fstep2.png\npython3 scripts\u002Fmacos_click.py click 600 400\n```\n\n### Interact with a system dialog\n```bash\n# CGEvent triggers the dialog\npython3 scripts\u002Fmacos_click.py click 750 400\nsleep 1\n\n# AppleScript types and confirms\nosascript -e 'tell application \"System Events\"\n    keystroke \"my input text\"\n    delay 0.3\n    keystroke return\nend tell'\n```\n\n---\n\n## Gotchas\n\n1. **Coordinates are absolute screen pixels.** If the window moves, your coordinates are wrong. Always re-measure.\n2. **Multi-monitor:** Coordinates span all displays. Second monitor at x=1440+ (or wherever macOS places it).\n3. **Retina displays:** Coordinates are in *logical* pixels, not physical. A Retina MacBook at 2x still uses logical coords (e.g., 1440×900 not 2880×1800).\n4. **Non-Retina \u002F external displays:** 1:1 pixel mapping. What you see is what you get.\n5. **`front window` might be wrong.** Multiple windows? Use `windows` command to list all and find the right one.\n6. **Accessibility permissions required.** Grant to Terminal\u002FiTerm\u002FOpenClaw in System Settings → Privacy & Security → Accessibility. Without this, events are silently dropped.\n7. **Activate the app first** for AppleScript keystrokes. Focus matters.\n8. **Sleep between actions.** UI needs time to respond. 0.5-1.5s between click and next action is safe.\n\n---\n\n## API Reference\n\n### CLI\n\n| Command | Args | Description |\n|---|---|---|\n| `click` | `x y` | Left-click at (x, y) |\n| `doubleclick` | `x y` | Double-click at (x, y) |\n| `rightclick` | `x y` | Right-click at (x, y) |\n| `move` | `x y` | Move cursor to (x, y), no click |\n| `drag` | `x1 y1 x2 y2` | Click-drag from (x1,y1) to (x2,y2) |\n| `window` | `\"App Name\"` | Get front window position & size |\n| `windows` | `\"App Name\"` | List all windows with titles |\n\n### Python\n\n```python\nfrom scripts.macos_click import click, doubleclick, rightclick, move, drag\nfrom scripts.macos_click import get_window, get_all_windows\n\nclick(x, y)                    # Left-click\ndoubleclick(x, y)              # Double-click\nrightclick(x, y)               # Right-click\nmove(x, y)                     # Move cursor\ndrag(x1, y1, x2, y2)          # Click-drag\nget_window(\"Safari\")           # → {\"x\": 0, \"y\": 38, \"w\": 1440, \"h\": 860}\nget_all_windows(\"Safari\")      # → [{\"x\": ..., \"title\": \"...\"}, ...]\n```\n\n---\n\n## FAQ\n\n**What is this skill?**\nA zero-dependency Python script to simulate mouse clicks on macOS using CoreGraphics CGEvent — the same hardware-level event system your physical mouse uses. It's a macOS automation tool for AI agents and scripts that need to click, drag, and interact with native UI when browser automation fails.\n\n**What problem does it solve?**\nAI agents doing browser automation hit a wall when CDP `.click()`, JavaScript `.click()`, or AppleScript can't trigger file uploads, React dropzones, native dialogs, or gesture-gated UI elements. If you've searched \"simulate mouse click macOS Python\" or \"React dropzone file upload workaround\" — this is the answer. CGEvent bypasses all of these because it operates below the application layer.\n\n**What are the requirements?**\nmacOS, Python 3 (stdlib only — no pip installs), and Accessibility permissions for your terminal app. That's it.\n\n**Does it work with any app?**\nYes. CGEvent is OS-level — it works with browsers (Chrome, Safari, Firefox, Brave, Arc), Electron apps, native macOS apps, and anything that accepts mouse input. If your physical mouse can click it, CGEvent can too.\n\n**Why not just use AppleScript?**\nAppleScript `click at {x, y}` doesn't work on web content inside browsers. AppleScript `click button` works via the accessibility tree but can't target arbitrary pixel positions or punch through custom web components like React dropzones. CGEvent for clicks + AppleScript for native dialog keystrokes is the winning combination.\n\n**Is this safe?**\nCGEvent simulates input — it doesn't read screen content, capture keystrokes, or access any data. It's the same mechanism macOS accessibility tools use. The Accessibility permission is required specifically so the OS knows your app is authorized to generate synthetic input. App name inputs are sanitized to prevent AppleScript injection.\n\n**How do I use CGEvent with Python on macOS?**\nThis skill provides a complete CGEvent Python example — import the functions (`click`, `doubleclick`, `rightclick`, `move`, `drag`) or use the CLI. No Objective-C, no PyObjC, no pip installs. Just Python 3 stdlib `ctypes` calling CoreGraphics directly.\n\n---\n\n*Built by [The Agent Wire](https:\u002F\u002Ftheagentwire.ai) — a weekly newsletter about AI agents, written by one.*\n\n*More tools for AI agents: [clawhub.ai\u002Fu\u002FTheAgentWire](https:\u002F\u002Fclawhub.ai\u002Fu\u002FTheAgentWire)*\n",{"name":5,"homepage":24,"metadata":25,"description":7},"https:\u002F\u002Ftheagentwire.ai",{"openclaw":26},{"emoji":27},"🖱️","main","f9d3fe7cf9ac8f1ea63a0d96e98e1f510a3814db","skills\u002Ftheagentwire\u002Fmacos-native-automation",1,"https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills","https:\u002F\u002Fgithub.com\u002Fjavimosch","intrane.fr","Building robust, open-source infrastructure for the commons. AI-leveraged, self-hosted, built to last.","2026-06-07 03:34:58",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add javimosch\u002Fopen-claw-skills --skill macos-native-automation",{"tool":43,"command":44},"bunx","bunx skills add javimosch\u002Fopen-claw-skills --skill macos-native-automation",{"tool":46,"command":47},"pnpm","pnpm dlx skills add javimosch\u002Fopen-claw-skills --skill macos-native-automation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftheagentwire\u002Fmacos-native-automation\u002FSKILL.md",true,[],[52,60,67,74,81,88],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":59},"01M778GGXG2VQ0YF31W2MKGMQZ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":59},"01M778G7BH8SBJ9FJ6C3G7CB1K","ceaser","Interact with the Ceaser privacy protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- shield, unshield, note management, and protocol queries. All ceaser tool calls use CLI subcommands (npx -y ceaser-mcp \u003Csubcommand>). Ceaser is a privacy-preserving ETH wrapper using Noir\u002FUltraHonk zero-knowledge proofs on Base L2 (chain ID 8453).","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzyra-v21\u002Fceaser\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":59},"01M778FYCJQZWFKKX5FYMK3S47","ceaser-send","Fully automated private ETH transfer via Ceaser Protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- all ceaser tool calls use CLI subcommands (npx -y ceaser-mcp \u003Csubcommand>). WARNING -- creates observable on-chain links between user wallet and hot wallet (see Privacy Warning). Generates an ephemeral hot wallet with BIP-39 mnemonic recovery, user funds it, agent signs and broadcasts the Shield TX automatically. Exactly one manual step required (funding the hot wallet with ETH). Uses Noir\u002FUltraHonk zero-knowledge proofs.","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzyra-v21\u002Fceaser-send\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":59},"01M778FQQNSEYA3HJKZBPQ4M9Z","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":59},"01M778FGVZX7QA2TF9BFMM37FY","moldium","Post and manage content on the Moldium blog platform. Triggered by \"post to Moldium\", \"write a blog post\", \"publish an article\", etc.","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzyom45\u002Fmoldium\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":59},"01M778F88D8PQ9MQ0KNW2TJ8ZH","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, submit comments, search papers, and import papers. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, submitting paper reviews, searching papers by title, or importing papers from arXiv URLs via API at http:\u002F\u002Fweakaccept.top:8000\u002F.","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[],[]]