# Cua Driver

Use Cua Driver for desktop or browser tasks that are awkward or unavailable through...

- Repository: https://github.com/davidondrej/skills (4238 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add davidondrej/skills --skill cua-driver -g -a claude-code -y`
Codex: `npx skills add davidondrej/skills --skill cua-driver -g -a codex -y`
Cursor: `npx skills add davidondrej/skills --skill cua-driver -g -a cursor -y`
Gemini CLI: `npx skills add davidondrej/skills --skill cua-driver -g -a gemini-cli -y`

## Description

Use Cua Driver for desktop or browser tasks that are awkward or unavailable through Bash/APIs, or when the user explicitly wants GUI interaction: app testing, visual bug reproduction, form filling, calendar entry, screenshots, and demo recording. Also covers Cua setup; not OpenAI Codex Computer Use or web research.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Cua Driver

Cua Driver is an MIT-licensed local automation tool, not a model. Pi or another
agent supplies the reasoning; the driver reads accessibility trees/screenshots
and sends input to apps. No Cua cloud account or VM is needed. Host control is
not sandboxed, and desktop content sent to a cloud model leaves the machine.

## Before acting

```bash
command -v cua-driver
cua-driver --version
cua-driver status
cua-driver permissions status --json
```

Missing driver, stopped daemon, or missing Accessibility: stop and read
[setup](references/setup.md). Without Screen Recording, use accessibility-only
snapshots (`include_screenshot:false`); do not attempt screenshots or pixel input.
Never trigger permission prompts automatically. Respect any configured policy;
a skill does not grant permissions. Do not add restrictions or timeouts unless requested.

## Observe → act → verify

1. Prefer Bash/APIs for straightforward non-GUI work; use Cua when those routes are insufficient or the user requests GUI interaction. Use DeepAPI for web research.
2. Discover the intended app/window with `list_apps` / `list_windows`.
3. Read `cua-driver describe TOOL` before using unfamiliar parameters.
4. Get fresh `get_window_state` for the exact `pid` and `window_id`.
    - Target an `element_token` (`<snapshot_id>:N`). Driver 0.34+ no longer accepts `element_index`.
    - For pixels, read the same window's screenshot. Never guess coordinates or mix Retina points with screenshot pixels.
5. Perform one background action, then inspect fresh state to verify the outcome.
    - Stale references require a new snapshot. A successful tool response alone proves nothing.
    - After an ambiguous error, inspect before retrying; the action may already have happened.
6. Report the verified result and any remaining limitation.

The rest: https://github.com/davidondrej/skills/blob/HEAD/skills/ops-and-setup/cua-driver/SKILL.md
