Agent skill

axe

Control iOS Simulators via accessibility APIs. Use this skill when the user wants to automate iOS simulator interactions, tap buttons by accessibility label, type text, swipe, take screenshots, describe the UI accessibility tree, or test iOS apps programmatically.

Stars 3
Forks 1

Install this agent skill to your Project

npx add-skill https://github.com/aliceisjustplaying/claude-resources-monorepo/tree/main/skills/axe

SKILL.md

axe - iOS Simulator Accessibility Control

Control iOS Simulators using accessibility APIs for UI automation and testing.

Prerequisites

  • Xcode with iOS Simulator
  • axe CLI in PATH

Getting Simulator UDID

Always use explicit UDIDs when multiple simulators might be running:

bash
# List available simulators
xcrun simctl list devices available

# List only booted simulators
xcrun simctl list devices booted

# Boot a simulator
xcrun simctl boot "iPhone 17 Pro"

# Shutdown
xcrun simctl shutdown booted
xcrun simctl shutdown <UDID>

axe Commands

Describe UI (Accessibility Tree)

Get the full accessibility tree to find elements:

bash
axe describe-ui --udid <UDID>

Tap Elements

bash
# By accessibility label (preferred)
axe tap --udid <UDID> --label "Button Label"

# By accessibility identifier
axe tap --udid <UDID> --id "buttonIdentifier"

# By coordinates (fallback, e.g., for tab bars)
axe tap --udid <UDID> -x 352 -y 832

Type Text

bash
axe type --udid <UDID> --text "Hello world"

Swipe

IMPORTANT: Uses --start-x/--start-y/--end-x/--end-y, NOT --from-x/--to-x:

bash
# Swipe up (scroll down)
axe swipe --udid <UDID> --start-x 200 --start-y 600 --end-x 200 --end-y 300

# Swipe down (scroll up)
axe swipe --udid <UDID> --start-x 200 --start-y 300 --end-x 200 --end-y 600

Hardware Buttons

bash
axe button --udid <UDID> --name home
axe button --udid <UDID> --name lock

Screenshots (via simctl)

bash
xcrun simctl io booted screenshot /tmp/screenshot.png
xcrun simctl io <UDID> screenshot /tmp/screenshot.png

Common Gotchas

axe swipe parameters

Use --start-x/--start-y/--end-x/--end-y, NOT --from-x/--to-x. This is a common mistake.

simctl has no input command

xcrun simctl io only supports screenshot and recordVideo. For touch/swipe input, use axe.

Sheet/modal timing

When opening a sheet and immediately tapping a button inside, add sleep 0.5 between actions. The sheet needs time to fully present before buttons are tappable.

Multiple simulators

Always use explicit UDID, not "booted", when multiple simulators are running. Check with xcrun simctl list devices booted.

iOS 26+ Toggle issues

axe taps don't reliably trigger SwiftUI Toggle actions on iOS 26+. Manual testing may be required for toggle interactions.

Entitlements require signing

CODE_SIGNING_ALLOWED=NO prevents entitlements (like HealthKit) from being applied. Use ad-hoc signing for entitlement-dependent features.

Empty accessibility tree

If axe describe-ui returns an empty tree (frame {0,0,0,0}, no children) even though the app is visibly running, the simulator has entered a bad state. Fix by rebooting:

bash
xcrun simctl shutdown <UDID> && xcrun simctl boot <UDID>

This is not an app code issue.

Tab bar items

Tab bar items often require coordinates instead of labels. Use axe describe-ui to find element frames, then tap by coordinates. Tab bars are typically around y~832 on standard iPhone sizes.

Recommended Workflow

  • Run xcrun simctl list devices booted to get the UDID
  • Use axe describe-ui --udid <UDID> to explore the accessibility tree
  • Prefer --label for tapping when possible (more resilient to layout changes)
  • Fall back to coordinates for elements without accessible labels
  • Add sleep 0.5 between actions that trigger animations/transitions
  • Take screenshots with xcrun simctl io to verify state

Expand your agent's capabilities with these related and highly-rated skills.

aliceisjustplaying/claude-resources-monorepo

epub

Read and extract content from EPUB ebook files. Use this skill when the user wants to read an EPUB file, extract text from an ebook, view EPUB metadata (title, author), list chapters or table of contents, search within EPUB content, or analyze ebook content.

3 1
Explore
aliceisjustplaying/claude-resources-monorepo

pdf-to-markdown

Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.

3 1
Explore
mattpocock/skills

handoff

Compact the current conversation into a handoff document for another agent to pick up.

111,310 9,758
Explore
mattpocock/skills

edit-article

Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.

111,310 9,758
Explore
mattpocock/skills

obsidian-vault

Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.

111,310 9,758
Explore
mattpocock/skills

scaffold-exercises

Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.

111,310 9,758
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results