Skip to content
This repository was archived by the owner on Sep 29, 2026. It is now read-only.

About

An IOS Simulator Skill for ClaudeCode. Use it to optimise Claude's ability to build, run and interact with your apps. I mainly use it as an xcodebuild wrapper to save context.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Β 
Β 

Latest commit

Β 

History

79 Commits

Folders and files

Repository files navigation

πŸ“± iOS Simulator Skill for Claude Code

Give Claude reliable hands on iOS.

Build Xcode projects, drive the simulator semantically, and ship features β€” all from inside a Claude Code conversation, in a fraction of the tokens.

License: MIT Python macOS Claude Code Ask DeepWiki

Install Β· Quick Start Β· Scripts Β· Why Β· SKILL.md


Warning

STATUS: ARCHIVED CLAUDE NATIVELY SUPPORTS THIS NOW

πŸš€ What it does

Without this skill, Claude pokes at the iOS simulator with pixel coordinates and dumps walls of xcodebuild output into context. With it, Claude does real iOS work in a few turns:

$ python3 ${CLAUDE_SKILL_DIR}/scripts/build_and_test.py --project MyApp.xcodeproj --scheme MyApp
Build: SUCCESS (0 errors, 3 warnings) [xcresult-20251018-143052]

$ python3 ${CLAUDE_SKILL_DIR}/scripts/navigator.py --find-text "Sign In" --tap
Tapped: Button "Sign In" at (320, 450)

$ python3 ${CLAUDE_SKILL_DIR}/scripts/wait_for.py --element "Welcome" --timeout 5
OK: element "Welcome" matched in 1.2s

$ python3 ${CLAUDE_SKILL_DIR}/scripts/debug_failing_test.py \
    --project MyApp.xcodeproj --scheme MyApp \
    --test MyAppTests/LoginTests/testInvalidPassword \
    --bundle-id com.example.MyApp
FAIL: testInvalidPassword β€” bundle: ./debug-20260424-153012/  (3 errors, 142 log lines, ui tree ok, screenshot ok)

No pixel coordinates. No walls of build output. No polling loops in the agent turn.


🧠 Why it works

Three design choices, and the rest follows:

🎯 Semantic, not pixel

Find elements by meaning β€” --find-text "Sign In" β€” not by tap 320 400. Survives UI changes. ~10 tokens vs 1,600–6,300 for a screenshot.

πŸ“¦ Progressive disclosure

A build returns one summary line plus an xcresult-ID. Pull errors, warnings, or full logs only when you need them. Build output never floods context.

πŸ€– Structured outputs

Every script supports --json with stable error codes (NO_BOOTED_SIM, ELEMENT_NOT_FOUND, BUILD_FAILED, TIMEOUT, …). Agents branch on code, not parsed English.


πŸ“Š The numbers

Task Raw tools This skill Savings
Screen analysis 200+ lines 5 lines 97.5%
Find & tap button 100+ lines 1 line 99%
Login flow 400+ lines 15 lines 96%

Tested with Claude Code evals

Condition Pass rate
With skill 🟒 100% (3/3)
Without skill πŸ”΄ 46% (~1.4/3)
claude evals run evals/evals.json --skill ios-simulator-skill

πŸ“¦ Install

Plugin marketplace (recommended)

/plugin marketplace add cpeaustriajc/ios-simulator-skill
/plugin install ios-simulator-skill@cpeaustriajc

Git clone

# Personal β€” all your projects
git clone https://github.com/cpeaustriajc/ios-simulator-skill.git \
  ~/.claude/skills/ios-simulator-skill

# Project-scoped
git clone https://github.com/cpeaustriajc/ios-simulator-skill.git \
  .claude/skills/ios-simulator-skill

Restart Claude Code. The skill auto-loads when you open iOS files (.xcodeproj, .xcworkspace, .swift, .m, .h, Package.swift).

Prerequisites

Requirement Notes
🍎 macOS 12+
πŸ› οΈ Xcode CLT xcode-select --install
🐍 Python 3.12+
πŸ€– IDB (two parts) See below β€” needs both the brew companion daemon and the pipx CLI client
πŸ–ΌοΈ Pillow Only for visual_diff.py: pip3 install pillow

Installing IDB

The UI-navigation scripts (screen_mapper.py, navigator.py, gesture.py, keyboard.py, accessibility_audit.py, wait_for.py) shell out to the idb binary. IDB is two components β€” you need both:

  1. idb-companion β€” Swift daemon, installed via Homebrew.
  2. fb-idb β€” Python CLI client (the idb binary), installed via pipx.
# 1. Companion daemon
brew tap facebook/fb
brew install idb-companion

# 2. Python client β€” must run on Python 3.12 or 3.13.
#    fb-idb calls asyncio.get_event_loop(), which raises on Python 3.14+.
#    Pin the interpreter even if your system Python is newer:
pipx install --python python3.13 fb-idb

# 3. Verify
idb --version
bash ~/.claude/skills/ios-simulator-skill/scripts/sim_health_check.sh

Last verified install combo: macOS 15, idb-companion 1.1.x via Homebrew, fb-idb 1.1.x via pipx --python python3.13. The Python 3.14 incompatibility is tracked in #16 β€” if sim_health_check.sh warns about it, follow its pipx --python python3.13 recipe.

Just want build tooling, no IDB? See xclaude-plugin β€” same xcodebuild wrapper without the simulator scripts.


