macbeth
How to drive macOS apps with Macbeth MCP tools — discovery, locators, actions, menus, screenshots/OCR, handles, and fallbacks
Skill by wende
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/wende-macbeth
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/macbeth
What's inside
- Skill name
macbeth- Description
- How to drive macOS apps with Macbeth MCP tools — discovery, locators, actions, menus, screenshots/OCR, handles, and fallbacks
- License
- MIT
- Instructions
- 206 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Macbeth — Computer Use for macOS
Use this skill whenever you automate a Mac app through Macbeth MCP tools. App-specific skills (Safari, Mail, Electron, …) add quirks on top of this baseline — load those after this one when the target app has one.
Call `load_skill` with **no arguments** (or `name: "macbeth"`) to reload these instructions.
## Mental model
1. **Discover** — `list_apps` / `list_windows` / `query_tree`
2. **Act** — `click` / `fill` / `select_menu_item` / `wait_for`
3. **Verify** — `get_element` / `query_tree` / `screenshot` / `extract_text`
4. **Fall back** — menus → keyboard → screenshot/OCR when Accessibility is thin
Prefer structured Accessibility actions over screenshots and keystrokes. Prefer menus over `press_key` (menus do not steal focus).
## Output format
Tool **results** are YAML; tool **arguments** remain JSON (MCP input schemas are JSON Schema). Read fields by key path, not by line position — paths and titles never get hard-wrapped.
## Permissions
- **Accessibility** — required for almost everything. If every app is not-connectable with AX `-25211`, tell the user to grant Accessibility to the host that launched Macbeth, then restart the agent.
- **Screen Recording** — only for `screenshot` and window-based `extract_text`. OCR of supplied PNG `data` does not need it.
- Diagnose with `npx macbeth doctor` in a terminal when tools fail mysteriously.
## First moves
```jsonc
// What is running and connectable?
{ "name": "list_apps" }
// Is app X open, and what windows does it show? (no AX connect required)
{ "name": "list_windows", "arguments": {} }
{ "name": "list_windows", "arguments": { "app": "Unity" } }
// Menu-bar / LSUIElement apps (Übersicht, Raycast, iTerm2) are omitted from
// list_apps. Discover them with list_windows, then pass ownerName or ownerPid.
// Inspect UI (connects automatically — no prior connect_app)
{ "name": "query_tree", "arguments": { "app": "Finder", "maxDepth": 5 } }
```
### Do you need `connect_app`?
**No.** Every app-taking tool connects on its own from `app` (fuzzy name, PID, or `h_N` app handle).
Call `connect_app` only to:
- preflight Accessibility reachability
- see how a fuzzy name resolved (`matchKind`, aliases, bundle id, `runtime`)
- warm an Electron tree with a longer `readyTimeoutMs`
Reuse the returned app handle:
```jsonc
{ "name": "connect_app", "arguments": { "name": "Slack", "readyTimeoutMs": 5000 } }
// → "Pass app: \"h_3\" to any other tool…"
{ "name": "query_tree", "arguments": { "app": "h_3" } }
```
## Locators (`query`)
Most action tools take either:
- `query` — a chain of steps, each matching descendants of the previous match (recursive; skip intermediate containers), or
- `handleId` — a raw `h_N` from `query_tree` / `get_element` / `read_form`
Each step may set `role`, `title`, `identifier`, `titlePattern` (regex), and `index` (0-based when several match).
```jsonc
{
"app": "TextEdit",
"query": [
{ "role": "window" },
{ "role": "text_area" }
]
}
```
```jsonc
{
"app": "Safari",
"query": [
{ "role": "window" },
{ "role": "web_area" },
{ "role": "link", "titlePattern": "Sign.?in", "index": 0 }
]
}
```
Common roles: `window`, `button`, `text_field`, `text_area`, `checkbox`, `radio`, `menu`, `menu_item`, `toolbar`, `scroll_area`, `table`, `row`, `cell`, `group`, `dialog`, `link`, `heading`, `web_area`, `static_text`, `slider`, `pop_up_button`.
Always `query_tree` before inventing locators. Keep `maxDepth` modest (4–6) on huge trees; raise it only for the subtree you care about. When a `query_tree` result shows a `[truncated: …] re-query with handleId h_X` marker, pass that `handleId` back with a higher `maxNodes` to drill into the named subtree (root resets to depth 0 under the handle, so the same `maxDepth` reaches deeper).
## Actions
| Goal | Tool | Notes |
|---|---|---|
| Click a control | `click` | Auto-waits. `strategy`: `auto` (default) \| `ax` \| `mouse` |
| Set a text field | `fill` | Auto-waits. `strategy`: `auto` \| `ax` \| `keyboard` |
| Wait for UI | `wait_for` | `exists` (default), `value_equals`, `value_changes`, `enabled` |
| Read one element | `get_element` | role, title, value, enabled, focused |
| Read form controls | `read_form` | Labels + values for a panel/subtree |
| Native menu | `select_menu_item` | `menuPath: ["File", "Save"]` — no focus steal |
| Compact menus only | `list_menu_bar` | Usually unnecessary — `query_tree` already includes menus |
| Keystroke | `press_key` / `press_keys` | **Last resort** — activates the target app |
### Click / fill strategies
- Leave `strategy` unset (`auto`) unless something fails.
- Electron / React fields: `auto` fill synthesizes keystrokes so the framework sees input. If a value “sticks” in AX but the app ignores it, use `"keyboard"`. Avoid forcing `"ax"` on Electron.
- Canvas / geometry-only UIs: `click` with `"mouse"`. Optional `waitForIdleMs` (≤5000) avoids mid-keystroke focus steals.
### Keyboard outcomes
`press_key` / `press_keys` report `outcome`:
- `dispatched` — events entered the system stream (app may still ignore them)
- `attempted` — could not confirm dispatchFrom wende/macbeth, MIT.
More from wende/macbeth
- 0.593score

