cua-driverlisted
Install: claude install-skill LiHongwei-cn/lihongwei-cn
# cua-driver
Orchestrates macOS app automation via `cua-driver`. Whenever a user
asks to drive a native macOS app, follow the loop in this skill rather
than calling tools ad-hoc — the snapshot-before-action invariant is not
optional and silently breaks if you skip it.
## The no-foreground contract — read this first
**The user's frontmost app MUST NOT change.** This is the whole
reason cua-driver exists. Users pay for the right to keep typing in
their editor while an agent drives another app in the background.
Violate this rule and every other nice property the driver gives
you (no cursor warp, no Space switch, no window raise) stops
mattering — you just shipped the Accessibility Inspector with extra
steps.
Before running any shell command, ask: **"does this raise,
activate, foreground, or make-key any app?"** If yes, don't run it.
Every one of the commands below activates the target on macOS and
is therefore forbidden unless the user **explicitly** asked for
frontmost state:
- **Every form of the `open` CLI — `open -a <App>`, `open -b
<bundle-id>`, `open <file>`, `open <path-to-App.app>`, `open
<url>` — always activates.** macOS routes all forms through
LaunchServices, which unhides and foregrounds the target
regardless of whether you passed an app name, a bundle id, a
document, a URL, or the bundle path itself. The activation
happens even when the only intent was "start the process."
**Never use `open` for any app launch.** This includes launching
a just