agent-desktop-ffi
C-ABI bindings over agent-desktop's PlatformAdapter. Consumers (Python ctypes, Swift, Node ffi-napi, Go cgo, C++, Ruby fiddle)…
Operate desktop applications on macOS, Windows and Linux through native accessibility trees, using the agent-desktop CLI. Use when an AI agent must see or act on a desktop GUI: click buttons, fill forms, read UI state, navigate menus, toggle checkboxes, scroll, drag, type text,
Claude Code
$ npx -y skills add NanmiCoder/cc-haha --skill agent-desktop --agent claude-code
Codex
$ npx skills add NanmiCoder/cc-haha --skill agent-desktop -a codex -y
Cursor
$ npx skills add NanmiCoder/cc-haha --skill agent-desktop -a cursor -y
Gemini CLI
$ npx skills add NanmiCoder/cc-haha --skill agent-desktop -a gemini-cli -y
GitHub Copilot
$ npx skills add NanmiCoder/cc-haha --skill agent-desktop -a github-copilot -y
OpenCode
$ npx skills add NanmiCoder/cc-haha --skill agent-desktop -a opencode -y
Windsurf
$ npx skills add NanmiCoder/cc-haha --skill agent-desktop -a windsurf -y
name: agent-desktop tags: computer-use, desktop-automation, accessibility, ai-agent, gui-automation, cli requirements: - agent-desktop description: > Operate desktop applications on macOS, Windows and Linux through native accessibility trees, using the agent-desktop CLI. Use when an AI agent must see or act on a desktop GUI: click buttons, fill forms, read UI state, navigate menus, toggle checkboxes, scroll, drag, type text, press shortcuts, take screenshots, manage windows, use the clipboard, launch or close apps, read notifications. Triggers on: "click button", "fill form", "open app", "read UI", "computer use", "operate desktop", "accessibility tree", "snapshot app", "type into field", "navigate menu", "toggle checkbox", "take screenshot", "desktop automation", "agent-desktop", or any desktop GUI task on macOS, Windows or Linux.
agent-desktop is a CLI that lets an AI agent observe and operate desktop apps through the OS accessibility tree. It is a tool, not an agent. Every command prints one JSON envelope (`ok`, `data` or `error`). The observe, act and verify loop runs in you.
Examples use a POSIX shell. In PowerShell, quote every ref (`'@s8f3k2p9:e1'`), because a bare `@token` is the splatting operator. Use `$env:NAME = 'value'` instead of `export`, and `| ConvertFrom-Json` instead of `$(...)` and `jq`. The Windows skill has the PowerShell forms.
1. Run `agent-desktop status`. It reports the platform, permissions and `supported_surfaces`. 2. Run `agent-desktop skills get platform`. It loads the skill for the OS the binary runs on (macOS, Windows or Linux). 3. For flags and syntax, run `agent-desktop <command> --help`. This skill does not repeat flag lists.
Use `find` when you know the role or exact name. Otherwise map the app first and drill into one region.
agent-desktop snapshot --skeleton --app "Notes" -i --compact # shallow map, children_count on cut branches agent-desktop snapshot --root @s8f3k2p9:e3 -i --compact # drill into one region agent-desktop click @s8f3k2p9:e12 # act on a qualified ref agent-desktop snapshot --root @s8f3k2p9:e3 -i --compact # verify: re-read the same region
Action results carry `data.disposition` and errors carry `error.disposition`, each with `delivery` and `retry`. Observation commands such as `snapshot` have none on success; their errors, and every `INVALID_ARGS` refusal, carry `not_delivered` and `retry: safe`.
Ref actions are headless by default. They use semantic accessibility calls and do not take focus, move the cursor, synthesize keys or use the clipboard. If no semantic path exists, the action fails closed. Use the global `--headed` flag only when the user explicitly permits physical input, such as double-click, hover, drag, or focus. Never switch to headed mode to recover from a headless failure. Raw coordinates (`--xy`) never imply focus. Which actions need `--headed` differs by OS: read the platform skill.
Load one only when you need it: `agent-desktop skills get desktop <reference>`.
| Reference | Open it when | |-----------|--------------| | `commands-observation` | You need `snapshot`, `find`, `get`, `is`, `screenshot`, `list-surfaces` semantics, partial trees, or the `--root` rules | | `commands-interaction` | You choose between click, type, set-value, select, toggle, scroll, press and mouse commands, or you debug an action error | | `commands-system` | You launch or close apps, manage windows, use the clipboard, `wait`, `batch`, sessions, multi-agent cursors, tracing, or load skills | | `workflows` | You want worked patterns (forms, menus, dialogs, waiting for a new window, scroll-find, drag) and the anti-patterns list |
cc-haha 是一个桌面端 Claude Code 工作台:多会话与全局搜索、分支 / Worktree 启动、Diff 审阅、内置浏览器预览、图形化权限审批、模型自选(Claude / ChatGPT / Grok / 预设 / 本地端点)、图片生成、MCP 与 SubAgent 可视化管理、Agent Teams 协作工作台、动态 Workflow 编排、模型请求追踪、Computer Use、技能市场、多主题、桌面宠物、手机 App 与 H5 远程访问、IM 接入和定时任务,集中在一个 macOS /
C-ABI bindings over agent-desktop's PlatformAdapter. Consumers (Python ctypes, Swift, Node ffi-napi, Go cgo, C++, Ruby fiddle)…
Linux platform guide for the agent-desktop CLI. Lists per command group what works on X11 and on Wayland, how to check the AT-SPI…
macOS platform guide for the agent-desktop CLI. Use for desktop automation on macOS: granting Accessibility and Screen Recording…
Windows platform guide for the agent-desktop CLI. Lists per command group what works on Windows and what refuses, the…
Drive a desktop application from one plain-language goal, or resolve one intent at a time, without ever reading the accessibility…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.