ha-mac-control

ha-mac-control is a skill for Claude Code from shiwenwen/hope-agent. It costs 139 tokens per session (4,149 once invoked), scanned A, original, MIT.

Instructions for controlling macOS applications and windows through accessibility controls, including how to inspect the current screen and target actions safely.

In plain words
What is it for?
Use it to inspect apps, switch spaces, manage windows, click menus, work with dialogs, or copy and paste on macOS.
Why use it?
It reduces mistakes caused by changing focus, expired window references, dialogs, and similar-looking controls.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to inspect apps, switch spaces, manage windows, click menus, work with dialogs, or copy and paste on macOS.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shiwenwen/hope-agent/ha-mac-control
About the project

Hope Agent is a cross-device personal AI assistant that remembers context, uses tools, and continues working toward goals through dynamically organized workflows. Individuals use it from desktop, web, server, or messaging environments to manage projects, knowledge, designs, and long-running tasks. The catalogue add-ons extend its agent workflows and capabilities.

shiwenwen/hope-agent · 1,576 stars · on GitHub

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 shiwenwen/hope-agent --skill ha-mac-control
Clone the repo
git clone --depth 1 https://github.com/shiwenwen/hope-agent

Made for: Claude Code.

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 ha-mac-control

README.md
[![agentmods](https://agentmods.dev/badge/skills/shiwenwen/hope-agent/ha-mac-control/github.svg)](https://agentmods.dev/skills/shiwenwen/hope-agent/ha-mac-control)
Your own site
<a href="https://agentmods.dev/skills/shiwenwen/hope-agent/ha-mac-control"><img src="https://agentmods.dev/badge/skills/shiwenwen/hope-agent/ha-mac-control/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 ha-mac-control

Your own site · 80×15
<a href="https://agentmods.dev/skills/shiwenwen/hope-agent/ha-mac-control"><img src="https://agentmods.dev/badge/skills/shiwenwen/hope-agent/ha-mac-control.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 139 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,149 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Memory Poisoning · line 87
    Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
    Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
How audits are shown
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.00139 $0.04149
Opus 5 $0.00069 $0.02074
Sonnet 5 $0.00028 $0.00830
Haiku 4.5 $0.00014 $0.00415

Measured 10d ago against content hash 98843e538b44, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

ha-mac-control 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 10d 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.

skills/ha-mac-control/SKILL.md · 190 lines

How it starts

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

Hope Agent Mac Control

mac_control operates the user's macOS desktop from the authorized Hope Agent app process. macOS UI state is volatile: apps steal focus, AX IDs expire, sheets attach to windows, and multiple windows often share similar titles. Use a fresh observation before every meaningful action.

Standard Loop

Use this loop unless the user explicitly asks for a single read-only query:

1. mac_control(action="status")
2. mac_control(action="apps", op="frontmost" | "search" | "installed")
3. observe: snapshot / visual.observe / elements.find / windows.list / dock.list / spaces.list / menu.list / menu.popover / dialog.inspect
4. act: apps.activate/launch, dock.launch, spaces.switch, windows.*, act.*, menu.click, dialog.*
5. verify: wait, snapshot, windows.list, or dialog.inspect

For a concrete app workflow:

apps.launch bundleId=...
apps.frontmost                         # verify focus if the next step depends on menus/input
snapshot, elements.find, or windows.list # get fresh window/element ids
act/menu/windows/clipboard/dialog      # one action burst
wait or snapshot                       # verify the expected change

Targeting Rules

  • Prefer bundleId over appName for mutations. Use apps.search / apps.installed when the app name is uncertain, then retry with bundleId.
  • appNameMatch defaults to exact. Use contains only for read-only discovery or when the user clearly gave a partial name.
  • Prefer windowId from the latest windows.list or snapshot for window mutations.
  • target.windowTitleMatch defaults to exact. Use contains only after listing windows and confirming a partial title is intentional.
  • Prefer elementId from the latest snapshot / visual.observe / elements.find for precise clicks and set-value actions, and pass the matching target.snapshotId with it. snapshotId + elementId lets the runtime verify the original AX fingerprint and re-resolve stale el_N ids instead of blindly trusting a new traversal.
  • Use elements.find when a full snapshot is too noisy or when an action target is ambiguous. It is read-only and returns scored candidates with reasons; retry mutations with target.elementId from the chosen candidate plus the result snapshotId.
  • If two windows, dialogs, text fields, or buttons match, do not guess. Use a more specific target or ask the user.
  • Element mutations reject equally ranked AX candidates instead of choosing the first match. When this happens, take a fresh snapshot and retry with elementId, target.windowTitle, target.role, or more specific target.text.

Read the full file on GitHub · 190 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. 10d ago First seen · 190 lines · 139 tokens per session scan A 98843e538b44

Subscribe to this mod's changes

ha-mac-control is a skill published in the GitHub repository shiwenwen/hope-agent (1,576 stars, last pushed yesterday), licensed MIT. It adds 139 tokens to every session and 4,149 once invoked, about $0.0007 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

memory

Use this skill when Pioneer should proactively use durable memory or recalled context: decide whether memory can improve a turn, answer from remembered user/project facts, request memory tools, search/list/get stored memories, save durable preferences or project decisions, forget memories, audit or clean up memory, or…

pioneerdotai/pioneer · 64 tokens

subagents

Use this skill when Pioneer should delegate current-turn work to attached task-backed subagents, coordinate parallel child agents, wait for child results, review/revise/accept/cancel/detach attached work, or synthesize accepted child results into the parent answer.

pioneerdotai/pioneer · 54 tokens

tasks

Use this skill when Pioneer should create, inspect, update, reschedule, pause, resume, troubleshoot, or configure delivery for durable tasks, scheduled tasks, recurring tasks, interval tasks, cron jobs, background work, or existing task state.

pioneerdotai/pioneer · 50 tokens

browser

Headless web browsing: navigation, page inspection, interaction, data extraction, screenshots, PDFs, and browser session management.

pioneerdotai/pioneer · 26 tokens

technology-search

Search tech blogs, developer forums, and IT media (TechCrunch, Hacker News, 36氪, etc.) for software and hardware industry updates with heat ranking and EN↔CN translation. Use this skill only when the topic is clearly about programming, software, hardware, AI, or IT infrastructure.

netease-youdao/LobsterAI · 65 tokens

develop-web-game

Use when Codex is building or iterating on a web game (HTML/JS) and needs a reliable development + testing loop: implement small changes, run a Playwright-based test script with short input bursts and intentional pauses, inspect screenshots/text, and review console errors with rendergametotext.

netease-youdao/LobsterAI · 64 tokens