macos-harness

macos-harness is a skill for Claude Code from SunflowersLwtech/sunkit. It costs 107 tokens per session (2,803 once invoked), scanned A, original, Apache-2.0.

A command-line skill for controlling a Mac through screenshots, keyboard and pointer input, accessibility information, Apple Events, and browser debugging. Apple Accessibility is macOS's interface for inspecting and operating app controls.

In plain words
What is it for?
Reading a Mac app's screen, typing and clicking in a chosen app, inspecting accessibility controls, and operating browser-based or native Mac interfaces.
Why use it?
It lets automation target a particular app or process without relying on the physical mouse position. It also covers both ordinary Mac windows and Chromium-based app pages.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the cua plugin — 3 skills shipped together

Good fit Reading a Mac app's screen, typing and clicking in a chosen app, inspecting accessibility controls, and operating browser-based or native Mac interfaces.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sunflowerslwtech/sunkit/macos-harness
Install

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.

Any agent
npx skills add SunflowersLwtech/sunkit --skill macos-harness
Clone the repo
git clone --depth 1 https://github.com/SunflowersLwtech/sunkit

Made for: Claude Code.

Or install cua, the plugin that ships this one along with the rest of its 3 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for macos-harness

README.md
[![agentmods](https://agentmods.dev/badge/skills/sunflowerslwtech/sunkit/macos-harness/github.svg)](https://agentmods.dev/skills/sunflowerslwtech/sunkit/macos-harness)
Your own site
<a href="https://agentmods.dev/skills/sunflowerslwtech/sunkit/macos-harness"><img src="https://agentmods.dev/badge/skills/sunflowerslwtech/sunkit/macos-harness/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for macos-harness

Your own site · 80×15
<a href="https://agentmods.dev/skills/sunflowerslwtech/sunkit/macos-harness"><img src="https://agentmods.dev/badge/skills/sunflowerslwtech/sunkit/macos-harness.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,803 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00107 $0.02803
Opus 5.5 $0.00043 $0.01121
Sonnet 5.5 $0.00021 $0.00561
Haiku 4.5 $0.00011 $0.00280

Measured 19d ago against content hash 800208a69cd0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

macos-harness scanned grade A with 1 finding 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 19d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s http://127.0.0.1:9333/json # pick the target whose type == "page"
plugins/cua/skills/macos-harness/SKILL.md · 226 lines

How it starts

The opening of the file, as written. The whole thing — 226 lines — stays where its author put it; the contents beside it link to each section on GitHub.

macOS Harness

Control a Mac from one persistent scripting session: one CLI call per decision point, not per primitive.

macos-harness <<'PY'
app = "Spotify"
mac.see(app)
mac.key("cmd+k", app=app)
mac.type("Alessia Cara", app=app)
print(mac.see(app))
PY

The CLI preloads mac, browser, Path, and subprocess. Prefer bounded stdin programs; reserve macos-harness repl for manual exploration and always exit it.

This skill documents the browser-use/macos-harness CLI (MIT), pinned to the v0.1.x line — upstream v0.2.0 rewrote the interface, and the six-verb contract below (see, key, type, click, ax, script) exists only there. Install v0.1.2:

uv tool install --python 3.12 --from git+https://github.com/browser-use/[email protected] macos-harness

The core sections are upstream's skills/macos-harness/SKILL.md (v0.1.0) with local additions and generalizations — see UPSTREAM.md and LICENSE in this directory. If you prefer not to depend on that CLI, wrap your own over the standard pieces (screenshots plus the accessibility tree, e.g. Peekaboo; Quartz event posting via CGEventPost; osascript for Apple Events; screencapture; raw CDP for Chromium surfaces) and follow the same conventions — the behavioral rules and failure modes below are what matter.

Minimize round trips

  • Bundle deterministic, reversible steps into one program, then verify once. Opening search, typing a query, and capturing the results is one burst—not three calls.
  • Stop at a genuine decision boundary: ambiguous identity, new coordinates, an irreversible action, or unexpected state. Inspect once, then run the next burst.
  • Do not screenshot merely to confirm that a known shortcut opened a text field before typing. Let the final screenshot verify the whole sequence.
  • Poll exact AX or Apple Events state inside the same program when possible; do not make the agent repeatedly ask whether a transition finished.
  • Use the cheapest strong end-state check. Prefer one screenshot for visible state or one exact API/AX query for semantic state; use both only when they prove different things.

Read the full file on GitHub · 226 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 19d ago First seen · 226 lines · 107 tokens per session scan A 800208a69cd0

Subscribe to this mod's changes

macos-harness is a skill published in the GitHub repository SunflowersLwtech/sunkit (15 stars, last pushed yesterday), licensed Apache-2.0. It adds 107 tokens to every session and 2,803 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-12.

Related

macos-harness compared with skills from other repositories

macos-harness next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
macos-harnessSunflowersLwtech/sunkitSkill15yesterdayApache-2.0A107Claude Code
dashboard-builderwinstonkoh87/Athena-PublicSkill656todayMITA31Claude Code
browser-doctorjmagly/aiwgSkill233yesterdayMITA56Claude Code, Codex
visual-verify-uiwinstonkoh87/Athena-PublicSkill656todayMITA21Claude Code
browser-automation-expertroedyrustam/vibes-plugSkill1304d agoMITA44Cursor
web-scraperroedyrustam/vibes-plugSkill1304d agoMITA43Cursor
local-slm-edge-ai-expertroedyrustam/vibes-plugSkill1304d agoMITA49Cursor