macpilot-ui-inspector
Inspect and interact with macOS UI elements using MacPilot accessibility APIs. Find buttons, text fields, labels, and other elements by role, label, or position, then click, read, or modify them.
Best use case
macpilot-ui-inspector is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Inspect and interact with macOS UI elements using MacPilot accessibility APIs. Find buttons, text fields, labels, and other elements by role, label, or position, then click, read, or modify them.
Teams using macpilot-ui-inspector should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/macpilot-ui-inspector/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How macpilot-ui-inspector Compares
| Feature / Agent | macpilot-ui-inspector | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Inspect and interact with macOS UI elements using MacPilot accessibility APIs. Find buttons, text fields, labels, and other elements by role, label, or position, then click, read, or modify them.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
SKILL.md Source
# MacPilot UI Inspector
Use MacPilot's accessibility (AX) commands to inspect, find, and interact with UI elements in any macOS application. This skill enables precise programmatic control of app interfaces.
## When to Use
Use this skill when the user asks to:
- Find a specific button, text field, checkbox, or UI element in an app
- Read the value or state of a UI control
- Click a button or interact with a control by its label
- Inspect the full UI hierarchy/accessibility tree of an app
- Set values in text fields or toggle checkboxes programmatically
- Discover what keyboard shortcuts an app supports
- Identify elements at specific screen coordinates
## Commands
### List UI Elements
```bash
macpilot ui list --app "Safari" --json # All elements
macpilot ui list --app "Safari" --role AXButton --json # Only buttons
macpilot ui list --app "Safari" --depth 5 --json # Deeper scan
macpilot ui list --app "Safari" --hierarchy --json # With hierarchy
```
### Find Elements by Text
```bash
macpilot ui find "Save" --app "TextEdit" --json # Find by label
macpilot ui find "Save" --role AXButton --json # Filter by role
macpilot ui find "Save" --exact --json # Exact match only
```
### Find Element with Coordinates
```bash
macpilot ui find-text "Submit" --app "Safari" --json
# Returns: position {x, y}, size {w, h} - use for clicking
```
### Click UI Element by Label
```bash
macpilot ui click "Save" --app "TextEdit" --json
macpilot ui click "Cancel" --role AXButton --json
```
### Get/Set Values
```bash
macpilot ui get-value "Search" --app "Safari" --json # Read field value
macpilot ui set-value "Search" "query text" --app "Safari" # Set field value
macpilot ui set-value "Dark Mode" "1" --role AXCheckBox # Toggle checkbox
```
### Set Focus
```bash
macpilot ui set-focus "Search" --app "Safari" --json # Focus an element
```
### Scroll Within Elements
```bash
macpilot ui scroll "content" down 5 --app "Safari" # Scroll element
```
### Inspect Element Attributes
```bash
macpilot ui attributes "Save" --app "TextEdit" --json # All AX attributes
```
### Elements at Coordinates
```bash
macpilot ui elements-at 500 300 --json # What's at x=500 y=300
macpilot ui elements-at 500 300 --radius 50 --json # Search wider area
```
### Accessibility Tree
```bash
macpilot ui tree --app "Finder" --json # Full AX tree
macpilot ui tree --app "Finder" --depth 3 --json # Limit depth
```
### Keyboard Shortcuts
```bash
macpilot ui shortcuts --app "Safari" --json # All shortcuts
macpilot ui shortcuts --app "Safari" --menu File --json # Menu-specific
```
### Wait for Elements
```bash
macpilot wait element "Download Complete" --app "Safari" --timeout 30 --json
```
## Common AX Roles
| Role | Description |
|------|-------------|
| `AXButton` | Buttons (push, toggle) |
| `AXTextField` | Text input fields |
| `AXTextArea` | Multi-line text areas |
| `AXStaticText` | Labels and display text |
| `AXCheckBox` | Checkboxes and toggles |
| `AXRadioButton` | Radio buttons |
| `AXPopUpButton` | Dropdown menus |
| `AXComboBox` | Combo boxes |
| `AXTable` | Tables and lists |
| `AXRow` | Table/list rows |
| `AXMenuItem` | Menu items |
| `AXToolbar` | Toolbars |
| `AXScrollArea` | Scrollable regions |
| `AXWindow` | Windows |
| `AXSheet` | Modal sheets |
| `AXImage` | Images |
| `AXLink` | Hyperlinks |
| `AXGroup` | Generic container |
## Workflow Patterns
### Pattern 1: Find and Click
```bash
# Always focus app first
macpilot app focus "Safari"
# Find the element to verify it exists
macpilot ui find "Downloads" --app "Safari" --role AXButton --json
# Click it
macpilot ui click "Downloads" --app "Safari"
```
### Pattern 2: Read Form State
```bash
macpilot app focus "System Settings"
macpilot ui get-value "Computer Name" --app "System Settings" --json
```
### Pattern 3: Fill a Form
```bash
macpilot app focus "MyApp"
macpilot ui set-value "Name" "John Doe" --app "MyApp"
macpilot ui set-value "Email" "john@example.com" --app "MyApp"
macpilot ui click "Submit" --app "MyApp"
```
### Pattern 4: Explore Unknown UI
```bash
# Start with a broad scan
macpilot ui tree --app "SomeApp" --depth 2 --json
# Narrow down to specific elements
macpilot ui list --app "SomeApp" --role AXButton --json
# Inspect a specific element
macpilot ui attributes "Settings" --app "SomeApp" --json
```
### Pattern 5: Click by Coordinates (Fallback)
```bash
# When label-based clicking fails, find coordinates first
macpilot ui find-text "Submit" --app "MyApp" --json
# Use returned x,y to click
macpilot click 450 320
```
## Tips
- Always call `macpilot app focus` before any UI interaction
- Use `--json` output for reliable parsing of element properties
- When `ui click` fails, fall back to `ui find-text` + `macpilot click x y`
- Use `ui tree --depth 2` first to understand app structure before deep scans
- AX permission must be granted to MacPilot.app in System Settings
- The `--role` filter significantly speeds up element searches in complex appsRelated Skills
prompt-inspector
Detect prompt injection attacks and adversarial inputs in user text before passing it to your LLM. Use when you need to validate or screen user-provided text for jailbreak attempts, instruction overrides, role-play escapes, or other prompt manipulation techniques. Returns a safety verdict, risk score (0–1), and threat categories. Ideal for guarding AI pipelines, chatbots, and any application that feeds user input into a language model.
macpilot-window-manager
Manage macOS windows with MacPilot. List, move, resize, snap, minimize, fullscreen, and arrange application windows. Supports multi-display and Spaces.
macpilot-screenshot-ocr
Capture screenshots and extract text via OCR using MacPilot. Take full-screen, region, or window screenshots, and recognize text in images or screen areas with multi-language support.
macpilot-dialog-handler
Handle macOS file dialogs (Open, Save, Print) with MacPilot. Navigate folders, select files, set filenames, and dismiss dialogs programmatically in any application.
macpilot-automation
Core macOS automation skill using MacPilot CLI. Enables Claude Code to control apps, type text, click elements, run shell commands, and automate workflows on macOS via the `macpilot` command.
MacPilot Skills
Agent skills for [MacPilot](https://github.com/adhikjoshi/macpilot) — a CLI tool for macOS automation via Accessibility APIs.
---
name: article-factory-wechat
humanizer
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.
obsidian
Work with Obsidian vaults (plain Markdown notes) and automate via notesmd-cli.
find-skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
tavily-search
Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.
baidu-search
Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.