# Cua driver

> Cua driver is an open-source agent skill for developer tools. Lets an agent drive native macOS apps in the background via accessibility snapshots. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/melandlabs/openloomi/tree/main/skills/cua-driver
- **Repository:** https://github.com/melandlabs/openloomi
- **GitHub stars:** 1,046
- **License:** Apache-2.0
- **Skill name:** cua-driver
- **Collection:** https://github.com/melandlabs/openloomi
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill teaches an AI coding agent to operate native macOS applications through the cua-driver command line tool or its MCP server. The agent takes an accessibility tree snapshot of a window, acts on elements by their index (clicking, typing, scrolling, pressing keys), and then re-snapshots the window to confirm the action landed. The core rule is that the user's frontmost app must not change, so the skill steers the agent away from commands like open, osascript activation and raw cursor moves.

The skill also covers the practical edges of this workflow: choosing between accessibility-based and pixel-based targeting, reading window screenshots with coordinate crosshairs, handling menu bars only when the target is already frontmost, and working with browsers and Electron apps through DOM reads. It includes a common error table and guidance on when to ask the user before destructive steps or app launches.

It expects macOS 14 or newer, the cua-driver binary with Accessibility and Screen Recording permissions granted to CuaDriver.app, and a running driver daemon. Optional reference files cover web apps and trajectory recording.

## When your agent uses it

> Drive a native macOS app via the cua-driver CLI (default) or MCP server — 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").

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/melandlabs/openloomi/tree/HEAD/skills/cua-driver)
- [License: Apache-2.0](https://github.com/melandlabs/openloomi/tree/HEAD/skills/cua-driver)

## Features

- **Accessibility tree snapshots:** Captures a window's element tree with indexed handles the agent can act on.
- **Background-only control:** Dispatches clicks, typing and key events to a target app without raising its windows.
- **Snapshot verification loop:** Requires a re-snapshot after each action to check the change actually happened.
- **Pixel fallback for canvases:** Uses window-local screenshot coordinates for surfaces the accessibility tree cannot reach.
- **Browser and Electron guidance:** Covers sparse trees, opening URLs in windows and reading page text through JavaScript.
- **Safety rules for focus:** Lists commands that would steal focus and the alternatives to use instead.

## Good for

- Open a file in TextEdit without switching away from my editor
- Navigate Finder to a specific folder in the background
- Click the Save button in Numbers and confirm the document saved
- Read text from a Chrome page while I keep working in another app
- Fill in a form field in a native macOS app

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/cua-driver` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/melandlabs/openloomi.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/cua-driver &&
cp -R "$tmp/skills/cua-driver" ~/.claude/skills/cua-driver &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/cua-driver` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/cua-driver` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/melandlabs/openloomi.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/cua-driver &&
cp -R "$tmp/skills/cua-driver" ~/.agents/skills/cua-driver &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/cua-driver` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/cua-driver` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/melandlabs/openloomi.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/cua-driver &&
cp -R "$tmp/skills/cua-driver" ~/.cursor/skills/cua-driver &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/cua-driver` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/melandlabs/openloomi.git --path skills/cua-driver
```

Or copy the folder to `~/.gemini/skills/cua-driver` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/cua-driver`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/melandlabs/openloomi.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/cua-driver &&
cp -R "$tmp/skills/cua-driver" ~/.copilot/skills/cua-driver &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/cua-driver` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/melandlabs/openloomi.git
```

Then copy `openloomi/skills/cua-driver` into your agent's skills folder as `cua-driver`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need before Cua driver can run?

It needs macOS 14 or newer, the cua-driver CLI with CuaDriver.app, and Accessibility and Screen Recording permissions granted to that app. The driver daemon should be started before element-index workflows.

### Will Cua driver bring apps to the front when it works?

The skill is designed not to. It uses launch_app for starting apps and per-process input events, and it tells the agent to avoid open, osascript activation and cursor-moving commands unless the user explicitly asks for a focus change.

### Which tools does Cua driver use?

It uses cua-driver tools such as launch_app, get_window_state, click, type_text, scroll, press_key, hotkey and set_value, and can also be used through the cua-driver MCP server.

### Does Cua driver work with Windows or Linux apps?

No. The skill targets native macOS applications through the macOS accessibility tree and macOS-specific event paths.

### How do I install Cua driver in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/cua-driver to use it in all your projects, or to .claude/skills/cua-driver in one project.

### Does Cua driver run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Cua driver?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Cua driver?

The closest alternatives to Cua driver are Semantouch, Agent device, Axiom macOS, Accessibility skill and Desktopmanager operator.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Semantouch](https://ai-powered.com/skills/semantouch): Semantouch is an open-source agent skill for developer tools.
- [Agent device](https://ai-powered.com/skills/agent-device-callstackincubator): Agent device is an open-source agent skill for browser automation.
- [Axiom macOS](https://ai-powered.com/skills/axiom-macos-charleswiltgen-2): Axiom macOS is an open-source agent skill for developer tools.
- [Accessibility skill](https://ai-powered.com/skills/accessibility-skill): Accessibility skill is an open-source agent skill for browser automation.
- [Desktopmanager operator](https://ai-powered.com/skills/desktopmanager-operator): Desktopmanager operator is an open-source agent skill for browser automation.
- [Agent CLI](https://ai-powered.com/skills/agent-cli): Agent CLI is an open-source agent skill for developer tools.
- [Clone](https://ai-powered.com/skills/clone-daveebbelaar): Clone is an open-source agent skill for developer tools.
- [Xcuitest skill](https://ai-powered.com/skills/xcuitest-skill): Xcuitest skill is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/cua-driver