Macbeth
wende
Open-source computer use for macOS agents.
ConnectorBFreshness: BLocal★ 4Claude Code +5 - 0.566score
electron
wende
Automate Electron apps (Slack, VS Code, Discord, etc.) whose UI is Chromium web content exposed through the Accessibility API
SkillBFreshness: B★ 4Claude Code +9 - 0.564score
contacts
wende
Search and create contacts via CNContact, with AppleScript/Shortcuts helpers
SkillBFreshness: B★ 4Claude Code +9 - 0.564score
logicpro
wende
AX-first automation for Logic Pro — transport, tracks, tempo, mixer, and view controls
SkillBFreshness: B★ 4Claude Code +9 - 0.564score
maps
wende
AX-first automation for Apple Maps search and result interactions
SkillBFreshness: B★ 4Claude Code +9 - 0.564score
messages
wende
Browse conversations, read messages, and send texts in Apple Messages
SkillBFreshness: B★ 4Claude Code +9 - 0.564score
music
wende
Automate Apple Music with AppleScript plus AX support for UI-only controls
SkillBFreshness: B★ 4Claude Code +9 - 0.564score
notes
wende
List and write Apple Notes using AppleScript with optional Shortcuts integration
SkillBFreshness: B★ 4Claude Code +9 - 0.564score
reminders
wende
List, create, and complete reminders using EventKit with AppleScript/Shortcuts fallbacks
SkillBFreshness: B★ 4Claude Code +9 - 0.564score
safari
wende
Navigate, search, click links, read content, and manage tabs in Safari
SkillBFreshness: B★ 4Claude Code +9 - 0.564score
systemsettings
wende
AX-first automation for System Settings panes, search, and controls
SkillBFreshness: B★ 4Claude Code +9 - 0.564score
mail
wende
Automate Apple Mail using AX for UI interactions and AppleScript for draft/message data flows
SkillBFreshness: B★ 4Claude Code +9
Signals
- Stars
- 4
- Forks
- 0
- Open issues
- 1
- Last commit (this folder)
- Aug 26, 2026 (2 months ago)
- Last release
- Aug 2, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/wende/macbeth
- Website
- wende.github.io/macbeth/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from wende
- 0.619score
CICADA
wende
Code intelligence MCP server for 17+ programming languages.
ConnectorBFreshness: BLocal★ 40↓ 167/wkClaude Code +5 - 0.593score

Macbeth
wende
Open-source computer use for macOS agents.
ConnectorBFreshness: BLocal★ 4Claude Code +5 - 0.566score
electron
wende
Automate Electron apps (Slack, VS Code, Discord, etc.) whose UI is Chromium web content exposed through the Accessibility API
SkillBFreshness: B★ 4Claude Code +9 - 0.564score
maps
wende
AX-first automation for Apple Maps search and result interactions
SkillBFreshness: B★ 4Claude Code +9 - 0.564score
logicpro
wende
AX-first automation for Logic Pro — transport, tracks, tempo, mixer, and view controls
SkillBFreshness: B★ 4Claude Code +9 - 0.564score
contacts
wende
Search and create contacts via CNContact, with AppleScript/Shortcuts helpers
SkillBFreshness: B★ 4Claude Code +9
Cite this page
macbeth skill. Agent Mart. https://agentmart.dev/skills/wende-macbeth (last updated 2026-10-24)