Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Read this when you need a coordinate fallback for visible browser UI that snapshots, refs, or locators cannot target reliably.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-18 | ✗→✓ | ▲ Improved | 17% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 141% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -11% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -32% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 109% | 0% |
cua global is available in REPL.
Visual browsing is a coordinate fallback for visible browser UI that cannot be targeted reliably with snapshot(page), refs, or page locators. Use it only while the task genuinely depends on visible pixels.
Do not use visual browsing for:
Prefer snapshot(page), refs, and locators when they can target the UI reliably.
cua always acts on the current active page. Open or focus the right tab first.display(await cua.getVisibleScreenshot()) before acting.snapshot(page) when DOM/ref state matters.display(await cua.getVisibleScreenshot()) when visual state matters.snapshot(page), refs, or locators as soon as the visual task is done (e.g. CAPTCHA solved, canvas interaction complete, dropdown finally submitted).visual-browse mode while the page genuinely requires pixel-level visual interaction.tsinterface CUAAPI { /** Click at a coordinate in the current viewport. */ click(options: { x: number; y: number; button?: 'left' | 'middle' | 'right'; // Mouse button: left by default keypress?: string[]; // Modifier keys held during the click. }): Promise<void>; /** Double click at a coordinate in the current viewport. */ doubleClick(options: { x: number; y: number; keypress?: string[]; // Modifier keys held during the double click. }): Promise<void>; /** Drag from a point to a point by the provided path. */ drag(options: { path: Array<{ x: number; y: number }>; // Drag path as viewport points. keys?: string[]; // Optional modifier keys held during the drag. }): Promise<void>; /** Capture the visible portion of the page as a base64 PNG string. */ getVisibleScreenshot(): Promise<string>; /** Press control characters at the current focused element. */ keypress(options: { keys: string[]; // Key combination to press. }): Promise<void>; /** Move the mouse to a point by the provided x and y coordinates. */ move(options: { keys?: string[]; // Optional modifier keys held while moving. x: number; y: number; }): Promise<void>; /** Scroll by a delta from a specific viewport coordinate. */ scroll(options: { keypress?: string[]; // Modifier keys held during scroll. scrollX: number; scrollY: number; x: number; y: number; }): Promise<void>; /** Type text at the current focus. */ type(options: { text: string }): Promise<void>; }
Use these values in keypress / keys: Alt, Control, ControlOrMeta, Meta, Shift. ControlOrMeta means Meta on macOS and Control elsewhere. Aliases also work: Cmd, Command, Ctrl, Option.
jsdisplay(await cua.getVisibleScreenshot());
jsawait cua.click({ x: 420, y: 315 }); console.log((await snapshot(page)).tree);
jsawait cua.drag({ path: [ { x: 240, y: 540 }, { x: 320, y: 540 }, { x: 410, y: 540 }, ], });
Other measured skills in the registry, with their headline benchmark lift.