alchaincyf/huashu-mac-use

让任何 agent 操控 Mac 上没有 API 的原生 app,读后台、写不打扰、每步留取证 · Agent Skill for macOS computer use

What it solves

This project provides a way for AI coding agents to control macOS applications that lack official APIs. It solves the problem of unreliable, focus-stealing automation by providing a structured, evidence-based approach to interacting with native apps, ensuring that actions are reproducible and do not interrupt the user.

How it works

It uses a tiered "probe-first" strategy to select the most reliable control method for any given app. It attempts to use structural interfaces (like CLI, AppleScript, or local ports) first, falling back to accessibility trees, window coordinates, or pixel-based interaction only when necessary. It prioritizes background operations—such as taking screenshots or reading data—without stealing focus or cutting across desktops. When physical input is required, it passes events directly to the target process and verifies the outcome through a ladder of checks, ranging from tool confirmation to observing actual app state changes.

Who it’s for

It is designed for developers and power users who use AI coding agents (such as Claude Code, Cursor, or Kimi Code) and want to automate tasks within macOS desktop applications—like Blender, WPS, or system settings—without manual intervention or disruptive focus-switching.

Highlights

  • Multi-Layer Control: Automatically selects the best channel (CDP, accessibility tree, or coordinate-based) based on the app's architecture.
  • Non-Intrusive: Uses background screenshots and direct event injection to avoid stealing focus or interrupting the user.
  • Evidence-Based: Every action is verified through a multi-step process, reporting whether the effect was confirmed, partial, or unverified.
  • Cross-Tool Integration: Delegates same-desktop widget operations to Vercel Labs' agent-desktop while handling complex tasks like cross-desktop control and evidence logging.
  • Safety Gates: Includes built-in checks for user presence and window occlusion to ensure the agent only acts when it is safe to do so.

Related

  • Project
  • Project
  • Project
  • Project
  • Project