# macuitest

> Drive and test native macOS applications using the accessibility tree and macuitest CLI.

macuitest is a free AI agent skill on Agensi by Andrii Kislitsyn, in Testing & Debugging. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Andrii Kislitsyn](https://www.agensi.io/creators/andrii-kislitsyn)
- Category: [Testing & Debugging](https://www.agensi.io/skills/testing-debugging)
- Version: 1.0
- Last updated: 2026-11-23
- Security: scan passed (2026-11-23); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/macuitest
- Tags: testing, macos, python, automation, qa

## About this skill

Automating macOS desktop applications often fails when relying on brittle image recognition or coordinate-based clicks that break with theme changes. This skill provides the precise expertise needed to drive Mac apps via the native accessibility tree using the `macuitest` framework.

### What it does
- **UI Inspection** Read the full accessibility tree to identify exact element locators.
- **Reliable Interaction** Use background-aware commands like `press` and `set` that don't require app focus.
- **Test Suite Authoring** Generate reusable screen modules and Python-based UI test suites.
- **Visual Verification** Capture screenshots and perform visible-text matching for elements lacking accessibility labels.
- **State Management** Handle app lifecycles including launching, quitting, and managing modal dialogs.

### How it works
1. **Inspection** Run `macuitest tree <app>` to map the UI and find stable `ax()` locators.
2. **Action Selection** Choose between `press` for background execution or `click` for elements without accessibility actions.
3. **Scripting** Use `macuitest capture` to export locators into a Python module for structured testing.
4. **Validation** Confirm UI changes using `read` or `wait` commands to ensure the application state reached the target.

### Frameworks & tools
Specifically designed for the `macuitest` CLI and Python library (0.11.0+). It requires macOS and interacts with the native Accessibility and Screen Recording APIs.

### Why this beats prompting it yourself
Generic AI models often hallucinate coordinates or suggest Selenium-style commands that don't work on Cocoa apps. This skill understands the specific nuances of the macOS accessibility tree, such as which elements require `click` versus `press` and how to avoid unstable AppKit identifiers.

### Use cases
- Automate repetitive tasks in desktop apps like Calculator, TextEdit, or System Settings.
- Build regression test suites for native macOS software.
- Scrape data from desktop applications that lack a public API.
- Synchronize desktop app states as part of a larger system workflow.

### Known limitations
Requires macOS Accessibility and Screen Recording permissions. Not compatible with web pages or iOS apps. Electron apps provide limited tree visibility and may require image-based fallbacks.

## Requires

- Python

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the macuitest skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does macuitest differ from standard coordinate-based or image-recognition automation?

Unlike image-recognition tools that break with UI updates, this skill uses the macOS Accessibility tree to identify elements by their internal IDs, making your automations significantly more stable and resistant to theme or resolution changes.

### What are the technical requirements to use this skill?

This skill requires a Mac running macOS with the `macuitest` CLI and Python library (v0.11.0+) installed. You will also need to grant Accessibility and Screen Recording permissions in System Settings for the agent to interact with the UI.

### Can this skill interact with macOS applications that are running in the background?

Yes, the skill is specifically designed to use 'background-aware' commands like `press` and `set`, allowing the agent to interact with applications even when they are not the active, front-most window.

### Does it work with non-native applications like those built on Electron?

While the skill excels with native Cocoa and SwiftUI apps, Electron-based apps (like Slack or Discord) often have limited accessibility trees; in these cases, the skill can fall back to its built-in visual verification and text-matching features.

### What is included in the purchase of this skill?

The purchase includes the optimized AI skill logic, documentation for the supported command set, and best-practice templates for generating reusable Python UI test modules.

### Can I use this skill to test web applications or iOS apps?

This skill is intended for automating native macOS desktop software; it is not compatible with web-based testing (like Selenium/Playwright) or mobile iOS applications.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
