agent-desktop-macos
Skill1.8k starsChanged 7 days agoApache-2.0View on GitHub
macOS platform guide for the agent-desktop CLI. Use for desktop automation on macOS: granting Accessibility and Screen Recording permission (TCC), what headed mode does on macOS (physical-first click, type and scroll), surfaces (menu, menubar, sheet, popover, alert), Notification Center, Chromium and Electron apps including launch --cdp, and fixing PERM_DENIED, empty accessibility trees, ACTION_FAILED and APP_UNRESPONSIVE.
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Read the core skill first (agent-desktop skills get desktop) for the observe, act, verify loop.
- Very specific: line 33
Run agent-desktop snapshot --app Finder -i to confirm.
- Very specific: line 43
Surfaces: Use --surface menubar for File, Edit and View menus and for menu bar apps (status items).
- Distinctive: line 59
When a command fails, find the symptom in references/troubleshooting.md.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
agent-desktop on macOS
Read the core skill first (agent-desktop skills get desktop) for the observe, act, verify loop. This skill covers only what is different on macOS. Symptoms and fixes are in references/troubleshooting.md.
Requirements
- macOS 13 or later, Intel or Apple Silicon.
- Accessibility permission for the app that launches agent-desktop (Terminal, iTerm2, Warp, VS Code, Codex). If System Settings lists the
agent-desktopbinary separately, grant it too. - Screen Recording permission, only for
screenshotand forsession start --screenshotsartifacts. - Automation permission for System Events, only where a command reports it missing.
First contact
- Run
agent-desktop permissions. - If a permission is denied, run
agent-desktop permissions --guide. It opens the correct System Settings page with a panel that shows the user which app to drag into the list. The user confirms with Touch ID or a password, and the panel moves to the next missing permission by itself. The command returns at once with"guide": "started","already_running"or"not_needed".agent-desktop permissions --requestshows the system prompts instead. - Open System Settings > Privacy & Security > Accessibility. Turn on the launching app.
- Restart the launching app. A running process does not pick up a new grant.
- Run
agent-desktop snapshot --app Finder -ito confirm.
permissions does not prompt. permissions --request can prompt, including for Automation. permissions --guide does not prompt and covers Accessibility and Screen Recording only. Automation reports unknown when macOS would need to prompt.
What differs on macOS
Headed is physical first for click, right-click, type, clear and scroll. Core focuses the exact window of the ref. The adapter then sends a real click, key or wheel event to the verified point. expand, collapse, set-value, select, toggle, check, uncheck, focus and scroll-to stay semantic under --headed. Double-click, triple-click, hover and drag need --headed. Raw --xy input never changes focus.
Judge delivery by observation. AX return codes do not prove an effect. Finder returns success from an AXConfirm that does nothing. Snapshot again or use get and is to check the result.
Surfaces. Use --surface menubar for File, Edit and View menus and for menu bar apps (status items). While a menu, sheet, alert or popover is open, refs from the window tree behind it are the wrong target.
Menus. right-click headless uses AXShowMenu. If the menu opened but the app returned APP_UNRESPONSIVE with retry: unsafe, do not retry. Inspect the menu with --surface menu. For combo boxes and menu buttons, use select @ref "Option". select needs a closed-to-open menu transition, so dismiss any open menu first.
Notification Center. The notification commands drive Notification Center through accessibility, with the rules in the core commands-system reference. When agent-desktop opens the center, it closes it afterwards and restores the previous app focus. Pass both --expected-app and --expected-title on a single dismiss or action, because the stack shifts. Use wait --notification --app "App" for banners that vanish before you list them.
Chromium and Electron. agent-desktop switches on the web accessibility of a Chromium renderer automatically when it needs it. For a dense running app, use snapshot --skeleton -i --compact, then drill with --root @ref.
Identity. launch accepts a display name ("System Settings") or a bundle ID (com.apple.systempreferences). Other commands take the display name through --app. Window IDs such as w-4521 stay valid for the life of the window. Find them with list-windows.
Keys. The primary modifier is cmd: press cmd+c, press cmd+s. Quit shortcuts such as cmd+q, cmd+shift+q, cmd+alt+esc, ctrl+cmd+q and cmd+shift+delete return POLICY_DENIED unless you pass --force. To quit an app, use close-app. Punctuation keys work in combos, as the symbol (, . / ; ' [ ] \ - = `) or by name (comma, period, slash, semicolon, quote, leftbracket, rightbracket, backslash, minus, equal, grave). Each one is sent with the key that types it in the active keyboard layout, so press cmd+, opens Settings on ANSI and JIS keyboards alike.
Cursor overlay. cursor-overlay enable draws the agent cursor in a click-through window. It never moves the OS pointer or activates an app. The macOS motion and image limits are in the core commands-system reference.
Next step
When a command fails, find the symptom in references/troubleshooting.md.
Trending
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about lahfir/agent-desktop
- A Hacker News story“Show HN: Agent-desktop – Native desktop automation CLI for AI agents”Hacker News · May 2, 2026 · 99 points
- A Hacker News story“Show HN: I spent 3 months making desktop automation stop lying to AI agents”Hacker News · Aug 15, 2026 · 6 points
- @camilleroux.com“Fini les screenshots pour piloter le bureau — agent-desktop expose les arbres d'accessibilité OS en JSON …”Bluesky · May 21, 2026 · 4 likes
- A Hacker News story“I might have solved computer use”Hacker News · Aug 14, 2026 · 2 points
- @hackernewsbot.bsky.social“I built the Playwright for desktop apps. 80% token savings | Discussion”Bluesky · May 2, 2026 · 2 likes
The biggest 5 of 35 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 35
Talked about on GitHub, Hacker News and Bluesky (35 times).
On GitHub · 29
- Jun 11, 2026feat(agent-desktop): add agent-desktop — mvanhorn/printing-press-library1 reaction · 2 comments
- Oct 28, 2026agent-skills.github.lahfir.agent-desktop: 0.11.1 → 1.0.1 — sudosubin/agents.nix0 reactions
- Oct 27, 2026[Request]: agent-desktop — ScoopInstaller/Main0 reactions
- Oct 26, 2026[Candidate] lahfir/agent-desktop/skills/agent-desktop-macos - agent-desktop-macos — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 25, 2026agent-skills.github.lahfir.agent-desktop: 0.11.0 → 0.11.1 — sudosubin/agents.nix0 reactions
24 more on GitHub
- Oct 25, 2026agent-skills.github.lahfir.agent-desktop: 0.10.1 → 0.11.0 — sudosubin/agents.nix0 reactions
- Oct 19, 2026[사례] 데스크톱 조작: Agent Desktop · typesafe-computer-use — tourbut/decision-lib0 reactions · 1 comment
- Oct 18, 2026Add agent-desktop (lahfir/agent-desktop) — reacher-z/Awesome-CUA0 reactions
- Oct 18, 2026agent-skills.github.lahfir.agent-desktop: 0.9.4 → 0.10.1 — sudosubin/agents.nix0 reactions
- Sep 29, 2026agent-skills.github.lahfir.agent-desktop: init at 0.9.4 — sudosubin/agents.nix0 reactions
- Sep 22, 2026feat(omp): add opt-in Jev-guided compaction and vendored jev-review setup — danielkuykendall23-boop/firstmate0 reactions
- Aug 15, 2026[News Bot] 6 article(s) need review — chobrien99-svg/AMI-Labs0 reactions
- Jul 1, 2026deps: bump the bun-dependencies group across 1 directory with 20 updates — AmeerJ97/grok-cli-vertex0 reactions · 1 comment
- Jun 24, 2026deps: bump the bun-dependencies group across 1 directory with 18 updates — AmeerJ97/grok-cli-vertex0 reactions · 1 comment
- Jun 17, 2026deps: bump the bun-dependencies group across 1 directory with 20 updates — AmeerJ97/grok-cli-vertex0 reactions · 1 comment
- Jun 10, 2026deps: bump the bun-dependencies group across 1 directory with 18 updates — AmeerJ97/grok-cli-vertex0 reactions · 1 comment
- Jun 4, 2026deps: bump the bun-dependencies group across 1 directory with 15 updates — AmeerJ97/grok-cli-vertex0 reactions · 1 comment
- May 27, 2026deps: bump the bun-dependencies group with 8 updates — AmeerJ97/grok-cli-vertex0 reactions · 1 comment
- May 26, 2026Add SKILL.md for agent-desktop automation — Cogni-AI-OU/cogni-ai-agentic-collections0 reactions · 5 comments
- May 22, 2026deps: bump the bun-dependencies group across 1 directory with 8 updates — AmeerJ97/grok-cli-vertex0 reactions
- May 20, 2026Bump the bun-dependencies group with 6 updates — AmeerJ97/grok-cli-vertex0 reactions · 1 comment
- May 20, 2026Bump the bun-dependencies group with 22 updates — AmeerJ97/grok-cli-vertex0 reactions
- May 8, 2026Add a Pi skill for agent-desktop usage — amfaro/duckdb-idea-plugin0 reactions
- May 4, 2026🔍 Weekly Discovery: 50 new tools found (2026-05-04) — heylabs-co/dev-tools-portal0 reactions
- May 3, 2026[claude-hackernews] Reply draft: agent-desktop Show HN, snapshot-allowlist guardrail (id=47982708) — FailproofAI/claude-hackernews0 reactions · 1 comment
- May 2, 2026📱 SNS 콘텐츠 - 2026-05-02 14:38 KST — leaf468/autothreads0 reactions
- May 2, 2026🤖 AI 트렌드 리포트 - 2026-05-02 14:38 KST — leaf468/autothreads0 reactions
- Apr 27, 2026Work in parallel with human — vercel-labs/agent-desktop0 reactions · 3 comments
- Apr 25, 2026chore(stats): replace self-hosted chart with star-history.com embed — vercel-labs/agent-desktop0 reactions
On Hacker News · 3
- May 2, 2026Show HN: Agent-desktop – Native desktop automation CLI for AI agents99 points · 44 comments
- Aug 15, 2026Show HN: I spent 3 months making desktop automation stop lying to AI agents6 points
- Aug 14, 2026I might have solved computer use2 points · 1 comment
On Bluesky · 3
- May 21, 2026Fini les screenshots pour piloter le bureau — agent-desktop expose les arbres d'accessibilité OS en JSON avec des refs déterministes. Un… — @camilleroux.com4 likes and reposts · 3 replies
- May 2, 2026I built the Playwright for desktop apps. 80% token savings | Discussion — @hackernewsbot.bsky.socialsays it tested it2 likes and reposts
- May 2, 2026📰 I built Playwright for desktop apps, achieving 80% token savings in development time and cost efficiency. 🔗… — @sagalinked.bsky.socialsays it tested it1 likes and repost
In this repository6 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agent-desktop-ffiSkill
- agent-desktop-linuxSkill
- agent-desktopSkill
- agent-desktop-windowsSkill
- jev-desktopSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

