agent-desktop
Was er macht
Lässt den Assistenten Desktop-Programme bedienen, indem er ihre Bildschirmstruktur liest und auf Schaltflächen, Felder und Menüs reagiert. Er ist für Menschen gedacht, die eine KI Apps für sich nutzen lassen wollen.
Wann du ihn nutzt
- ✓Wenn der Assistent ein Formular ausfüllen oder Schaltflächen in einer Desktop-App klicken soll.
- ✓Wenn er lesen soll, was in einem Programm auf dem Bildschirm steht.
- ✓Wenn du willst, dass er einen Screenshot macht, Fenster wechselt oder eine App öffnet.
Link zum Skill
https://github.com/NanmiCoder/cc-haha/blob/main/native/agent-desktop/skills/agent-desktop/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Öffne die Notizen-App, erstelle eine neue Notiz mit dem Titel Einkauf und tippe meine Liste hinein.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Assistent startet ein Kommandozeilenwerkzeug, das den Accessibility-Baum einer App liest und ein JSON-Ergebnis zurückgibt. Er bedient ein Element und liest dann diesen Bereich erneut, um die Änderung zu prüfen.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
agent-desktop
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.
Shell syntax
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.
First run
- Run
agent-desktop status. It reports the platform, permissions andsupported_surfaces. - Run
agent-desktop skills get platform. It loads the skill for the OS the binary runs on (macOS, Windows or Linux). - For flags and syntax, run
agent-desktop <command> --help. This skill does not repeat flag lists.
The loop
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
- A small app needs no skeleton. Take a full
snapshot -i. - Never skeleton a surface (
--surface menu,sheet,alert). A surface is already focused. - An action that opens a menu, sheet or alert lists it in
data.surfaces. Target that overlay next. - After an async step, use
wait(seecommands-system.md). A fixed sleep is a race.
Refs
- Output refs are qualified:
@<snapshot_id>:e<N>, for example@s8f3k2p9:e1. Pass them to later commands as they are. - Refs are valid for one snapshot. After any UI change, re-drill the affected region or take a new snapshot.
- Only addressable elements get refs. Static text and inert containers do not.
STALE_REF: the ref no longer matches the live UI. Take a fresh snapshot and use the new ref.AMBIGUOUS_TARGET: more than one live element matches. Narrow the target withfind --role --name --exactor--root, then use the new ref.SNAPSHOT_NOT_FOUND: the snapshot id expired. Snapshot again.
Delivery and retry
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.
- Retry or substitute an action only when
disposition.retryissafe. Onlynot_deliveredis safe. - Any other delivery value means the action may have landed. A repeat can click, type or submit twice, and
togglecan undo itself. - On a result that is not safe, read the live state (
get,is, or a fresh snapshot) and decide from that.details.post_statehelps when present. - Branch on
error.codeanderror.disposition. Message and suggestion text can change. details.retryable: falsemeans waiting cannot change the outcome. Try a different approach.
Headless and headed
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.
References
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 th |
Häufige Fragen
Was gibt das Werkzeug zurück?
Jeder Befehl gibt ein JSON-Ergebnis aus, das sagt, ob er funktioniert hat, und die Daten oder den Fehler nennt.
Prüft der Assistent zuerst den Rechner?
Ja. Er führt einen Statusbefehl aus, um Plattform, Berechtigungen und unterstützte Funktionen zu sehen.
Spielen Anführungszeichen in PowerShell eine Rolle?
Ja. Elementreferenzen sollten in einfache Anführungszeichen gesetzt werden, weil ein nacktes at-Zeichen in PowerShell eine besondere Bedeutung hat.
Details
Originalbeschreibung des Autors
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
repo: NanmiCoder/cc-haha
Beliebtheit
- GitHub-Sterne
- 15k
- Platz im Ranking
- #10917
- Lizenz
- —
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
agent-desktop-ffi
15kHilft Entwicklern, die Bibliothek agent-desktop direkt aus Python, Swift, Node, Go oder C++ aufzurufen, ohne für jede Aktion das Kommandozeilenwerkzeug zu starten.
agent-desktop-linux
15kZeigt deinem Agenten, wie er Linux-Desktop-Apps mit agent-desktop steuert, einschließlich dessen, was unter X11 und Wayland funktioniert, und typischer Korrekturen beim ersten Start.
agent-desktop-macos
15kZeigt deinem Agenten, wie er Mac-Apps automatisiert, einschließlich der nötigen Berechtigungen und der Arbeit mit Menüs, Dialogen sowie Chromium- oder Electron-Apps.
agent-desktop-windows
15kZeigt deinem Agenten, wie er Windows-Apps automatisiert, mit Angaben zu dem, was funktioniert, PowerShell-Anführungszeichen, minimierten Fenstern und Grenzen bei erhöhten Apps.
Ähnliche Skills
add-model-provider
394kLässt deinen Agenten einen neuen KI-Modellanbieter mit sicheren Befehlen an OpenClaw anbinden, API-Schlüssel nicht im Klartext speichern und einen Live-Test starten.
acp-router
394kHilft deinem Agenten, eine Aufgabe über OpenClaw an einen Coding-Assistenten wie Claude Code oder Cursor zu senden, damit die Arbeit in diesem Tool läuft.
browser-automation
394kBringt deinem Agenten bei, Webseiten Schritt für Schritt zu steuern, einschließlich Anmeldungen, Tabs und Wiederherstellung, wenn eine Seite nicht mehr reagiert.