/cua:cuafrom cua
Routes GUI automation requests to the right skill: browser, Electron, macOS native windows, iOS/Android simulators, and real devices. Handles clicks, form fills, screenshots, and mobile QA.
Ships in cua. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
唯一职责:把「操作界面」的请求指派给正确的成员 skill,然后退出。每条规则的细节、 失效模式、账号处理都在成员 skill 里,别在路由层重学一遍。
第 0 步:先查有没有官方 API。 任务落在某个外部服务上(读信或收验证码、查用量、 建 key、看审核状态……)时,先找官方 API / CLI / SDK 或现成的已授权接口,能用就 直接调。GUI 是最后手段,只有确实只能 GUI 的那一步才进下表。
| 任务形态 | 用哪个 |
|---|---|
| 公开网页取数据 | 不进 GUI——先 curl / xh 等 HTTP 手段;被反爬挡或必须 JS 渲染再回来 |
| 默认:打开网页、填表、截图、QA、已登录的站点、多账号并行 | 浏览器自动化 CLI(下方「第三方工具」:agent-browser 或 browser-harness) |
| Electron 应用(VS Code、Slack、Figma、Notion 等 Chromium 内壳)里的页面 | 同上,给 app 带 --remote-debugging-port 重启(见「通用边界」) |
| 应用弹出的原生打开/保存面板、浏览器外的窗口与对话框、OS 级输入、不能抢焦点 / PID 定向输入 / Apple Events | macos-harness(本插件带文档,CLI 见下方第三方表) |
| 后台输入但要驱动回读验证(effect confirmed / refused)、跨 OS、VM/沙箱 fleet、轨迹录制 | cua-driver(第三方,见下) |
| 桌面应用走系统无障碍树,macOS / Windows / Linux 一套流程 | agent-desktop(第三方,见下) |
| 手机相关全部:安卓模拟器 / adb、iOS 模拟器、真机、云真机、投屏、按元素点击、中文输入、双指缩放、截图录屏、装包与日志、深链、移动端 QA | phone-use(本插件) |
macOS 桌面 App 里怎么选:页面内容在 Chromium 内核里 → CDP;窗口、菜单、原生面板、
跨 app → macos-harness(无障碍 + Apple Events);要驱动回读证据或轨迹录制 →
cua-driver。
| 工具 | 上游 / 许可 | 安装与接入 |
|---|---|---|
| agent-browser | vercel-labs/agent-browser,Apache-2.0 | npm i -g agent-browser && agent-browser install;用法用 agent-browser skills get core 从 CLI 现取(内容随安装版本走,不会过期) |
| browser-harness | browser-use/browser-harness,MIT | 按上游 install.md 安装;它附在用户自己跑着的 Chrome/Chromium 上复用已登录会话,不另起实例、不克隆 profile |
| macos-harness | browser-use/macos-harness,MIT | uv tool install --python 3.12 --from git+https://github.com/browser-use/[email protected] macos-harness(钉在 v0.1.x:上游 v0.2.0 重写了接口,六动词只在 v0.1.x 有);本插件带的 macos-harness skill 是它的说明文档加本地新写的章节,出处见该目录的 UPSTREAM.md 与 LICENSE |
| agent-desktop | vercel-labs/agent-desktop,Apache-2.0 | 按上游 README 安装;agent-desktop skills get platform 取当前平台的用法 |
| cua-driver | trycua/cua,MIT | 按上游文档装 CLI 或 MCP server;随发行版分发的 skill 包不要手改 |
visibilityState=hidden、rAF
不跑,之后所有界面操作都超时——出现「命令成功了但页面不动」先查这个。应用弹出的
原生打开/保存面板 CDP 看不见(工具可能照样报成功),交给 macos-harness 的无障碍
路径。RemoteDebuggingAllowed 关了),
CDP 根本连不上:优先找官方 API / CLI;只读看界面用无障碍快照,第一次快照没有网页
内容就隔两秒再取。Electron,分不出是谁。要断言「全程没抢前台」就连续采样,
只记变化:前后各取一次会漏掉瞬时抢占,也会被别人的操作骗。前台动作会移动真实鼠标
指针且不还原,下这种手之前先过这一关。channel="chrome" 依赖本机装了
Chrome;没有就用 executable_path 指向 Playwright 自带的 headless 浏览器。What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub sunflowerslwtech/sunkit --plugin cua3 skills in this plugin
/macos-harnessDocumentation skill for the browser-use/macos-harness CLI (MIT, v0.1.x) — whole-Mac control from one persistent session: screenshots, PID-targeted input, virtual pointer, Apple Accessibility, Apple Events, and a CDP escape hatch for Chromium-backed apps; without moving the physical cursor or forcing apps into the foreground. Adds locally written failure-mode guides: Electron web views with no accessibility tree, native open/save panels invisible to CDP, input-dead apps, HID-only apps./phone-useThe one manual for phones and emulators, companion detail skill of the `cua` router: Android emulator/phone via adb + uiautomator2, iOS Simulator via AXe/Appium, real iOS via WebDriverAgent, cloud real devices (BrowserStack, AWS Device Farm); element taps, UI tree, Chinese text input, pinch zoom, screenshots/recording, app install with hash proof, logs, deep links, mobile QA — plus how to tell whether a human is using the device before you touch it.Other plugins' skills for the same job