一键导入
axe-simulator-control
Automate iOS Simulator interactions using AXe for taps, gestures, text input, hardware buttons, and video recording
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Automate iOS Simulator interactions using AXe for taps, gestures, text input, hardware buttons, and video recording
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run an ASO audit on canonical App Store metadata under `./metadata`, then a krankie-based competitor keyword-gap analysis (no Astro subscription). Krankie replacement for asc-aso-audit. Use after `asc metadata pull`.
Pull VivaDicta App Store keyword rankings via krankie (free, self-hosted), compare against the previous check, and write a dated rankings report to the Obsidian vault. Krankie-based replacement for asc-aso-rankings (no Astro subscription required).
Prepare a new VivaDicta release — version bump, What's New screen, App Store metadata, code sweep, and pre-submission checklist
Measure VivaDicta test code coverage from the terminal. Use when asked what the test coverage is, a module's or the whole-app coverage %, which lines/files are covered, to get coverage without opening Xcode, or to see coverage after writing tests. Covers both the fast per-SPM-module path (swift test + llvm-cov) and the canonical whole-app path (xcodebuild + xccov), and which first-party targets count.
Count Swift lines of code across the VivaDicta codebase and refresh the production-vs-test history chart. Use when asked how many LOC / lines of code the project has, for a codebase-size or LOC breakdown by SPM module / main app / extension, how big a module or extension is, the prod-vs-test ratio, or to update / regenerate the LOC growth chart embedded in documentation/Module-Architecture.md.
Writes, reviews, and improves Swift Testing code using modern APIs and best practices. Use when reading, writing, or reviewing projects that use Swift Testing.
| name | axe-simulator-control |
| description | Automate iOS Simulator interactions using AXe for taps, gestures, text input, hardware buttons, and video recording |
Use this skill when you need to automate iOS Simulator interactions, including taps, gestures, text input, hardware buttons, or video recording.
xcodebuild-testing for running tests that might require simulator interactionsscreenshot for capturing screenshots from the simulatorbrew tap cameroncooke/axe && brew install axeaxe list-simulators to find it)iPhone 17 Pro Max, OS=26.4llmtemp/screenshots/ directory for temporary test artifactsTouch/Tap Actions if:
→ Continue with Path A: Touch & Tap (steps 2A-4A)
Text Input if:
→ Continue with Path B: Text Input (step 2B)
Gestures if:
→ Continue with Path C: Gestures (steps 2C-3C)
Hardware Buttons if:
→ Continue with Path D: Hardware Buttons (steps 2D-3D)
Video Operations if:
→ Continue with Path E: Video Operations (steps 2E-3E)
List Simulators if:
→ Continue with Path F: List Simulators (step 2F)
# List available simulators
axe list-simulators
# Store the UDID for the target simulator
UDID="B34FF305-5EA8-412B-943F-1D0371CA17FF"
IMPORTANT: Always use axe describe-ui to get accurate coordinates instead of guessing from screenshots.
# Get the full UI accessibility tree
axe describe-ui --udid $UDID > ui_tree.json
# Example output for a button:
# {
# "AXFrame" : "{{175, 741}, {52, 50}}",
# "AXLabel" : "stop.circle.fill",
# "type" : "Button",
# ...
# }
# Calculate center coordinates:
# x_center = x + (width / 2) → 175 + (52 / 2) = 201
# y_center = y + (height / 2) → 741 + (50 / 2) = 766
Why this matters:
# Simple tap at coordinates (use coordinates from describe-ui)
axe tap -x 201 -y 766 --udid $UDID
# Tap with delays before and after
axe tap -x 201 -y 766 --pre-delay 1.0 --post-delay 0.5 --udid $UDID
Available tap options:
-x and -y: Coordinates (required) - get these from describe-ui output--pre-delay: Delay in seconds before tapping--post-delay: Delay in seconds after tapping--udid: Simulator UDID (required)Note: The tap command does NOT support --duration for long press. Use --pre-delay and --post-delay for timing control.
describe-ui, not visual estimates# Get simulator UDID first
UDID="B34FF305-5EA8-412B-943F-1D0371CA17FF"
# Type text (ensure a text field is focused first)
axe type 'Hello World!' --udid $UDID
# Type text with special characters (use single quotes)
axe type 'user@example.com' --udid $UDID
Notes:
Available gestures:
scroll-up / scroll-down / scroll-left / scroll-rightswipe-from-left-edge / swipe-from-right-edgeswipe-from-top-edge / swipe-from-bottom-edge# Get simulator UDID first
UDID="B34FF305-5EA8-412B-943F-1D0371CA17FF"
# Perform scroll gesture
axe gesture scroll-up --udid $UDID
# Perform edge swipe (for navigation)
axe gesture swipe-from-left-edge --udid $UDID
# Perform swipe gesture
axe gesture swipe-from-bottom-edge --udid $UDID
Available buttons:
home - Press home buttonlock - Press lock/power buttonvolume-up / volume-downsiri - Activate Siri# Get simulator UDID first
UDID="B34FF305-5EA8-412B-943F-1D0371CA17FF"
# Press home button
axe button home --udid $UDID
# Press lock button with custom duration
axe button lock --duration 2.0 --udid $UDID
# Press volume up
axe button volume-up --udid $UDID
Notes:
Stream Video if:
Record Video if:
Stream Video:
UDID="B34FF305-5EA8-412B-943F-1D0371CA17FF"
# Stream at 10 FPS in MJPEG format
axe stream-video --udid $UDID --fps 10 --format mjpeg > stream.mjpeg
Record Video:
UDID="B34FF305-5EA8-412B-943F-1D0371CA17FF"
# Record at 15 FPS and save to file
axe record-video --udid $UDID --fps 15 --output recording.mp4
# Stop recording with Ctrl+C
# List all available simulators with their UDIDs
axe list-simulators
# Example output:
# iPhone 17 Pro Max (26.0) - B34FF305-5EA8-412B-943F-1D0371CA17FF
# iPhone 16 (25.0) - A12BC456-7DEF-89GH-IJKL-MNOPQRSTUVWX
Notes:
xcrun simctl list for more detailed simulator information# 1. Get the simulator UDID
UDID=$(axe list-simulators | grep "iPhone 17 Pro Max" | awk '{print $NF}')
# 2. Tap to focus text field
axe tap -x 200 -y 300 --udid $UDID
# 3. Type text
axe type 'test@example.com' --udid $UDID
# 4. Tap submit button
axe tap -x 200 -y 400 --udid $UDID
# 5. Wait and verify (app-specific)
# 1. Get simulator UDID
UDID="B34FF305-5EA8-412B-943F-1D0371CA17FF"
# 2. Start recording
axe record-video --udid $UDID --fps 30 --output demo.mp4 &
RECORD_PID=$!
# 3. Perform actions
axe tap -x 100 -y 200 --udid $UDID
sleep 1
axe gesture scroll-up --udid $UDID
sleep 1
axe button home --udid $UDID
# 4. Stop recording
kill $RECORD_PID
Issue: SwiftUI's modern TabView component (iOS 18+) doesn't expose individual tab buttons in the accessibility hierarchy.
What you'll see:
axe describe-ui shows the tab bar as a single AXGroup with no childrenExample:
{
"AXFrame" : "{{0, 791}, {402, 83}}",
"AXLabel" : "Tab Bar",
"type" : "Group",
"children" : [] // ← No individual tab buttons exposed
}
✅ However, tab navigation DOES work with calculated coordinates!
Even though tab buttons aren't in the accessibility tree, you can still tap them using estimated positions within the Tab Bar frame:
# Tab Bar frame: x: 0, y: 791, width: 402, height: 83
# Calculate y-center: 791 + (83/2) = 832
# For a 3-tab layout (Record, Notes, Settings):
UDID="D28078F6-0BE9-4EB8-BEBE-BF8EBEA5CA75"
# Tap Record tab (left third)
axe tap -x 103 -y 832 --udid $UDID # x ≈ 402 * 1/4
# Tap Notes tab (center)
axe tap -x 201 -y 832 --udid $UDID # x ≈ 402 * 1/2
# Tap Settings tab (right third)
axe tap -x 268 -y 832 --udid $UDID # x ≈ 402 * 2/3
Key insight: The Tab Bar frame tells you the tappable area. Calculate positions by:
y + (height / 2)Alternative workarounds:
Some SwiftUI components may have limited accessibility exposure. Always use axe describe-ui to verify an element is accessible before attempting to interact with it.
"Simulator not found" error:
xcrun simctl list | grep Bootedaxe list-simulatorsTap not registering:
axe describe-ui to get accurate coordinates (don't guess from screenshots)describe-uiText not appearing:
Video recording issues: