LaunchKit · 2026
Back to Skills

mac-control

Control Mac via mouse/keyboard automation using cliclick and AppleScript.

0
598 downloads
by @easonc13

Setup & Installation

openclaw skills install @easonc13/mac-control

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

npx clawhub install mac-control

What This Skill Does

Automates Mac UI interactions using cliclick for mouse and keyboard input, screencapture for screenshots, and AppleScript for window information. Handles coordinate scaling on Retina displays and provides patterns for clicking buttons, typing text, and navigating dialogs. Includes fallback keyboard navigation for pages that block synthetic mouse events.

Combining cliclick with AppleScript window queries lets automation find element positions dynamically rather than relying on hardcoded coordinates that break when layouts change.

When to use it

  • Clicking Chrome extension toolbar buttons by screen coordinates
  • Automating dialog dismissal without manual mouse interaction
  • Taking and analyzing screenshots to locate UI elements before clicking
  • Typing text into focused fields as part of a scripted workflow
  • Navigating Google OAuth pages using Tab and Enter instead of mouse clicks

Example Workflow

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

INPUT

User asks: click the OK button in the dialog on screen

AGENT
  1. 1Take screenshot with screencapture -x /tmp/screen.png
  2. 2Read the screenshot to locate the OK button coordinates
  3. 3Click at those coordinates using cliclick c:X,Y
  4. 4Take a follow-up screenshot to verify the dialog was dismissed
OUTPUT

Dialog is dismissed and confirmation screenshot shows the updated screen state

Requirements

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

cliclick installed at /opt/homebrew/bin/cliclickImageMagick (magick) installed for color-based element detectionAccessibility permissions granted to the terminal or Node.js process in System Settings