macos-harness

macos-harness is a skill for Claude Code, Codex from Zfinix/aster. It costs 71 tokens per session (1,264 once invoked), scanned A, original, Apache-2.0.

A macOS automation tool controlled from a persistent Python session. It can inspect apps, take screenshots, send targeted input, work with accessibility controls, use Apple Events, and interact with browser windows.

In plain words
What is it for?
Use it for cross-application tasks such as opening and controlling apps, reading accessibility information, clicking or typing in a specific window, handling dialogs, and inspecting browser pages.
Why use it?
It lets an agent operate several Mac applications without relying on the physical mouse position. It provides a way to inspect application state and interact with native dialogs, files, browsers, and Electron apps.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/zfinix/aster/macos-harness
Any agent
npx skills add Zfinix/aster --skill macos-harness
Clone the repo
git clone --depth 1 https://github.com/Zfinix/aster

Made for: Claude Code, Codex.

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/zfinix/aster/macos-harness.svg)](https://agentmods.dev/skills/zfinix/aster/macos-harness)
Your own site
<a href="https://agentmods.dev/skills/zfinix/aster/macos-harness"><img src="https://agentmods.dev/badge/skills/zfinix/aster/macos-harness.svg" alt="Measured on agentmods" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,264 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00071 $0.01264
Opus 5 $0.00036 $0.00632
Sonnet 5 $0.00014 $0.00253
Haiku 4.5 $0.00007 $0.00126

Measured 5d ago against content hash c24028593f5b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

macos-harness 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 5d 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.

crates/aster-skills/optional-skills/macos-harness/SKILL.md · 125 lines

How it starts

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

macOS Harness

Setup

The skill ships with aster; the CLI it drives does not. Install it once with uv tool install macos-harness, then run macos-harness doctor to check permissions without prompting (--request only with user approval).

Surface

The CLI entry points are doctor, apps, see <app>, state <app>, repl, skill, telemetry. The real harness is the Python session: stdin programs preload mac, browser, Path, and subprocess.

macos-harness <<'PY'
print(mac.see("Finder")["path"])
PY

Verified bindings (checked against the installed CLI):

  • mac.see(app) -> dict with path (screenshot file), app, bounds, focus.target_is_frontmost. Captures without focusing the app.
  • mac.key / mac.type / mac.click / mac.drag / mac.scroll / mac.move: PID-targeted input; the physical cursor stays untouched.
  • mac.ax is an object: .dump(app) (dict: app, nodes, text, windows, screenshot), .query, .get, .set, .perform, .actions, .at.
  • mac.script(applescript) for Apple Events; mac.windows(app), mac.list_apps(), mac.snapshot(), mac.get_app_state(app) for discovery and state.
  • browser.connect(name) / browser.wait(name) for CDP into the user's real logged-in browser. Chrome shows an Allow remote debugging? sheet on first connect; approve it once there.
  • Plain Path and subprocess for everything else.

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 Python program when possible; do not make the model repeatedly ask whether a transition finished.
  • Use the cheapest strong end-state check: one screenshot for visible state or one exact API/AX query for semantic state; both only when they prove different things.

Read the full file on GitHub · 125 lines

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. 5d ago First seen · 125 lines · 71 tokens per session scan A c24028593f5b

Subscribe to this mod's changes

macos-harness is a skill published in the GitHub repository Zfinix/aster (43 stars, last pushed 3d ago), licensed Apache-2.0. It adds 71 tokens to every session and 1,264 once invoked, about $0.0004 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-30.

Related

Other skills, from other repositories

browser

Operate a real browser in a Lemma workspace for web pages or local/deployed apps: navigation, screenshots, login flows, forms, scraping, console/network inspection, and saved pages through Agent Browser. Use lemma-app-qa alongside it for systematic app journeys, defect evidence, or release judgment.

lemma-work/lemma-platform · 61 tokens

record-browser-gif

Record browser or Web UI interaction demos as optimized GIFs using the available built-in browser, state-based frame capture, and deterministic encoding, then publish to a dedicated assets branch when the task includes attaching the GIF to a pull request. Use when asked to make, record, or generate a GIF that…

singula-ai/alego · 99 tokens

browse

Drive a real stealth browser from your shell — act on websites (order food, file an expense, pull data behind a login), with per-person persistent sign-ins via the provider's managed auth (Kernel, Anchor, or Browserbase — picked by which API key you have). Use for ACTING on a site; to just read a page, use curl/wget…

yc-software/qm · 101 tokens

interactive-login

How to complete browser/interactive logins (aws / gh / glab / gcloud). The platform backgrounds the login poller so it survives the human's browser round-trip — and when that does NOT work.

yc-software/qm · 46 tokens

Interceptor

Real Chrome/Brave + macOS Computer Use from inside the browser — zero CDP fingerprint, real sessions; mandatory for visual deploy verification. Drive clickwork yourself. USE WHEN verify deploy, confirm UI, screenshot verification, computer use, macos automation, debug web, troubleshoot, visual check, motion/animation…

danielmiessler/LifeOS · 193 tokens

BrightData

4-tier progressive web scraping that auto-escalates WebFetch to curl to Interceptor to Bright Data proxy for bot detection and CAPTCHAs, with single-URL and multi-page crawl modes, output as markdown. USE WHEN Bright Data, scrape URL, web scraping, bot detection, crawl site, CAPTCHA, can't access, site blocking…

danielmiessler/LifeOS · 133 tokens