cua-driver-rs
БесплатноБез исполняемых скриптовНе проверенDrive a native GUI app (macOS, Windows, Linux) via the cua-driver CLI (default) or MCP server — snapshot its accessibility tree, click/type/scroll by…
от aAAaqwq★ 123 звезды на GitHubОб этом скилле
cua-driver-rs
Orchestrates cross-platform app automation via cua-driver. Whenever
a user asks to drive a native 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.
Platform-specific reading — read this first
This file is the cross-platform core: snapshot invariant, CLI vs MCP choice, tool surface naming, behavior matrix, canonical loop, pixel-click contract, common failure modes. The platform-specific material (forbidden-list, accessibility tree implementation, launch semantics, click dispatch) lives in companion files in this same directory:
- macOS — read
MACOS.md(no-foreground contract, forbiddenopen/osascript/cliclickinvocations, AXMenuBar navigation, SkyLight pixel-click dispatch, Apple-Events JS bridge). - Windows — read
WINDOWS.md(UIA tree vs AX, UWP / ApplicationFrameHost hosting, layered UIA+PostMessage click chain, Session 0 isolation, Windows-specific focus-steal vectors). - Linux — read
LINUX.md(X11/Wayland status, AT-SPI, BETA-level support).
Cross-cutting topics also have their own files:
WEB_APPS.md— browser / Electron / Tauri specifics (sparse AX trees, omnibox navigation, theset_valueworkaround for minimized windows, tabs-vs-windows guidance).RECORDING.md— session recording +replay_trajectory.TESTS.md— internal test surface.
Use whichever combination matches the host. When in doubt, run
cua-driver doctor — it reports the platform and the right entry
point.
The no-foreground principle (cross-platform)
The user's frontmost app MUST NOT change. Every platform has its own list of forbidden commands; the principle is universal:
- macOS: any
openinvocation, anyosascriptthat mutates GUI state,cliclick,cghidEventTapwrites targeting another app's window. Full list inMACOS.md. - Windows: any
Start-Processthat triggers aShowWindow/SetForegroundWindowon the target,WScript.Shell.AppActivate, attaching to the foreground thread for input forwarding. Full list inWINDOWS.md.
If you reach for a command that says "activate", "foreground", "raise", or "make key", stop and translate to the cua-driver tool that does the same intent without focus-stealing.
Defaults — always prefer cua-driver over shell shims
Default transport is the cua-driver CLI — Bash shelling out
to cua-driver <tool-name> '<JSON-args>'. MCP tools (prefix
mcp__cua-driver__*) only when the user explicitly asks for them.
CLI wins because it picks up rebuilds instantly, failures are
easier to diagnose, and there's no per-tool schema-load overhead.
Every reference to click(...), get_window_state(...) etc. in this
skill means cua-driver click '{...}' — translate to MCP form only
when MCP is requested.
Claude Code computer-use compatibility mode
For normal Claude Code use, keep the default CLI or cua-driver MCP
server path above. If the user explicitly wants Claude Code's
vision/computer-use-style flow, they can register:
cua-driver mcp-config --client claude # then paste + run the printed line
Observation: Claude Code vision flows appear to treat a screenshot
MCP tool as the image-grounding anchor. This compatibility mode keeps
the normal CuaDriver tools and changes only screenshot. The
compatibility screenshot requires pid and window_id, captures
only that target window, and returns the window-local pixel
coordinate frame. Start with launch_app or list_windows, then
call screenshot({pid, window_id}); do not assume desktop
coordinates or a full-screen capture.
Use MCP for this Claude Code vision/computer-use-style path. Do not
shell out to cua-driver screenshot as a substitute: CLI screenshots
still work as CuaDriver calls, but they do not expose the
mcp__cua-computer-use__screenshot tool name that Claude Code
appears to use as the image-grounding cue.
Using cua-driver from the shell
Tool names are snake_case, management subcommands are
kebab-case — no ambiguity. Tools invoked as cua-driver <tool-name> '<JSON-args>'. Management subcommands:
cua-driver serve— start persistent daemon (required forelement_indexworkflows; without it each CLI invocation spawns a fresh process and the per-pid element cache dies between calls). macOS users: seeMACOS.mdfor the LaunchServices-routed launch form.cua-driver stop/statuscua-driver list-tools,describe <tool>cua-driver recording start|stop|status— seeRECORDING.mdcua-driver check-update [--json] [--no-cache]— read-only "is a newer release available?" probe. Same payload as thecheck_for_updateMCP tool; pair withcua-driver update --applyto install.
Canonical multi-step workflow (example shape — platform-specific launch idioms in the per-OS companion file):
cua-driver serve
cua-driver launch_app '{"bundle_id":"..."}'
# → {pid
Установить cua-driver-rs в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл cua-driver-rs?
Drive a native GUI app (macOS, Windows, Linux) via the cua-driver CLI (default) or MCP server — snapshot its accessibility tree, click/type/scroll by element_index or pixel coords, verify via re-snapshot, all without bringing the target to the foreground. Use when the user asks you to operate, drive, automate, or perform a GUI task in a real application on the host.
Как установить скилл cua-driver-rs?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cua-driver-rs запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic