cua-driver

cua-driver is a skill for Claude Code, Codex from trycua/cua. It costs 98 tokens per session (2,579 once invoked), scanned A, original, MIT.

A tool for controlling native desktop apps on macOS, Windows, and Linux through their menus, windows, and visible controls.

In plain words
What is it for?
Automating desktop-app tasks such as opening menus, clicking controls, entering text, moving windows, and checking the app's current state.
Why use it?
It gives an agent a defined way to inspect an app before acting and check the result afterward, reducing mistakes caused by changing screens.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Automating desktop-app tasks such as opening menus, clicking controls, entering text, moving windows, and checking the app's current state.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/trycua/cua/cua-driver
About the project

trycua/cua is a toolkit for building and testing AI agents that operate computers by seeing screens, clicking controls, and typing across operating systems and virtual machines. It serves agent developers, benchmark authors, and teams generating training data for computer-use models. Catalogue add-ons provide ways to operate Cua drivers and related agent workflows.

trycua/cua · 30,575 stars · on GitHub · cua.ai

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add trycua/cua --skill cua-driver
Clone the repo
git clone --depth 1 https://github.com/trycua/cua

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cua-driver

README.md
[![agentmods](https://agentmods.dev/badge/skills/trycua/cua/cua-driver/github.svg)](https://agentmods.dev/skills/trycua/cua/cua-driver)
Your own site
<a href="https://agentmods.dev/skills/trycua/cua/cua-driver"><img src="https://agentmods.dev/badge/skills/trycua/cua/cua-driver/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cua-driver

Your own site · 80×15
<a href="https://agentmods.dev/skills/trycua/cua/cua-driver"><img src="https://agentmods.dev/badge/skills/trycua/cua/cua-driver.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,579 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 25 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Prompt Injection · line 667
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 668
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 669
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 670
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 840
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 1071
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 840
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 842
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 845
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 847
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 849
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 852
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 853
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 1074
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 854
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 1068
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 1068
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 1070
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 1071
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 1072
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00098 $0.02579
Opus 5.5 $0.00039 $0.01032
Sonnet 5.5 $0.00020 $0.00516
Haiku 4.5 $0.00010 $0.00258

Measured yesterday against content hash f771345ea965, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cua-driver scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

libs/cua-driver/rust/Skills/cua-driver/SKILL.md · 127 lines

How it starts

The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.

cua-driver

Operate one exact target, observe it narrowly, act by element, and verify the user's postcondition at checkpoints.

Efficient loop

The MCP server instructions carry the same rules, so they apply even when this file is not opened.

  1. Start with a targeted read: 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.
  2. Act by 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.
  3. Act through run_steps with observe:{}, even for a single step. It runs the steps, stops at the first failure, and returns only what changed since your last read, so you do not need a separate read after acting; 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.
  4. To re-read a window, pass 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.
  5. Verify at checkpoints (after a meaningful state change, before finishing), not after every action. One verify_state or one targeted get_window_state is usually enough.

Act

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

Read the full file on GitHub · 127 lines

Files

What ships with it

10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed f771345ea965
  2. 2d ago Changed · +3 lines bff04eab4d1d
  3. 5d ago Changed · +3 lines 0f19a22accd7
  4. 7d ago Changed be1868e8b9a8
  5. 8d ago Changed 5307bbc0bfac
  6. 9d ago Changed af0a809f6d40
  7. 10d ago Changed 752b620d5d42
  8. 11d ago Changed · +1 lines f121df27deaf
  9. 13d ago Changed 72b3b525d784
  10. 14d ago First seen · 120 lines · 98 tokens per session scan A 42713610e649

Subscribe to this mod's changes

cua-driver is a skill published in the GitHub repository trycua/cua (30,575 stars, last pushed today), licensed MIT. It adds 98 tokens to every session and 2,579 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.