/agents:test-cua-driver-with-freeform [--background-only]from agents
Smoke-test cua-driver on macOS by drawing a house (blue body, red roof, two yellow windows, brown door) on a new Apple Freeform board, then report which driver capabilities passed. Use when the user asks to test cua-driver, check that cua-driver still works, run the Freeform test, or draw a house in Freeform with cua-driver.
Ships in agents. 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.
Read when SKILL.md points to them; scripts run unread.
Draw a house on a new Freeform board through cua-driver only, and report each
capability as pass or fail. Load the cua-driver skill first; its rules hold.
The house, in canvas order:
| Part | Shape | Fill | How it gets its size |
|---|---|---|---|
| Body | Square | default | default size |
| Roof | Triangle | Maraschino | default size, nudged on top |
| Door | Square | Mocha | foreground drag of a handle |
| Windows | Square | Lemon | foreground drag, then cmd+d |
scripts/cua_run.py wraps cua-driver call. Run
cua_run.py help for the full help. Three commands:
cua_run.py js FILE.js runs a run_script file.cua_run.py call TOOL JSON calls one tool.cua_run.py shot PID WID OUT.png saves a window screenshot.Write .js files and screenshots to the session scratchpad. Read every
screenshot with the Read tool; it is the only proof of canvas state.
Learned on cua-driver 0.38.0, macOS 26 (Darwin 25.5.0), 06 Nov 2026.
cua-driver call is a new process. An element_token from one call
is stale in the next. Inside run_script, target by {role, name}.run_script refuses set_window_frame, invoke_menu, bring_to_front.
Call those with cua_run.py call.x,y and drag. The
screenshot is smaller than the window in points; never convert by hand.shift+arrow nudges the selection 10 pt, a plain arrow 1 pt. Both work in
the background. At 100% zoom 10 pt is about 8 screenshot px.drag on a resize handle does nothing. Resizing needs
delivery_mode:"foreground", which moves the user's real pointer.escape leaves it
and deselects.invoke_menu is refused while Freeform is in the background. After
bring_to_front it works.Format > Show Colours opens a window titled Colour Fill. Its
AXRadioButton pencils (Mocha, Lemon, Maraschino, ...) fill the
selected shape.cmd+d duplicates the selection, offset down and right.list_windows.0,0). A window on another display gets no visible cursor, and
get_session still says cursor_visible:false everywhere. Put Freeform on
the main display, after asking: it covers what the user has there.move_cursor refuses with screenshot_context_missing unless the same
process first read the window: call get_window_state in the same script.session has ended. Run
start_session, then set the cursor up again: its settings are per
session.bring_to_front
(Firefox did, while the user had it open). A foreground drag then only
activates Freeform and resizes nothing. Call bring_to_front right before
each foreground step; check focus with
osascript -e 'tell application "System Events" to get name of first process whose frontmost is true' when a drag misses.Colour Fill panel exists only while Freeform is active. Inactive, it
is off screen and its pencils are unreadable: bring_to_front first.cmd+a selects nothing. To clear the board, click each shape
(that selects it) and press delete.double_click, cmd+a, delete, escape.Run cua-driver --version and cua-driver status. Daemon down or
permissions missing: stop and report; do not grant permissions yourself.
Turn on the animated agent cursor so the user can watch, session
freeform-test:
cua_run.py call set_agent_cursor_enabled '{"enabled":true}'
cua_run.py call set_agent_cursor_theme \
'{"theme_id":"cua.default","reduced_motion":"off"}'
cua_run.py call set_agent_cursor_motion '{"style":"comet_swoop",
"timing":"deliberate","glide_duration_ms":0,"arc_size":0.4,
"dwell_after_click_ms":250,"idle_hide_ms":0,"effects":{"glow":"on",
"ripple":"on","squish":"on","trail":"on","magnet":"on"}}'
comet_swoop is a wide arc with a trail. Other styles: signature_arc
(default), spring_settle, magnetic, adaptive, classic.deliberate timing is slow enough to follow (450..1300 ms a move).glide_duration_ms must be 0: any other value fixes every move to that
duration and flattens the style's own timing.idle_hide_ms 0 never hides the cursor; the maximum otherwise is 60000.reduced_motion:"off" keeps the animations even when macOS Reduce Motion
is on; with it on, every move is a short straight glide with no effects.cua-driver cursor-theme list needs the cua-cursor-theme sidecar; when
it is missing, cua.default is the only theme to rely on.Tell the user the real mouse stays put in background steps; they watch the agent cursor. Name the display the window is on.
launch_app with {"bundle_id":"com.apple.freeform"}; note the pid.{role:"AXButton", name:"New Board"} on the Freeform
window (All Boards or an open board; both have it). list_windows again: the same window id now carries
the board title (Untitled N).set_window_frame to the main display's visible frame
(x:0), so the agent cursor shows. A tiler
or the Dock may shrink it; effect:"unverifiable" is fine if
list_windows shows it filling the display.const app = await cua.getApp({pid: PID, windowId: WID});
const insert = async (shape) => {
await app.click({role: "AXMenuButton", name: "Insert Shape"});
await cua.sleep(800);
await app.click({role: "AXButton", name: shape});
await cua.sleep(800);
};
await insert("Square");
await insert("Triangle");
for (let i = 0; i < 14; i++) {
await cua.call("hotkey", {pid: PID, window_id: WID, keys: ["shift", "up"]});
await cua.sleep(100);
}
return "ok";
14 nudges is 140 pt, about the square's height, if the triangle landed on the square. It often lands offset (see Facts): screenshot, then nudge left and up by the measured gap. Pass: triangle sits on the square with no gap and no overlap; adjust with plain arrows.
With --background-only, stop here and report the rest as skipped.
Ask the user with AskUserQuestion: resizing the door and windows moves their
real mouse and brings Freeform forward, so hands off mouse and keyboard
until it finishes. Offer stop as the other option. No
yes, no foreground step. Then bring_to_front the board window.
drag with delivery_mode:"foreground" from the top-left handle inward,
to about 30% of the side wide and 50% tall, anchored at the bottom-right.shift+left steps, then plain
down until its bottom meets the body's bottom.invoke_menu ["Format","Show Colours"]; list_windows for the
Colour Fill window id; in a script click
{role:"AXRadioButton", name:"Mocha"} on that window.drag its bottom-right handle up-left to a
small square, about 25% of the body side.Lemon in Colour Fill.hotkey cmd+d, then nudge the copy to the mirror spot at top-right.Click the roof's middle with a foreground click while nothing is selected,
then click Maraschino. If text edit opens instead, press escape and click
once more.
invoke_menu ["Format","Hide Colours"].move_cursor with
target:{kind:"window",pid,window_id} over roof, left window, right
window, door, then empty canvas, cua.sleep(700) between. Read the points
from the final screenshot. The real pointer does not move; the result
text saying the app sees no hover is expected.end_session for freeform-test. Never cua-driver stop.Leave the board in place. Delete it or quit Freeform only if the user asks.
One table, one row per capability, then the final screenshot's absolute path.
| Capability | Result |
|---|---|
| launch_app | |
| AX click by role and name | |
| set_window_frame | |
| background hotkey nudge | |
| background drag | |
| bring_to_front | |
| foreground drag | |
| invoke_menu | |
| click in a second window | |
| screenshot_out_file | |
| cursor theme and motion | |
| move_cursor tour | |
| cursor visible (user) |
Background drag failing to resize is the known result, not a regression.
Record any other failure with its refusal.code or summary verbatim.
When: after the report table. Judge this skill, not cua-driver. Signals, from this run only. No signal: say nothing. One suggestion a run.
Every suggestion follows skill_improvement.md. Read it first. Change nothing without a yes.
Where it goes: this file or the helper. A cua-driver bug is reported, not worked around here.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub raveensrk/agent1 --plugin agents20 skills in this plugin
/all-doneThe last prompt before the user exits a session. Checks this session's work for loose ends - git state, things still running, leftover files, unverified work, dropped requests, the task list, open improvement notes, installed versus source - shows them in a question dialog, fixes the ones picked, offers to save the rest as tasks, then says whether it is safe to exit. Use when the user says all done, wrap up, am I safe to exit, closing check, or runs /all-done./ask-simpleAsk the user clear questions in simple language, as if they are new to the topic, so each one is easy to answer. Use when the user says ask simple questions, assume I am a newbie, keep it simple, explain like I am new, I do not understand your question, I do not know what you mean, idkwym, I do not understand your last response, or runs /ask-simple. Also use whenever a task needs the user's decision and they have asked for plain words. When run also ask about any open decisions remains to be answered. When invoked manually review the previous response and ask questions based on that./detective-antCheck a change against what it was asked to do - a task, an issue or a plan - and find real bugs, each with its cause and a fix plan a worker can build. Never edits code. In normal use it checks the current branch against main and the task text and answers in the session with pass or fail. Run by Ishikari's detective ant it checks a task or a fix and replies in the ant's JSON. Use when the user says check this against the task, does this do what the issue asked, find bugs in my branch, or runs /detective-ant./determinizeScan a directory and its agent instruction files, turn every rule a program can decide into a check, a guard or a git hook, and thin the instructions to decisions and routing. Use when the user says determinize, make this rule deterministic, convert these rules to checks, add a linter or a hook for a rule, thin an AGENTS.md, or asks which rules could be code instead of prose. Prints the per-rule plan and waits for a yes before writing./docsCreate, update or publish a repo's four books in docs/ - docs/design/ (the design doc and repo bible, complete enough that an engineer can rebuild the project from it alone), docs/manual/ (the user manual, in GNU manual chapter order, with real screenshots), docs/notes/ (working notes, tidied and listed) and docs/rules/ (the AI agent working rules, moved out of a thin AGENTS.md) - with D2/TALA and Mermaid diagrams, a build script for checks, a publish mode that makes the HTML, PDF and EPUB book in docs/book, a docs-only rebuild test and a fresh-reader manual test. Use when the user says create docs, write the docs, document this repo, write a design doc or repo bible, write the user manual, tidy the notes, thin AGENTS.md, move the rules, publish the book, docs book, update the docs, sync the docs, docs are stale or runs /docs. Run by hand after a task is done, or by Ishikari's docs ant after a merge; never on its own. Create mode researches first, interviews the user, waits for an OK on the outline, and works on a docs-book branch without pushing; called by an ant it takes its answers from the ant's docs brief and asks nothing. Update mode brings the docs in line with what changed and what was learned./docs-to-doorstopTurn a directory of docs and specs into a Doorstop requirements tree in ASPICE 4.0 form - the full V-model, SYS.1 to SYS.5, HWE.1 to HWE.4 and SWE.1 to SWE.6 - written in short, simple YAML items with D2, Mermaid or animated SVG diagrams where a picture explains it more simply. Scans the input first and asks every doubt before writing, then proves the tree with Doorstop and a bundled ASPICE checker. Use when the user says convert docs to doorstop, make requirements from these specs, ASPICE requirements, doorstop tree, or runs /docs-to-doorstop.