cua-driver
Ce qu’il fait
Elle guide un agent pour piloter une application de bureau sous macOS, Windows ou Linux, à l'aide d'un outil qui lit l'interface de l'application. Elle s'adresse aux personnes qui veulent qu'un agent IA accomplisse une tâche dans une vraie application.
Quand l’utiliser
- ✓Quand vous demandez à l'agent d'utiliser ou d'automatiser une tâche dans une application de bureau.
- ✓Quand vous voulez que l'interface d'une application soit lue et utilisée pour accomplir une tâche en plusieurs étapes.
- ✓Quand une tâche demande des clics et de la saisie dans une application qui n'a pas d'API.
Lien du skill
https://github.com/QwenLM/qwen-code/blob/main/packages/cua-driver/rust/Skills/cua-driver/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Je voudrais ouvrir mon application de tableurs, trouver l'onglet des totaux mensuels et l'exporter en PDF.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'agent prend un instantané de l'interface de l'application, agit sur les éléments de cet instantané ou sur des positions exactes, puis vérifie le résultat à partir d'un nouvel instantané. Il suit la même boucle à chaque fois pour que les actions ne se désynchronisent pas.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
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, forbiddenopen/osascript/cliclickinvocations, 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:
- 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.
- Typed Cua operation for an application or window outcome. Use
set_window_framefor exact geometry,invoke_menufor a known native application-menu path, typed browser tools for supported page content, and clipboard tools for clipboard state. Verify withlist_windows,get_browser_state, orclipboard_read, respectively. - Background accessibility action. Use a fresh AX/UIA/AT-SPI target.
- Background pixel action. Use the pixels from the same state snapshot.
- Foreground delivery. Retry only the action that evidence says could not land in the background.
- 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:
- 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.
- For a multi-selection, use the platform modifier (
cmdon macOS,ctrlon Windows/Linux). On macOS and Windows, issue that modified click withdelivery_mode:"foreground"so the target observes physical modifier state;
Questions fréquentes
Quels systèmes d'exploitation sont pris en charge ?
macOS, Windows et Linux, avec des notes propres à chaque plateforme dans des fichiers séparés.
Pourquoi prend-il un instantané avant chaque action ?
Sans instantané récent, les clics peuvent tomber silencieusement sur le mauvais élément.
Peut-il aussi travailler dans un navigateur web ?
Le travail sur navigateur dispose de ses propres consignes complémentaires dans la même skill.
Détails
Description originale de l’auteur
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
Popularité
- Étoiles GitHub
- 29k
- Position au classement
- #9791
- Licence
- Apache-2.0
- Mis à jour
- 02/11/2026
Commentaires
- …
Autres skills de ce dépôt
codegraph
29kAide votre agent à analyser une base de code indexée à travers son graphe d'appels, ses dépendances, son code mort, ses points chauds et une recherche sémantique.
qwen-code-claw
29kAide votre agent à confier des tâches de programmation à Qwen Code, comme comprendre une base de code, corriger des bogues, refactoriser du code ou générer un nouveau projet.
structured-debugging
29kEnseigne à votre agent une méthode pas à pas pour déboguer les bogues difficiles : formuler une hypothèse, ajouter des contrôles ciblés, la tester et trouver la vraie cause avant de corriger.
tmux-real-user-testing
29kAide votre agent à tester une application de terminal comme un vrai utilisateur dans tmux, en enregistrant un journal lisible pas à pas avec une capture d'écran de chaque action.
Skills similaires
add-model-provider
394kPermet à votre agent de connecter un nouveau fournisseur de modèles IA à OpenClaw par des commandes sûres, sans clé en clair, puis de lancer un test.
acp-router
394kAide votre agent à envoyer une tâche à un assistant de code comme Claude Code ou Cursor via OpenClaw, afin que le travail s'exécute dans cet outil.
browser-automation
394kApprend à votre agent à piloter des pages web étape par étape, y compris les connexions, les onglets et la reprise lorsqu'une page ne répond plus.