Agent skill · Backend & API

cua-driver

Drive a native macOS app via the cua-driver MCP server or CLI — snapshot its AX tree, click/type/scroll by element_index, verify via re-snapshot. Use when the user asks you to operate, drive, automate, or perform a GUI task in a real macOS application on the host (e.g. "open a file in TextEdit", "navigate to /Applications in Finder", "click the Save button in Numbers").

ThinkInAIXYZgithub.com/ThinkInAIXYZGitHub ↗
claude-codeApache-2.0
Install
npx skills add ThinkInAIXYZ/deepchat --skill cua-driver --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 5
SKILL.md size: 48 KB
Bundled scripts: none
Path: plugins/cua/vendor/cua-driver/source/Skills/cua-driver/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 6,191
Language: TypeScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Orchestrates macOS app automation via cua-driver. When a user requests GUI operations in a real macOS application, it adheres to a snapshot-before-action loop, capturing the AX tree, then clicking, typing, or scrolling by element_index, and verifying by re-snapshot. The skill is used to drive native macOS apps (e.g., TextEdit, Finder, Numbers) and can operate via MCP server or CLI. It emphasizes not changing the user’s frontmost app and uses an invariant where snapshots and visible targets guide actions.

How it works

  • Uses cua-driver to perform actions (click, type_text, scroll, etc.) by translating each reference like click({pid, window_id, x, y}) into the corresponding cua-driver command. All mentions of click(...), get_window_state(...), etc. map to cua-driver invocations.
  • Maintains a frontmost-app rule: do not foreground or activate apps unless explicitly allowed; before any shell command that could activate or bring forward an app, checks and follows the policy outlined in the no-foreground contract.
  • Performs a diagnostic self-check before each Bash call touching a macOS app, ensuring the command won’t foreground the target, move the real cursor, or bypass cua-driver.
  • Uses a workflow that emphasizes taking an initial AX-tree snapshot, performing a target action by element_index or pixel-based coordinates when necessary, and immediately re-snapshot to verify observable changes.
  • Provides prerequisites for running cua-driver: ensuring it is on PATH, permissions granted, and the daemon started (via serve mode). It recommends start commands and status checks to maintain a persistent per-pid element cache for window interactions.

When to use it

Use when the user asks you to operate, drive, automate, or perform a GUI task in a real macOS application on the host (e.g., "open a file in TextEdit", "navigate to /Applications in Finder", "click the Save button in Numbers"). Employs the snapshot-before-action invariant and frontmost-app constraints unless the user explicitly requests foregrounding.

What it can touch

  • Commands and tools: cua-driver with subcommands like click, get_window_state, and other referenced actions translated to cua-driver <tool-name> '<JSON-args>'.
  • It documents translating click(...), get_window_state(...), etc. into cua-driver CLI calls and uses per-pid window IDs and element indices for interaction.
  • Prerequisites mention cua-driver being on PATH and daemon management commands like open -n -g -a "DeepChat Computer Use" --args serve, along with cua-driver status.

Caveats

  • Enforces the no-foreground contract: many commands that would foreground or activate apps are forbidden unless explicitly asked for by the user.
  • Requires a persistent cua-driver daemon; without it, per-invocation caches die and element_index workflows may fail.
  • The approach relies on accurate AX trees and visible targets; if snapshots are sparse or invalid, it recommends re-snapshot and fallback to in-window AX or pixel actions.
  • Open/activate behaviors and keyboard shortcuts that focus apps are discouraged; only use launch_app for startup, not open forms, and only use activation when the user explicitly requests frontmost state.
From the SKILL.md

# 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. ## DeepChat MCP mode When DeepChat auto-pins this skill because the Computer Use MCP server is enabled, use the available Computer Use tools in the current tool list directly. Treat examples such as `click({...})` or `get_window_state({...})` as calls to the matching MCP tool with the same JSON payload. Shell CLI examples are diagnostic references for shell-based agents. App-name resolution belongs here. When matching a user request to an app, compare the request with each `list_apps` name and `bundle_id`. Consider the user's language, system language, English product names, English brand names, romanized or pinyin variants, and common abbreviations. Treat `bundle_id` as the strongest identity signal. When the requested app name is ambiguous, localized, translated, abbreviated, or written in another script, call `list_apps`, resolve the most credible bundle id, then call `launch_app` with that bundle id. ## Sparse vis

What's inside
Steps it walks through
  1. DeepChat MCP mode
  2. Sparse visible UI fallback
  3. The no-foreground contract — read this first
  4. Defaults — always prefer cua-driver over shell shims
  5. The narrow carve-out
  6. Self-check pattern
  7. Prerequisites — check before starting
  8. Using cua-driver from the shell
  9. Agent cursor overlay
  10. The core invariant — snapshot before AND after every action
  11. Why window selection is the caller's job now
  12. Behavior matrix
  13. The canonical loop
  14. 1. Resolve target pid — always via launchapp
Ships with 4 files
  • README.md
  • RECORDING.md
  • TESTS.md
  • WEB_APPS.md
More from deepchat
All skills →
About this skill
What does the cua-driver skill do?

Drive a native macOS app via the cua-driver MCP server or CLI — snapshot its AX tree, click/type/scroll by element_index, verify via re-snapshot. Use when the user asks you to operate, drive, automate, or perform a GUI task in a real macOS application on the host (e.g. "open a file in TextEdit", "navigate to /Applications in Finder", "click the Save button in Numbers").

How do I install it?

Run `npx skills add ThinkInAIXYZ/deepchat --skill cua-driver --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ThinkInAIXYZ/deepchat, a repository with 6,191 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going