⚑ Quick start

Once installed, ask Claude things like "build the app and run the login test" or "tap the Sign In button and screenshot the result" β€” Claude picks the right scripts automatically.

To drive things directly:

# 1. Verify the environment
bash ~/.claude/skills/ios-simulator-skill/scripts/sim_health_check.sh

# 2. See what's on the screen
python3 ~/.claude/skills/ios-simulator-skill/scripts/screen_mapper.py

# 3. Drive a flow
python3 ~/.claude/skills/ios-simulator-skill/scripts/navigator.py \
  --find-type TextField --enter-text "user@example.com"

python3 ~/.claude/skills/ios-simulator-skill/scripts/navigator.py \
  --find-text "Sign In" --tap

python3 ~/.claude/skills/ios-simulator-skill/scripts/wait_for.py \
  --element "Welcome" --timeout 5

πŸ’‘ Set export SIMCTL_UDID=<your-device-udid> once and skip --udid everywhere.

For the full skill body Claude loads (decision tree + workflows), see SKILL.md. For the per-script flag reference, see reference.md. Every script also supports --help.


🧰 Scripts at a glance

24 scripts. Every one supports --help and --json.

πŸ—οΈ Β  Build & development
Script What it does Key flags
build_and_test.py Build Xcode projects, run tests, parse xcresult with progressive disclosure --project --scheme --test --get-errors --get-warnings
log_monitor.py Real-time log monitoring with severity filtering --app --severity --follow --duration
πŸ‘† Β  UI navigation
Script What it does Key flags
screen_mapper.py Analyze current screen, list interactive elements --verbose --hints
navigator.py Find and interact with elements semantically --find-text --find-type --find-id --tap --enter-text
gesture.py Swipes, scrolls, pinches, long press, pull to refresh --swipe --scroll --pinch --long-press --refresh
keyboard.py Text input and hardware buttons --text --key --button --clear --dismiss
app_launcher.py Launch, terminate, install, deep link apps --launch --terminate --install --open-url --list
πŸ§ͺ Β  Testing & debug
Script What it does Key flags
wait_for.py ✨ Block until an element appears, app reaches a state, or a log line matches --element --app-state --log-match --timeout
debug_failing_test.py ✨ Run an XCTest; on failure capture xcresult errors + UI tree + logs + screenshot into one bundle --test --bundle-id --retries
accessibility_audit.py WCAG compliance check on current screen --verbose --output
visual_diff.py Compare two screenshots --threshold --output --details
test_recorder.py Automated test documentation with screenshots --test-name --output
app_state_capture.py Debugging snapshot bundle (screenshot + hierarchy + logs) --app-bundle-id --output --log-lines
model_inspector.py Inspect Core Data / SwiftData models from project sources --project-path --raw --show-versions
sim_health_check.sh Verify Xcode, simctl, IDB, Python β€”
πŸ” Β  Environment & permissions
Script What it does Key flags
clipboard.py Set/assert simulator clipboard for paste testing --copy --test-name --expected
status_bar.py Override status bar for screenshots and demos --preset --time --battery-level --clear
push_notification.py Send simulated push notifications --bundle-id --title --body --payload
privacy_manager.py Grant, revoke, reset app permissions (13 services) --bundle-id --grant --revoke --reset
πŸ”„ Β  Device lifecycle
Script What it does Key flags
simctl_boot.py Boot simulators with readiness verification --name --wait-ready --timeout --all --type
simctl_shutdown.py Gracefully shut down simulators --name --verify --all --type
simctl_create.py Create simulators by device type and OS version --device --runtime --list-devices
simctl_delete.py Delete simulators with safety confirmation --name --yes --all --old
simctl_erase.py Factory reset without deletion --name --verify --all --booted

🎯 Designed for agents

This isn't a CLI library that happens to work with Claude. Every design choice optimizes the agent loop:

  • πŸ“‰ Default output is the minimum actionable signal. 3–5 lines, ~10 tokens. Verbose and JSON modes exist for when you need them.
  • 🧬 Structured error envelopes with stable codes and optional recovery_cmd fields β€” the script tells the agent how to fix itself.
  • πŸ” wait_for.py runs polling on the host. No more "let me check again" loops eating turns.
  • πŸ“ debug_failing_test.py collapses 5 tools into one bundle when a test fails β€” xcresult errors + UI tree + logs + screenshot, indexed by a README.
  • πŸŽ›οΈ SIMCTL_UDID env fallback β€” set once, work across all 24 scripts.
  • πŸšͺ Auto-trigger scoped to iOS files β€” won't activate on your Rails project.

πŸ“š Background reading


🀝 Contributing

The skill follows the conventions in CLAUDE.md: class-based scripts, --json everywhere, terse default output, ruff/black clean. Run pre-commit run --all-files before sending a PR. Contract tests for the error envelope live in ios-simulator-skill/scripts/tests/.

PRs welcome β€” please check existing issues first and keep changes scoped.


Made for the people who actually have to debug iOS apps at 11pm.

MIT Β· Issues Β· Discussions Β· Forked from conorluddy/ios-simulator-skill

If this saved you an evening, ⭐ a star goes a long way.

About

An IOS Simulator Skill for ClaudeCode. Use it to optimise Claude's ability to build, run and interact with your apps. I mainly use it as an xcodebuild wrapper to save context.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages