/axe:axefrom AXe
Operates iOS app UI on simulators and physical devices via AXe CLI. Captures screens, taps, types, swipes, and batches actions for testing or validation.
Ships in AXe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use agent mode (--agent) for every app read and input. An agent call checks the target is still the control you saw, sends the input and returns the settled screen; if the screen changed, it sends nothing. The same commands without --agent are for scripts written by people: no target check, no returned screen. Never add sleep, --pre-delay or --post-delay.
axe describe-ui --help | grep -- --agent
brew install cameroncooke/axe/axe.--agent (older than AXe 2.0): brew upgrade cameroncooke/axe/axe.axe list-simulators
axe describe-ui --agent --view navigation --udid <UDID>
data.capture has a snapshotID and rows ref|actions|role|label|value, for example e12|tap|button|Save|.tap, typeText, swipe, sliderEndpoint, pinchWithin.--view navigation: controls and values, for operating the app. --view reading (default): adds visible text, for reading or verifying. --view full: complete schema with IDs; large, rarely needed.--view works on describe-ui, tap, type, swipe and batch. Put --view reading on the action whose result you will check instead of reading again.axe tap --agent --view navigation --udid <UDID> --snapshot-id <SNAPSHOT_ID> --ref e12
data.capture with a new snapshotID. Plan the next action from it; do not run describe-ui to see the result.data.cache.requiresRefresh is true, or you need rows it does not show (Step 6).Every call costs a turn, so batch. When you have decided two or more taps or types on controls in the current capture and need not look between them (form fields, several switches, options in a settings sheet, several list items), send one batch:
axe batch --agent --view navigation --udid <UDID> --steps-json '{"snapshotID":"<SNAPSHOT_ID>","steps":[{"action":"type","ref":"e7","text":"Ada","focus":true},{"action":"type","ref":"e9","text":"Lovelace","focus":true},{"action":"tap","ref":"e12"}]}'
tap or type steps, all refs from that snapshot."focus": true taps a type step's field first, as type --focus does; its ref is the field row that advertises tap. Without it, the field must already be focused and advertise typeText.axe type 'London' --agent --view navigation --focus --udid <UDID> --snapshot-id <SNAPSHOT_ID> --ref e7
--focus taps the field, checks it took focus and types. Without it, the field must already be focused. Several fields on one screen: one batch of focus steps.key 40, key 42, key-sequence --keycodes ... or key-combo, with --agent --snapshot-id <SNAPSHOT_ID> --ref <FIELD_REF>. Codes: cli-quick-reference.md.swipe (also listed under capture.areas): axe swipe --agent --view navigation --udid <UDID> --snapshot-id <SNAPSHOT_ID> --ref e30 --direction up --distance 0.6. Direction is finger motion, so up reveals content below. Swipe the innermost scroll area that holds the target.capture.page.nextOffset is present: axe describe-ui --agent --view <VIEW> --snapshot-id <SNAPSHOT_ID> --row-offset <NEXT_OFFSET> --udid <UDID>. Copy the offset; never compute it. No nextOffset means no more rows.axe describe-ui --agent --snapshot-id <SNAPSHOT_ID> --read-ref e12 --text-field label --udid <UDID>; --text-field also takes value and id.axe describe-ui --agent --view reading --snapshot-id <SNAPSHOT_ID> --row-offset 0 --udid <UDID>.axe describe-ui --agent --since-screen-hash <SCREEN_HASH> --udid <UDID> returns unchanged: true while the screen matches that capture's screenHash.axe tap --agent --view navigation --udid <UDID> --label 'Save' --element-type Button.--id, --label or --value, or --label-contains and --label-regex '^(Save|Done)$', narrowed with --element-type and --frame 'minY=400'. A selector must match exactly one control. Use only IDs and labels seen in a capture.A refusal sent nothing: the reply has no action, or action.outcome is failedBeforeInput with enqueuedEventCount: 0. Plan from the capture it usually carries. If the screen or target changed but it is still the same control, AXe already re-read and retried (action.retried: true); targetCovered and busy are not retried. The identical command gets the same answer, so change something first:
screenChanged, targetChanged, snapshotMissing, unsupportedReference: use refs from the returned capture, or capture again.keyboardCovered: a tap would press a key. Scroll the control above the keyboard (the message names the scroll area) or dismiss the keyboard with the app's control for that. Never use the form's Cancel, Close or Done to hide it.targetCovered: an overlay or a presenting sheet is in the way; find it in the capture.busy: act again from a current capture once the other input has finished.targetMissing: the selector matched none or several; narrow it or use a ref.Also:
describe-ui before tapping.failedNoReplay, a lost reply, or a batch that stopped after completed steps. Read the screen and decide from what happened.describe-ui and screenshots only, no taps.axe screenshot --udid <UDID> --output shot.png, then open the PNG.For a visible control with no usable ref or selector, such as a custom-drawn view:
axe tap --agent --udid <UDID> --snapshot-id <SNAPSHOT_ID> -x 201 -y 640
capture.screen is [screenID, width, height, rotation]. Measure from a fresh screenshot of the same screen; capture and screenshot again after any layout change.--start-x, --start-y, --end-x and --end-y with --agent --snapshot-id.axe draw 100,400 300,400 300,600 --close --udid <UDID>) and pinching where no row advertises pinchWithin (axe gesture pinch --scale 2 --udid <UDID>; --scale 0.5 zooms out). They return no capture, so capture again. See cli-quick-reference.md.Each takes --agent --udid <UDID> --snapshot-id <SNAPSHOT_ID> --ref <REF>:
slider --endpoint minimum or maximum, on sliderEndpoint rows. Percentages: slider-reference.md.touch --down --up --delay 0.7.drag --end-x <X> --end-y <Y>.gesture double-tap. Pinch: gesture pinch --radius 24 --scale 1.5, on pinchWithin rows.Agent mode covers app reads and input on every simulator, including the iPhone Duo.
| Open when you need to... | Read |
|---|---|
| check exact agent limits, receipts, output fields or refusal codes | agent-reference.md |
| check the full batch contract | batch-reference.md |
| set a slider to a percentage | slider-reference.md |
| work on a physical iPhone or iPad (no agent mode) | physical-device-reference.md |
| use iPhone Duo screens, hinge and rotation, or pin capture or input to one display | device-reference.md |
| set dark mode, text size, accessibility display settings, VoiceOver, location or status bar | settings-reference.md |
run a command with no UI target (list-simulators, displays, screenshot, button, shutdown) or a gesture with no agent form | cli-quick-reference.md |
| record or stream video | recording-reference.md |
| stage text on the clipboard | clipboard-reference.md |
references/agent-reference.md (opens in a new tab)references/batch-reference.md (opens in a new tab)references/cli-quick-reference.md (opens in a new tab)references/clipboard-reference.md (opens in a new tab)references/device-reference.md (opens in a new tab)references/physical-device-reference.md (opens in a new tab)references/recording-reference.md (opens in a new tab)references/settings-reference.md (opens in a new tab)references/slider-reference.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub cameroncooke/axe --plugin axeOther plugins' skills for the same job