iOS Simulator Skill
Build, test, and automate iOS applications using accessibility-driven navigation and structured data instead of pixel coordinates.
Quick Start
# 1. Check environment
bash scripts/sim_health_check.sh
# 2. Launch app
python scripts/app_launcher.py --launch com.example.app
# 3. Map screen to see elements
python scripts/screen_mapper.py
# 4. Tap button
python scripts/navigator.py --find-text "Login" --tap
# 5. Enter text
python scripts/navigator.py --find-type TextField --enter-text "user@example.com"
All scripts support --help for detailed options and --json for machine-readable output.
21 Production Scripts
Build & Development (2 scripts)
build_and_test.py - Build Xcode projects, run tests, parse results with progressive disclosure
- Build with live result streaming
- Parse errors and warnings from xcresult bundles
- Retrieve detailed build logs on demand
- Options:
--project, --scheme, --clean, --test, --verbose, --json
log_monitor.py - Real-time log monitoring with intelligent filtering
- Stream logs or capture by duration
- Filter by severity (error/warning/info/debug)
- Deduplicate repeated messages
- Options:
--app, --severity, --follow, --duration, --output, --json
Navigation & Interaction (5 scripts)
screen_mapper.py - Analyze current screen and list interactive elements
- Element type breakdown
- Interactive button list
- Text field status
- Options:
--verbose, --hints, --json
navigator.py - Find and interact with elements semantically
- Find by text (fuzzy matching)
- Find by element type
- Find by accessibility ID
- Enter text or tap elements
- Options:
--find-text, --find-type, --find-id, --tap, --enter-text, --json
gesture.py - Perform swipes, scrolls, pinches, and complex gestures
- Directional swipes (up/down/left/right)
- Multi-swipe scrolling
- Pinch zoom
- Long press
- Pull to refresh
- Options:
--swipe, --scroll, --pinch, --long-press, --refresh, --json
keyboard.py - Text input and hardware button control
- Type text (fast or slow)
- Special keys (return, delete, tab, space, arrows)
- Hardware buttons (home, lock, volume, screenshot)
- Key combinations
- Options:
--type, --key, --button, --slow, --clear, --dismiss, --json
app_launcher.py - App lifecycle management
- Launch apps by bundle ID
- Terminate apps
- Install/uninstall from .app bundles
- Deep link navigation
- List installed apps
- Check app state
- Options:
--launch, --terminate, --install, --uninstall, --open-url, --list, --state, --json
Testing & Analysis (5 scripts)
accessibility_audit.py - Check WCAG compliance on current screen
- Critical issues (missing labels, empty buttons, no alt text)
- Warnings (missing hints, small touch targets)
- Info (missing IDs, deep nesting)
- Options:
--verbose, --output, --json
visual_diff.py - Compare two screenshots for visual changes
- Pixel-by-pixel comparison
- Threshold-based pass/fail
- Generate diff images
- Options:
--threshold, --output, --details, --json
test_recorder.py - Automatically document test execution
- Capture screenshots and accessibility trees per step
- Generate markdown reports with timing data
- Options:
--test-name, --output, --verbose, --json
app_state_capture.py - Create comprehensive debugging snapshots
- Screenshot, UI hierarchy, app logs, device info
- Markdown summary for bug reports
- Options:
--app-bundle-id, --output, --log-lines, --json
sim_health_check.sh - Verify environment is properly configured
- Check macOS, Xcode, simctl, IDB, Python
- List available and booted simulators
- Verify Python packages (Pillow)
Advanced Testing & Permissions (4 scripts)
clipboard.py - Manage simulator clipboard for paste testing
- Copy text to clipboard
- Test paste flows without manual entry
- Options:
--copy, --test-name, --expected, --json
status_bar.py - Override simulator status bar appearance
- Presets: clean (9:41, 100% battery), testing (11:11, 50%), low-battery (20%), airplane (offline)
- Custom time, network, battery, WiFi settings
- Options:
--preset, --time, --data-network, --battery-level, --clear, --json
push_notification.py - Send simulated push notifications
- Simple mode (title + body + badge)
- Custom JSON payloads
- Test notification handling and deep links
- Options:
--bundle-id, --title, --body, --badge, --payload, --json
privacy_manager.py - Grant, revoke, and reset app permissions
- 13 supported services (camera, microphone, location, contacts, photos, calendar, health, etc.)
- Batch operations (comma-separated services)
- Audit trail with test scenario tracking
- Options:
--bundle-id, --grant, --revoke, --reset, --list, --json
Device Lifecycle Management (5 scripts)
simctl_boot.py - Boot simulators with optional readiness verification
- Boot by UDID or device name
- Wait for device ready with timeout
- Batch boot operations (--all, --type)
- Performance timing
- Options:
--udid, --name, --wait-ready, --timeout, --all, --type, --json
simctl_shutdown.py - Gracefully shutdown simulators
- Shutdown by UDID or device name
- Optional verification of shutdown completion
- Batch shutdown operations
- Options:
--udid, --name, --verify, --timeout, --all, --type, --json
simctl_create.py - Create simulators dynamically
- Create by device type and iOS version
- List available device types and runtimes
- Custom device naming
- Returns UDID for CI/CD integration
- Options:
--device, --runtime, --name, --list-devices, --list-runtimes, --json
simctl_delete.py - Permanently delete simulators
- Delete by UDID or device name
- Safety confirmation by default (skip with --yes)
- Batch delete operations
- Smart deletion (--old N to keep N per device type)
- Options:
--udid, --name, --yes, --all, --type, --old, --json
simctl_erase.py - Factory reset simulators without deletion
- Preserve device UUID (faster than delete+create)
- Erase all, by type, or booted simulators
- Optional verification
- Options:
--udid, --name, --verify, --timeout, --all, --type, --booted, --json
Common Patterns
Auto-UDID Detection: Most scripts auto-detect the booted simulator if --udid is not provided.
Device Name Resolution: Use device names (e.g., "iPhone 16 Pro") instead of UDIDs - scripts resolve automatically.
Batch Operations: Many scripts support --all for all simulators or --type iPhone for device type filtering.
Output Formats: Default is concise human-readable output. Use --json for machine-readable output in CI/CD.
Help: All scripts support --help for detailed options and examples.
Typical Workflow
- Verify environment:
bash scripts/sim_health_check.sh
- Launch app:
python scripts/app_launcher.py --launch com.example.app
- Analyze screen:
python scripts/screen_mapper.py
- Interact:
python scripts/navigator.py --find-text "Button" --tap
- Verify:
python scripts/accessibility_audit.py
- Debug if needed:
python scripts/app_state_capture.py --app-bundle-id com.example.app
Requirements
- macOS 12+
- Xcode Command Line Tools
- Python 3
- IDB (optional, for interactive features)
Documentation
- SKILL.md (this file) - Script reference and quick start
- README.md - Installation and examples
- CLAUDE.md - Architecture and implementation details
- references/ - Deep documentation on specific topics
- examples/ - Complete automation workflows
Key Design Principles
Semantic Navigation: Find elements by meaning (text, type, ID) not pixel coordinates. Survives UI changes.
Token Efficiency: Concise default output (3-5 lines) with optional verbose and JSON modes for detailed results.
Accessibility-First: Built on standard accessibility APIs for reliability and compatibility.
Zero Configuration: Works immediately on any macOS with Xcode. No setup required.
Structured Data: Scripts output JSON or formatted text, not raw logs. Easy to parse and integrate.
Auto-Learning: Build system remembers your device preference. Configuration stored per-project.
Use these scripts directly or let Claude Code invoke them automatically when your request matches the skill description.
Technique Map
- Identify scope — Determine what the skill applies to before executing.
- Follow workflow — Use documented steps; avoid ad-hoc shortcuts.
- Verify outputs — Check results match expected contract.
- Handle errors — Graceful degradation when dependencies missing.
- Reference docs — Load references/ when detail needed.
- Preserve state — Don't overwrite user config or artifacts.
Technique Notes
Skill-specific technique rationale. Apply patterns from the skill body. Progressive disclosure: metadata first, body on trigger, references on demand.
Prompt Architect Overlay
Role Definition: Specialist for ios-simulator-skill domain. Executes workflows, produces artifacts, routes to related skills when needed.
Input Contract: Context, optional config, artifacts from prior steps. Depends on skill.
Output Contract: Artifacts, status, next-step recommendations. Format per skill.
Edge Cases & Fallbacks: Missing context—ask or infer from workspace. Dependency missing—degrade gracefully; note in output. Ambiguous request—clarify before proceeding.
1---2name: ios-simulator-skill3version: 1.3.04description: 21 production-ready scripts for iOS app testing, building, and automation. Provides semantic UI navigation, build automation, accessibility testing, and simulator lifecycle management. Optimized for AI agents with minimal token output.5---67# iOS Simulator Skill89Build, test, and automate iOS applications using accessibility-driven navigation and structured data instead of pixel coordinates.1011## Quick Start1213```bash14# 1. Check environment15bash scripts/sim_health_check.sh1617# 2. Launch app18python scripts/app_launcher.py --launch com.example.app1920# 3. Map screen to see elements21python scripts/screen_mapper.py2223# 4. Tap button24python scripts/navigator.py --find-text "Login" --tap2526# 5. Enter text27python scripts/navigator.py --find-type TextField --enter-text "user@example.com"28```2930All scripts support `--help` for detailed options and `--json` for machine-readable output.3132## 21 Production Scripts3334### Build & Development (2 scripts)35361. **build_and_test.py** - Build Xcode projects, run tests, parse results with progressive disclosure37 - Build with live result streaming38 - Parse errors and warnings from xcresult bundles39 - Retrieve detailed build logs on demand40 - Options: `--project`, `--scheme`, `--clean`, `--test`, `--verbose`, `--json`41422. **log_monitor.py** - Real-time log monitoring with intelligent filtering43 - Stream logs or capture by duration44 - Filter by severity (error/warning/info/debug)45 - Deduplicate repeated messages46 - Options: `--app`, `--severity`, `--follow`, `--duration`, `--output`, `--json`4748### Navigation & Interaction (5 scripts)49503. **screen_mapper.py** - Analyze current screen and list interactive elements51 - Element type breakdown52 - Interactive button list53 - Text field status54 - Options: `--verbose`, `--hints`, `--json`55564. **navigator.py** - Find and interact with elements semantically57 - Find by text (fuzzy matching)58 - Find by element type59 - Find by accessibility ID60 - Enter text or tap elements61 - Options: `--find-text`, `--find-type`, `--find-id`, `--tap`, `--enter-text`, `--json`62635. **gesture.py** - Perform swipes, scrolls, pinches, and complex gestures64 - Directional swipes (up/down/left/right)65 - Multi-swipe scrolling66 - Pinch zoom67 - Long press68 - Pull to refresh69 - Options: `--swipe`, `--scroll`, `--pinch`, `--long-press`, `--refresh`, `--json`70716. **keyboard.py** - Text input and hardware button control72 - Type text (fast or slow)73 - Special keys (return, delete, tab, space, arrows)74 - Hardware buttons (home, lock, volume, screenshot)75 - Key combinations76 - Options: `--type`, `--key`, `--button`, `--slow`, `--clear`, `--dismiss`, `--json`77787. **app_launcher.py** - App lifecycle management79 - Launch apps by bundle ID80 - Terminate apps81 - Install/uninstall from .app bundles82 - Deep link navigation83 - List installed apps84 - Check app state85 - Options: `--launch`, `--terminate`, `--install`, `--uninstall`, `--open-url`, `--list`, `--state`, `--json`8687### Testing & Analysis (5 scripts)88898. **accessibility_audit.py** - Check WCAG compliance on current screen90 - Critical issues (missing labels, empty buttons, no alt text)91 - Warnings (missing hints, small touch targets)92 - Info (missing IDs, deep nesting)93 - Options: `--verbose`, `--output`, `--json`94959. **visual_diff.py** - Compare two screenshots for visual changes96 - Pixel-by-pixel comparison97 - Threshold-based pass/fail98 - Generate diff images99 - Options: `--threshold`, `--output`, `--details`, `--json`10010110. **test_recorder.py** - Automatically document test execution102 - Capture screenshots and accessibility trees per step103 - Generate markdown reports with timing data104 - Options: `--test-name`, `--output`, `--verbose`, `--json`10510611. **app_state_capture.py** - Create comprehensive debugging snapshots107 - Screenshot, UI hierarchy, app logs, device info108 - Markdown summary for bug reports109 - Options: `--app-bundle-id`, `--output`, `--log-lines`, `--json`11011112. **sim_health_check.sh** - Verify environment is properly configured112 - Check macOS, Xcode, simctl, IDB, Python113 - List available and booted simulators114 - Verify Python packages (Pillow)115116### Advanced Testing & Permissions (4 scripts)11711813. **clipboard.py** - Manage simulator clipboard for paste testing119 - Copy text to clipboard120 - Test paste flows without manual entry121 - Options: `--copy`, `--test-name`, `--expected`, `--json`12212314. **status_bar.py** - Override simulator status bar appearance124 - Presets: clean (9:41, 100% battery), testing (11:11, 50%), low-battery (20%), airplane (offline)125 - Custom time, network, battery, WiFi settings126 - Options: `--preset`, `--time`, `--data-network`, `--battery-level`, `--clear`, `--json`12712815. **push_notification.py** - Send simulated push notifications129 - Simple mode (title + body + badge)130 - Custom JSON payloads131 - Test notification handling and deep links132 - Options: `--bundle-id`, `--title`, `--body`, `--badge`, `--payload`, `--json`13313416. **privacy_manager.py** - Grant, revoke, and reset app permissions135 - 13 supported services (camera, microphone, location, contacts, photos, calendar, health, etc.)136 - Batch operations (comma-separated services)137 - Audit trail with test scenario tracking138 - Options: `--bundle-id`, `--grant`, `--revoke`, `--reset`, `--list`, `--json`139140### Device Lifecycle Management (5 scripts)14114217. **simctl_boot.py** - Boot simulators with optional readiness verification143 - Boot by UDID or device name144 - Wait for device ready with timeout145 - Batch boot operations (--all, --type)146 - Performance timing147 - Options: `--udid`, `--name`, `--wait-ready`, `--timeout`, `--all`, `--type`, `--json`14814918. **simctl_shutdown.py** - Gracefully shutdown simulators150 - Shutdown by UDID or device name151 - Optional verification of shutdown completion152 - Batch shutdown operations153 - Options: `--udid`, `--name`, `--verify`, `--timeout`, `--all`, `--type`, `--json`15415519. **simctl_create.py** - Create simulators dynamically156 - Create by device type and iOS version157 - List available device types and runtimes158 - Custom device naming159 - Returns UDID for CI/CD integration160 - Options: `--device`, `--runtime`, `--name`, `--list-devices`, `--list-runtimes`, `--json`16116220. **simctl_delete.py** - Permanently delete simulators163 - Delete by UDID or device name164 - Safety confirmation by default (skip with --yes)165 - Batch delete operations166 - Smart deletion (--old N to keep N per device type)167 - Options: `--udid`, `--name`, `--yes`, `--all`, `--type`, `--old`, `--json`16816921. **simctl_erase.py** - Factory reset simulators without deletion170 - Preserve device UUID (faster than delete+create)171 - Erase all, by type, or booted simulators172 - Optional verification173 - Options: `--udid`, `--name`, `--verify`, `--timeout`, `--all`, `--type`, `--booted`, `--json`174175## Common Patterns176177**Auto-UDID Detection**: Most scripts auto-detect the booted simulator if --udid is not provided.178179**Device Name Resolution**: Use device names (e.g., "iPhone 16 Pro") instead of UDIDs - scripts resolve automatically.180181**Batch Operations**: Many scripts support `--all` for all simulators or `--type iPhone` for device type filtering.182183**Output Formats**: Default is concise human-readable output. Use `--json` for machine-readable output in CI/CD.184185**Help**: All scripts support `--help` for detailed options and examples.186187## Typical Workflow1881891. Verify environment: `bash scripts/sim_health_check.sh`1902. Launch app: `python scripts/app_launcher.py --launch com.example.app`1913. Analyze screen: `python scripts/screen_mapper.py`1924. Interact: `python scripts/navigator.py --find-text "Button" --tap`1935. Verify: `python scripts/accessibility_audit.py`1946. Debug if needed: `python scripts/app_state_capture.py --app-bundle-id com.example.app`195196## Requirements197198- macOS 12+199- Xcode Command Line Tools200- Python 3201- IDB (optional, for interactive features)202203## Documentation204205- **SKILL.md** (this file) - Script reference and quick start206- **README.md** - Installation and examples207- **CLAUDE.md** - Architecture and implementation details208- **references/** - Deep documentation on specific topics209- **examples/** - Complete automation workflows210211## Key Design Principles212213**Semantic Navigation**: Find elements by meaning (text, type, ID) not pixel coordinates. Survives UI changes.214215**Token Efficiency**: Concise default output (3-5 lines) with optional verbose and JSON modes for detailed results.216217**Accessibility-First**: Built on standard accessibility APIs for reliability and compatibility.218219**Zero Configuration**: Works immediately on any macOS with Xcode. No setup required.220221**Structured Data**: Scripts output JSON or formatted text, not raw logs. Easy to parse and integrate.222223**Auto-Learning**: Build system remembers your device preference. Configuration stored per-project.224225---226227Use these scripts directly or let Claude Code invoke them automatically when your request matches the skill description.228229## Technique Map230231- **Identify scope** — Determine what the skill applies to before executing.232- **Follow workflow** — Use documented steps; avoid ad-hoc shortcuts.233- **Verify outputs** — Check results match expected contract.234- **Handle errors** — Graceful degradation when dependencies missing.235- **Reference docs** — Load references/ when detail needed.236- **Preserve state** — Don't overwrite user config or artifacts.237238## Technique Notes239240Skill-specific technique rationale. Apply patterns from the skill body. Progressive disclosure: metadata first, body on trigger, references on demand.241242## Prompt Architect Overlay243244**Role Definition:** Specialist for ios-simulator-skill domain. Executes workflows, produces artifacts, routes to related skills when needed.245246**Input Contract:** Context, optional config, artifacts from prior steps. Depends on skill.247248**Output Contract:** Artifacts, status, next-step recommendations. Format per skill.249250**Edge Cases & Fallbacks:** Missing context—ask or infer from workspace. Dependency missing—degrade gracefully; note in output. Ambiguous request—clarify before proceeding.