Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/wende/macbeth/electronnpx skills add wende/macbeth --skill electrongit clone --depth 1 https://github.com/wende/macbethWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00027 | $0.01370 |
| Opus 5 | $0.00014 | $0.00685 |
| Sonnet 5 | $0.00005 | $0.00274 |
| Haiku 4.5 | $0.00003 | $0.00137 |
Grade A, and why
electron scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Electron App Automation
Electron apps (Slack, VS Code, Discord, Notion, Figma desktop, …) render their UI as Chromium web content. macbeth automates them the same way it does native apps, with a few Electron-specific things to know.
Connect
Connect by name or PID as usual:
connect_app({ "name": "Slack" })
On connect, macbeth enables Chromium's accessibility tree (AXManualAccessibility) and
waits for the web content to expose descendants. Branded Electron distributions are
recognised via ElectronAsarIntegrity, ChromiumBaseVersion, or a renamed
*Framework.framework + Helper (Renderer) layout. list_apps reports these apps
with runtime: electron and includes declared aliases and bundle IDs.
Reconnecting the same app refreshes readiness without waiting again unless you pass
readyTimeoutMs explicitly — useful after a first connect reported empty_web_area.
Expect a readiness delay
After connecting, Chromium needs a short, non-deterministic moment (usually <1s) to
construct the tree. connect_app already polls for this, but if the very first
query_tree looks empty (just a window shell), wait briefly and query again — the web
content is still materializing. For slow apps, connect with a longer wait:
connect_app({ "name": "Slack", "readyTimeoutMs": 5000 })
Discover the tree first
Always run query_tree after connecting, before building locators — Electron trees vary
a lot between apps and change as the app renders. Web content lives under a web_area
node:
[window "Slack"] h:h_0
[web_area] h:h_5
[button "Send"] h:h_31
[text_field] h:h_28
[heading "Threads"] h:h_12
...
Scope queries to the web_area and target elements directly — recursive descent means you
don't need to name every intermediate container:
{ "query": [{ "role": "window" }, { "role": "web_area" }, { "role": "button", "title": "Send" }] }
Common web-content roles: web_area, heading, link, button, text_field,
text_area, checkbox, radio, list, table, text. Note Chromium sometimes exposes
a contenteditable message box as text_area rather than text_field — check the tree.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 121 lines · 27 tokens per session scan A 44776660c312
electron is a skill published in the GitHub repository wende/macbeth (3 stars, last pushed 6d ago), licensed MIT. It adds 27 tokens to every session and 1,370 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
linkedin-content
LinkedIn post writing with hook formulas, formatting rules, and engagement patterns. Covers post types, algorithm signals, character limits, and content pillars. Use for: LinkedIn posts, professional content, thought leadership, B2B content, personal branding. Triggers: linkedin post, linkedin content, linkedin…
webview
Show a native macOS webview UI to the user and get structured input back. Use when an interactive macOS session needs human-in-the-loop for multi-field input, option selection from 5+ choices, approval with context, or content review — NOT for yes/no questions. Handles the full flow — spawning the webview, generating…
add-provider
Add support for a new AI coding agent/provider to Toki (e.g. Cursor, Devin, a new CLI). Use when the task is "add support", "detect ", "show usage/agents", or wiring a new entry into the Provider enum. Covers agent-only providers (detected by their running CLI, no usage API) and, as an advanced case, providers with a…
a11y-audit
Run a WCAG accessibility audit on a web page. Checks heading hierarchy, landmark regions, colour contrast, ARIA attributes, keyboard navigation, target size and the WCAG 2.2 additions. Use when the user wants to check, test, or audit accessibility (a11y) on a URL or the current page.
git-review
Review code changes, pull requests, or merge requests for bugs, code quality, security, and maintainability. Use when asked to review a PR, MR, diff, or set of changes. Also handles GitHub PRs and GitLab MRs.
grilling
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.