Drive a native GUI app (macOS, Windows, Linux) via the cua-driver CLI (default) or MCP server; snapshot its accessibility tree, act through snapshot-bound element tokens, native menu paths, exact window geometry, or pixel coordinates, and verify from fresh state. Use when the user asks you to operate, drive, automate, or perform a GUI task in a real application on the host.
95%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Medium
Suggest reviewing before use
Operate one exact target, observe it narrowly, act by element, and verify the user's postcondition at checkpoints.
The MCP server instructions carry the same rules, so they apply even when this file is not opened.
get_window_state({pid, window_id, query:"Save"}) returns about 2K chars where a full snapshot is about 42K. Bound large trees with max_elements / max_depth. Widen only if the target is missing.element_token: row [N] of a read is <snapshot_id>:N (for example "s0000002a:11", not "11"). Use pixels only for surfaces missing from the tree.run_steps with observe:{}, even for a single step, and put every action you already know in the same call (fill three fields, click, see the result: one call, not five). It stops at the first failure and returns only what changed since your last read, so never follow it with a separate read; see Workflow. When the flow needs logic between actions (a loop, a branch on what the app shows, a retry), write it as one run_script instead; see Workflow.since:"latest": you get the changed rows, not the whole tree. To just look, use include_accessibility_tree:false where advertised (it keeps the current tokens valid). Do not use max_elements:1 or a junk query to get a picture.verify_state or one targeted get_window_state is usually enough.| Goal | Tool or command | Read when needed |
|---|---|---|
| Check installation and capabilities | cua-driver --version, status, doctor, describe <tool>; MCP tools/list | Runtime |
| Install, update, or grant macOS permissions | update --apply, permissions status; MDM, authorized VNC approval, or ask the user | macOS |
| Find or open the requested app | list_apps, list_windows, launch_app | Current platform guide below |
| View a local file in the GUI | launch_app({bundle_id, urls:["file:///…"]}) opens it in that app | Current platform guide below |
| Observe one window | get_window_state({pid, window_id, query}) | Workflow |
| Act on a control | click / type_text with a fresh element_token and exact window target | Workflow |
| Act and see what changed in one call | run_steps({steps:[{tool,args},...], observe:{}}); stops at the first failure | Workflow |
| Loop, branch or retry in one call | run_script({script}): JavaScript over the cua API, sandboxed, time and call limits | Workflow |
| Use pixels when semantics cannot reach it | Fresh target screenshot, then x,y on the same target | Workflow |
| Verify the outcome | verify_state({pid, window_id, expect}) or a fresh snapshot read by the agent | Workflow |
| Operate the authorized desktop | get_desktop_state → input with target:{kind:"desktop",display_id:"primary"} → get_desktop_state | Workflow, Linux on Wayland |
| Drive supported browser page content | get_browser_state → browser_prepare from detail.next_call if refused → typed browser action | Browser |
| Browser tools refuse in the background | Not blocked: fill the page through get_window_state + set_value/click; if the first read shows only browser chrome, read again. BLOCKED only after that fails | Browser |
| Record an explicitly requested run | start_recording → actions → stop_recording; verify artifacts | Recording |
| Finish | Stop after proof; end_session for this run, not cua-driver stop on a shared service | Runtime |
Use Cua when the outcome lives in an application's UI/window state or the user asks to operate that GUI. Honor a requested interaction method: GUI-only excludes application APIs, DOM/CDP, direct clipboard APIs, and shell mutations unless the user permits them.
Check the installed version and advertised schema before using unfamiliar parameters. This pack's version identifies its source release, not the running daemon. Do not upgrade software, change permission profiles, or reinstall skills merely to make a recipe work.
effect:"unverifiable" and a successful exit are not task success; never replay a partial, canceled, or unknown action blindly.invalidated_snapshot_ids; another session's read leaves them valid; act with element_token. Reads are bounded and return one tree form by default; follow up with since:"latest" instead of re-reading a large window.| Symptom | Next step |
|---|---|
| Missing binary, mismatched daemon, unknown tool/field | Runtime preflight |
| Stale token or ambiguous window | Refresh list_windows / get_window_state; choose the intended live target |
| Large, truncated, or sparse tree; repeated reads | Bounded observation and since diffs |
surface_identity_unproven or screenshot permission wait | Wayland capture recovery |
background_unavailable | Not a stop: that input route is closed, the task is not. Read get_window_state and act by element (element_token, invoke_menu); foreground only if authorized |
window_scope_unproven | The driver could not prove the element belongs to that window, and sent nothing. Read that exact window again; on GNOME, see GNOME notes |
| Web page in a browser | Refs from get_browser_state with browser_click / browser_type; pixel clicks only when no ref exists |
| LibreOffice, Preview and other macOS editors | macOS recipes |
| Text did not visibly change | Reobserve before retrying; text and value semantics |
| Browser setup, binding, or ref refused | Browser recovery |
Any refusal, unverifiable or suspected_noop | Read hint and make next_call; Refusals and hints |
Load on demand; do not reabsorb these into this file:
get_guide({topic}): an MCP tool that returns the drag, browser, permissions, batching and menus sections of these files on demand, with no skill install or resource read. overview returns this file.trycua/cua
2873624
Also appears in
last in sync Oct 4, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.