macuitest

    by Andrii Kislitsyn

    1

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

    Free

    Security scanned

    Works with the AI Agents you already use

    macuitest

    Example session with this skill installed

    I need to automate the macOS Calculator. Can you show me how to read the tree and press the '7' button using macuitest?

    • Read your context and instructions
    • Compiled the macuitest

    I will inspect the Calculator's UI tree to find the stable locator for the '7' button and then provide the command to interact with it.

    macOS Calculator Automation

    To automate the Calculator, we first need to map the accessibility tree to identify the correct identifiers. Note that the Calculator window may need to be active to see all elements.

    StepCommandPurpose
    1. Launchmacuitest launch CalculatorEnsures the application is running and in the foreground.
    2. Inspectmacuitest tree Calculator --activatePrints the UI tree with ax() locators for every button.
    3. Interactmacuitest press Calculator 'ax(identifier="Seven", kind=Button)'Sends a native press action to the '7' button.
    4. Verifymacuitest read Calculator 'ax(identifier="display", kind=StaticText)'Confirms the result appears in the display area.

    Python Implementation

    If you are building a reusable script, you can use the following structure:

    from macuitest import App
    
    calc = App("Calculator")
    calc.launch()
    
    # Using the locator identified from the tree command
    seven_button = 'ax(identifier="Seven", kind=Button)'
    calc.press(seven_button)
    
    # Wait for the display to update
    calc.wait('ax(value="7", kind=StaticText)', timeout=2)
    print("Successfully pressed 7")
    

    Next steps

    1. Run macuitest tree Calculator in your terminal to verify your specific macOS version uses the "Seven" identifier.
    2. Grant Accessibility permissions to your terminal or IDE in System Settings.
    3. Use macuitest capture Calculator --out calc_screen.py to generate a page object module.

    Connects securely to your tools. The creator never sees your data.

    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.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 11 days ago

    • Free with an Agensi account

    Software
    Python

    Permissions

    Browser
    Read Files
    Listed11 days ago

    What's inside

    Frequently Asked Questions

    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.

    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.

    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.

    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.

    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.

    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.

    New in Testing & Debugging

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.

    Free