using-computer-use
Skill2 starsChanged 9 days agoMITView on GitHub
Drive any app's real UI on the desktop through the cua-driver CLI: see it in screenshots, read it through its accessibility tree when it has one, click and type. Use for desktop and native apps, and for anything with no better option that is also realistic enough to validate effectively.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- reality-checkSkill
- gathering-evidenceSkill
- reaching-softwareSkill
- using-browserSkill
- using-softwareSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Start with start_session and pass the same session label on every call, then end_session at the end.
- Very specific: line 52
Write every screenshot_out_file into the evidence directory the prompt names, one before and one after each checked action, named by step.
- Distinctive: line 60
When the daemon is gone or every call fails, stop using computer use, say so in the report, and mark the affected items "not checked" with …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Once you have deemed it appropriate to use computer input, follow the guidelines below. Computer use is slow and may take focus from the user, so prefer using other methods when possible.
Calling it
cua-driver call <tool>with the JSON arguments on stdin; the result is JSON.cua-driver list-toolslists the tools andcua-driver describe <tool>gives a tool's arguments.- Start with
start_sessionand pass the samesessionlabel on every call, thenend_sessionat the end. Element tokens from one session are refused in another (stale_element_token). - The daemon is already running; never run
serve,stop, orupdate.
Seeing the app
Two ways, both first class. Every app works with the first.
- Screenshots:
get_window_statewithscreenshot_out_filewrites a PNG; open it with your file viewing tool to see it. Act on window-local pixels from that screenshot (click,double_click,scroll,drag), with itscapture_idso stale coordinates are refused. For a small target,zoomthen click withfrom_zoom: true. Take a new screenshot before each pixel click; a coordinate from an older one can hit the wrong control. - Accessibility tree, when the app has one: element tokens, values, and
verify_state. It is faster, works in the background, and gives exact text. Tokens are valid only for the snapshot that made them. Canvas, game, Flutter, and custom-drawn apps often have none or a thin one; that is normal, not a reason to stop.
The loop
launch_app, then get_window_state, then look (the screenshot always, the tree when there is
one), act, and look again to confirm the effect. A click reports no effect by itself. A verdict
rests on what was seen after the action: a verify_state result, a value in the tree, or a
screenshot that shows it.
- Background input first. Use
delivery_mode: "foreground"only when background input has no effect or returnsbackground_unavailable, and say in the report that it took focus. verify_statematches only actionable elements; read static labels fromget_window_state. Adegradedtree or anuntrusted_sourceresult cannot be trusted alone; confirm with a fresh screenshot.- Electron and web content inside an app: list selection and typing need foreground delivery, and field text is not in the tree, so read it from the screenshot.
- Under WSL the driver is a Windows program: give it Windows paths (
wslpath -w <path>).
Evidence
Write every screenshot_out_file into the evidence directory the prompt names, one before
and one after each checked action, named by step. Keep the verify_state output when there is a tree.
Gotchas
- On Windows,
launch_appfor a Store (UWP) app returns the pid ofApplicationFrameHost, which other apps share. Close such an app through its window's Close button, neverkill_app. - Elevated apps refuse input from a non-elevated driver.
- When the daemon is gone or every call fails, stop using computer use, say so in the report, and mark the affected items "not checked" with the error. When one control fails while others work, try the other ways in, in order: a background click on its element, a foreground pixel click from a fresh screenshot of the app's main window, then the keyboard. Name each way tried in the report.
- Close the apps you launched before ending, so nothing is left open on the user's desktop.
- The user might be interacting with their desktop, so if unexpected things happen that might also be the cause.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

