--- name: clawdcursor version: 2.3.0 description: > Your eyes and hands on the user's computer: with clawdcursor, no task the user asks for is impossible. If a human can do it on a screen, you can: open any app, click, type, fill forms, send messages, read the screen, and drive browsers, desktop apps, settings, CAD tools and games on Windows, macOS and Linux. Use it on your own, without the user naming it, whenever a request needs an app, a window, a website or anything on the screen, and instead of answering "I can't access that" or asking the user to do a step themselves. Follow its path: act by accessibility name first, then by visible label (smart_click, no screenshot), and a screenshot plus x,y only for a target with no name or text. A native API, CLI or direct file edit that does the same job is cheaper: use it when it exists, and clawdcursor for everything else. Examples: "open X", "click Send", "do this in Outlook", "read what is on my screen", "fill out this form", "copy text between apps". Any model with tool calling, over MCP (stdio or HTTP). homepage: https://clawdcursor.com source: https://github.com/AmrDab/clawdcursor privacy: > All processing runs locally. Server binds to 127.0.0.1 only - not network-accessible. Screenshots stay in memory and go only to the MCP client that requested them; clawdcursor calls no model itself. It sends anonymous error reports by default (result codes, timings and its own file:line, never screen content; https://github.com/AmrDab/clawdcursor/blob/main/docs/telemetry.md). When the user asks to turn them off, call system {action:"telemetry_optout"}; the user can also run `clawdcursor optout`. metadata: openclaw: requires: {} install: # Published on npm. (macOS also needs `clawdcursor grant` for the native # Accessibility/Screen-Recording helper; or use the install.sh one-liner.) - npm install -g clawdcursor - clawdcursor consent --accept skill_dir: ~/.openclaw/workspace/skills/clawdcursor --- > **If you are a human:** see [`README.md`](README.md). This file is the AI-facing manual — dense on purpose. > > **If you are an LLM: keep going.** --- > **No task is impossible.** clawdcursor is your eyes and hands on the user's computer: if a human can do it on a screen, you can too. The user does not have to name clawdcursor: when a request needs an app, a window, a website or anything on the screen, use it on your own. > > 1. You **CAN** open any app, click, type, fill forms and send messages on this computer. > 2. You **CAN** see the screen: the accessibility tree, the page text, OCR and screenshots. > 3. You **CAN** operate ANY application: browsers, desktop apps, settings, CAD tools, games. > 4. You **SHOULD NOT** ask the user to do a step you can do with these tools. Hand over only what only they can do (a sign-in, a 2FA code, a CAPTCHA) with `pause_for_user`, and do everything before and after it yourself. > 5. You **SHOULD NOT** say "I can't interact with your desktop" or "I don't have access to that app". You can. > > **Follow the clawdcursor path:** act by accessibility name first (`invoke`, `set_value`), then by visible label (`smart_click`, no screenshot), and a screenshot plus x,y only for a target with no name and no text. > > **Struggling?** When a task is beyond what you can do, hand it to a stronger model from the same provider (a Sonnet or Opus subagent if you are Haiku; the provider's larger model otherwise) or raise your reasoning effort, rather than giving up or asking the user to do it. A sign-in, a code or a step only the user can take is not that: it is `pause_for_user`. Easy desktop work can run on a cheaper model too: a Haiku or Sonnet subagent can drive clawdcursor while you plan. > > **Ask first only** before an irreversible action the user did not ask for (sending, deleting, paying, closing unsaved work): `pause_for_user` with `choices`. The user's request is the permission for everything it covers. > > **Cost note:** a native API, a CLI or a direct file edit that does the same job is cheaper and exact: use it when it exists. Never decline or stall a task because none exists; that is what clawdcursor is for. --- ## Start here - compact mode and the compound tools > **If you are an LLM reading this: YOU SHOULD BE USING COMPACT MODE.** > > - MCP stdio (editor host): add `"args": ["mcp", "--compact"]` to your config. > - MCP over HTTP (daemon mode): start the daemon with `--compact` (or set > `CLAWD_MCP_COMPACT=1`) so `/mcp` serves the 6 compound tools (incl. `batch`). The surface is > fixed at startup — a daemon serves EITHER the compact tools OR the 90 > granular ones, not both. Default (no flag) is granular. > > Granular mode's 90 tools are kept for back-compat. Compact's tools are much smaller and reduce mis-tool-selection. Use granular only if your runtime MUST have every primitive as its own top-level schema. **You drive the tools yourself. clawdcursor never runs a model.** --- ## When you need step-level control - 6 compound tools The compact surface collapses every primitive into five action-discriminated compound tools plus `batch`: ``` computer(action, ...) Direct mouse / keyboard / screenshot / wait accessibility(action, ...) Read the a11y tree, click by name, set values, toggle window(action, ...) Open apps / focus / maximize / minimize / close / resize system(action, ...) Clipboard / time / OCR / undo / shortcuts / pause for the user browser(action, ...) DevTools Protocol - DOM-level control of any CDP-capable browser (Chrome, Edge, Chromium, Brave) batch({steps}) Collapse N tool calls into one round-trip (see "Execution playbook" below) ``` Pick a compound FIRST based on what kind of operation it is, then set the `action` enum, then supply the args. The catalog is ~7,000 tokens - about a third of the granular surface's ~19,000 - so small models (Haiku, Kimi, Ollama) stay focused. ### Cost tier - always use the cheapest tier that works | Tier | Label | Cost | Use when | |---|---|---|---| | T1 | **structured** | ~free | Default. `accessibility.*`, `window.*`, `browser.read_text`, clipboard. Returns structured text — no image, no vision model. | | T2 | **OCR** | cheap | A11y tree is empty or sparse. `system {"action":"ocr"}`, plus `smart_read` / `smart_click` / `smart_type` — all OCR-backed (text out, no image into the model). | | T3 | **screenshot / vision** | expensive | A target with no name and no visible text (a drawing, a game, a chart), or a task needing spatial reasoning text can't express. `computer {"action":"screenshot"}` puts the current frame into the model's context; you then act on live pixel coords off that frame. "Screenshot" and "vision" are the same tier — the only one that sends pixels to the model. Last resort. | **Rule: start at T1. Escalate to the next tier only when the current one fails.** Apply this logic when calling compound tools directly. ### Quick reference - what action to pick **I want to click something:** - By name? → `accessibility {"action":"invoke","name":"Send"}`. Most reliable. - By text via CDP on a web page? → `browser {"action":"click","text":"Submit"}`. - Name not found (the label is drawn, not exposed)? `invoke` presses the visible label itself (OCR, no screenshot); `accessibility {"action":"smart_click","target":"Send"}` does the same directly. - By screen coordinates? → `computer {"action":"click","x":500,"y":300}`, with x,y read off a `computer {"action":"screenshot"}`. Last resort: only for a target with no name and no visible text. **I want to type:** - Into a named field? → `accessibility {"action":"set_value","name":"Email","value":"x@y.com"}`. - Into the focused element? → `computer {"action":"type","text":"hello"}`. - In a browser? → `browser {"action":"type","label":"Email","text":"x@y.com"}`. **I want to read the screen:** - Structured (buttons, fields, text with coords)? → `accessibility {"action":"read_tree"}`. First choice. - The exact text of a page or document? → `system {"action":"copy_all_text"}` (one value in a long page: add `"find":""`). - Raw OCR fallback (tree empty)? → `system {"action":"ocr"}`. - Pixel image? → `computer {"action":"screenshot"}`. Last resort - expensive. **I want to open / focus something:** - An app? → `window {"action":"open_app","name":"Notepad"}`. - A URL? → `window {"action":"open_url","url":"https://..."}`. - A file? → `window {"action":"open_file","path":"/home/..."}`. - Focus an existing window? → `window {"action":"focus","processName":"chrome"}`. **I want to press a keyboard shortcut:** - `computer {"action":"key","combo":"mod+s"}` - `mod` auto-resolves to Cmd on macOS, Ctrl elsewhere. **I want to draw a curve / freehand path (one continuous stroke):** - `computer {"action":"drag_path","path":"[{\"x\":100,\"y\":100},{\"x\":120,\"y\":110},...]"}` The path is a JSON array of `{x, y}` points. The mouse button stays held for the entire path - one continuous stroke, not a series of disconnected drags. **Use this for drawing in Paint / Figma / any canvas app.** `mouse_drag` alone (start → end) gives you a straight line; `drag_path` gives you curves. **The web app is eating my Escape / keyboard events:** - Web-wrapped apps (New Outlook, Teams, Gmail, Notion) treat Escape as "close this dialog/modal" - often closing the entire compose window. **Do NOT send Escape to dismiss autocomplete suggestions in web apps.** Use arrow keys (Up/Down to navigate the dropdown, Enter to pick), or click somewhere neutral with `computer {"action":"click","x":..,"y":..}` to blur the field. --- ## When to reach for this skill Use clawdcursor on your own, without waiting for the user to name it, when: - The request involves an app, a window, a website or "my screen" (Outlook, Figma, Zoom, a CAD tool, a legacy tool with no REST endpoint). - The task is "click / type / read / open / focus / drag" on something visible. - A web task must work without a Playwright script — drive the live browser via the `browser` (CDP) compound. - You need something from an app or a page to answer the user: go and read it. - Your other tools (API, CLI, file edit) cannot do it, or already failed. Never answer "I can't": the screen is always there. - The user describes a workflow done by hand: "export from Excel", "send via GUI", "copy text from Notes to Slack". In OpenClaw terminology: clawdcursor is a **skill** that dispatches to **tools** (API / CLI / GUI primitives). An API, CLI or file edit that does the job is cheaper; everything else goes through the GUI. ### Sensitive apps The user's request is the permission: a task in email, banking, messaging, a password manager or an admin console is done there without asking again. Do not open those surfaces for a purpose the user did not give. What you ask about first, on the pause card (`system pause_for_user` with `choices`), is an irreversible action the user did not ask for: sending, deleting, paying, closing unsaved work. Never type or guess credentials. --- ## Modes at a glance clawdcursor exposes one protocol (**MCP**) over two transports. It never runs a model: **you reason, clawdcursor acts.** You call tools, interpret results, decide next steps. | Mode | Command | Transport | Brain | Tools available | |------|---------|-----------|-------|-----------------| | `mcp` | `clawdcursor mcp [--compact]` | stdio | **You** (editor host) | 90 granular (default) or compact surface (`--compact`) | | `agent` | `clawdcursor agent [--compact]` | HTTP `/mcp` | **You** (HTTP client) | 90 granular (default) **or** compact surface — pass `--compact` (or `CLAWD_MCP_COMPACT=1`). One surface per daemon, chosen at startup — NOT both at once | --- ## Connecting ### MCP (recommended for Claude Code / Cursor / Windsurf / Zed) **Compact - recommended for every LLM agent:** ```json { "mcpServers": { "clawdcursor": { "command": "clawdcursor", "args": ["mcp", "--compact"] } } } ``` **Granular - 90 individual tools (power-user, back-compat, larger prompt budget):** ```json { "mcpServers": { "clawdcursor": { "command": "clawdcursor", "args": ["mcp"] } } } ``` ### HTTP MCP (for any HTTP-capable agent) ```bash clawdcursor agent # starts on http://127.0.0.1:3847 (HTTP MCP; you drive the tools) ``` The HTTP transport uses **MCP's streamable-HTTP envelope** (JSON-RPC over POST), not REST. All requests go to a single endpoint, `POST /mcp`, with `Authorization: Bearer ` from `~/.clawdcursor/token`. Stateless mode - no session-init handshake required for one-shot calls. ``` POST /mcp → JSON-RPC: tools/list, tools/call (the catalog + every tool) GET /mcp → SSE channel for server-initiated notifications (auth) GET /health → {"status":"ok","version":""} (no auth, readiness probe) POST /resume → answer a pause for the user: {"answer":"resume"|"end"} (auth, localhost-only; same as `clawdcursor resume`) POST /stop → graceful shutdown (auth, localhost-only) GET / → minimal dashboard, calls /mcp via JSON-RPC under the hood ``` That's the entire HTTP surface. Calling a tool looks like: ```json POST /mcp Authorization: Bearer Content-Type: application/json Accept: application/json, text/event-stream { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "open_app", "arguments": {"name": "Notepad"} } } ``` **If the daemon isn't running, you MUST start it yourself — do not ask the user.** Only fall back to asking if the binary isn't installed or `clawdcursor agent` exits non-zero: ```bash clawdcursor agent # wait ~2s, then GET /health to confirm readiness ``` --- ## The universal loop Every GUI task follows the same shape regardless of surface: ``` 1. ORIENT accessibility {"action":"read_tree"} or window {"action":"active"} 2. ACT whichever compound fits (accessibility / computer / browser / system) 3. VERIFY read the result, check window state, optionally re-read the tree 4. REPEAT until done ``` **Use this OS's keys.** The server instructions name the OS and its shortcut modifier (cmd on macOS, ctrl on Windows and Linux); `mod` always means that modifier (`mod+s`). Never send another OS's shortcut (no `alt+f4` or `win+r` on a Mac, no `cmd+q` on Windows); `system {"action":"shortcuts_list"}` lists this OS's chords. `ctrl+…` on macOS is sent as the real Ctrl key (right in a terminal, wrong for copy/paste). When a result shows keys from a guide, press them instead of hunting with the mouse; the rest of that guide is system {"action":"shortcuts_list","context":""}. **Keystrokes always go to whatever has focus.** If focus is wrong (terminal instead of Excel), your `mod+s` - `Ctrl+S` on Windows/Linux, `Cmd+S` on macOS - saves your terminal session, not the spreadsheet. So: **focus first, act, verify.** ### Verification ladder (cheapest → most expensive) 1. **Tool return value** - every tool reports success/failure. Check it first. 2. **Window state** - `window {"action":"active"}`, `window {"action":"list"}` - did a dialog appear? Did the title change? 3. **Text check** - `accessibility {"action":"read_tree"}` - is the expected text visible? 4. **Screenshot** - `computer {"action":"screenshot"}` - only when text methods fail. 5. **Negative check** - look for error dialogs, wrong window, unchanged screen. **You MUST verify** after: sends, saves, deletes, form submissions, purchases, transfers. **You MAY skip verification** for: mid-sequence keystrokes, scrolling, hover, mouse-move. --- ## Execution playbook You drive the toolbox. Apply these rules in order. ### 1. Observe → prefer named targets → escalate only when needed - **Start:** `accessibility {"action":"read_tree"}` — structured names, roles, bounds. - **If sparse/empty:** `system {"action":"detect_webview"}` — Electron/WebView2 apps (Outlook, Teams, Discord, VS Code) render in Chromium; switch to `browser.*` via CDP. - **If still insufficient:** `system {"action":"copy_all_text"}` for the exact text, then `system {"action":"ocr"}`. - **One ladder.** SEE: `accessibility {"action":"read_tree"}` → `system {"action":"copy_all_text"}` → `system {"action":"ocr"}`. ACT: `accessibility` invoke / set_value by name → `accessibility {"action":"smart_click","target":"