Chuyển đến nội dung
Skillpedia
Agent29k · #9791

cua-driver

Skill này làm gì

Skill này hướng dẫn agent điều khiển một ứng dụng desktop trên macOS, Windows hoặc Linux bằng một công cụ điều khiển đọc giao diện của ứng dụng. Dành cho người muốn một agent AI thực hiện tác vụ bên trong một ứng dụng thật.

Khi nào nên dùng

  • ✓Khi bạn yêu cầu agent thao tác hoặc tự động hóa một tác vụ bên trong một ứng dụng desktop.
  • ✓Khi bạn muốn giao diện của một ứng dụng được đọc và dùng để hoàn thành một tác vụ nhiều bước.
  • ✓Khi một tác vụ cần nhấp và gõ trong một ứng dụng không có API.

Liên kết skill

https://github.com/QwenLM/qwen-code/blob/main/packages/cua-driver/rust/Skills/cua-driver/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/QwenLM/qwen-code/blob/main/packages/cua-driver/rust/Skills/cua-driver/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Mở ứng dụng bảng tính của tôi, tìm tab tổng hàng tháng và xuất nó ra PDF cho tôi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent chụp một ảnh chụp giao diện của ứng dụng, thao tác trên các phần tử lấy từ ảnh chụp đó hoặc trên vị trí chính xác, rồi kiểm tra kết quả từ một ảnh chụp mới. Nó theo cùng một vòng lặp mỗi lần để các hành động không bị lệch nhau.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Qwen Cua Driver

Orchestrates cross-platform app automation via qwen-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, forbidden open/osascript/cliclick invocations, AXMenuBar navigation, SkyLight pixel-click dispatch).
  • 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 background input via AT-SPI + XSendEvent (including X11 apps under XWayland)).

Cross-cutting topics also have their own files:

  • BROWSER.md — exact native-window binding, explicit browser preparation, typed Chromium/Electron page tools, input trust classes, and native fallbacks for browser chrome and unsupported engines.
  • RECORDING.md — session recording + replay_trajectory.

Use whichever combination matches the host. When in doubt, run qwen-cua-driver doctor — it reports the platform and the right entry point.

Start with the narrowest semantic route

Before opening or operating an application, name the desired postcondition and use the first applicable route below. Verify the result in the same domain before stopping or advancing:

  1. Caller-provided headless/background operation for a non-GUI outcome. Prefer an exact application API/SDK, service or database client, CLI, or filesystem operation over imitating a user. This includes batch-safe file moves, renames, copies, directory creation, archive extraction, data conversion, and process inspection. Read the resulting semantic state back; a zero exit status alone is not proof.
  2. Typed Cua operation for an application or window outcome. Use set_window_frame for exact geometry, invoke_menu for a known native application-menu path, typed browser tools for supported page content, and clipboard tools for clipboard state. Verify with list_windows, get_browser_state, or clipboard_read, respectively.
  3. Background accessibility action. Use a fresh AX/UIA/AT-SPI target.
  4. Background pixel action. Use the pixels from the same state snapshot.
  5. Foreground delivery. Retry only the action that evidence says could not land in the background.
  6. Desktop fallback. Select an exact desktop target for that call only. Later calls may return to an exact window target in the same session.

Use Cua Driver when the outcome lives in an application's UI or window state, or when the user explicitly asks to operate that GUI. Once the task crosses that boundary, do not replace Cua's targeted and verified actions with shell scripts that mutate the app UI. A shell is a capability of the calling agent, not of the Cua Driver MCP server; an MCP-only client must not assume one exists.

Filesystem outcomes and GUI fallbacks

When the requested outcome is a filesystem change and the caller has a headless filesystem or command capability, keep it on rung 0. Enumerate the exact source set, decide the destination-conflict policy before changing anything, perform one batch-safe operation, then independently read back both source and destination manifests. Do not open a file manager merely to mimic a move, copy, or rename that the caller can execute and verify directly.

If the caller has no such capability, use the file manager as a GUI fallback and keep each claim narrow:

  1. After entering an inline rename and setting its value, commit it with the platform's confirmation key, then take a fresh snapshot. Value readback from the inline editor proves only that the editor changed; it does not prove the filesystem rename committed.
  2. For a multi-selection, use the platform modifier (cmd on macOS, ctrl on Windows/Linux). On macOS and Windows, issue that modified click with delivery_mode:"foreground" so the target observes physical modifier state;
Câu hỏi thường gặp

Nó hỗ trợ những hệ điều hành nào?

macOS, Windows và Linux, với các ghi chú riêng cho từng nền tảng trong các file riêng.

Tại sao nó chụp ảnh giao diện trước mỗi hành động?

Nếu không có ảnh chụp mới, các cú nhấp có thể lặng lẽ rơi vào sai phần tử.

Nó có làm việc được trong trình duyệt web không?

Công việc trên trình duyệt có hướng dẫn đồng hành riêng trong cùng skill.

Chi tiết

Mô tả gốc của tác giả

Drive a native GUI app (macOS, Windows, Linux) via the Qwen Cua Driver CLI (default) or MCP server; snapshot its accessibility tree, act through snapshot-bound element tokens, native menu paths, exact window geometry, or pixel coordinates, and verify from fresh state. Use when the user asks you to operate, drive, automate, or perform a GUI task in a real application on the host.

repo: QwenLM/qwen-code

Độ phổ biến

Sao GitHub
29k
Vị trí xếp hạng
#9791
Giấy phép
Apache-2.0
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự