- name
SKILL.md
स्किल फ़ाइल पब्लिशर की रिपॉज़िटरी में ही रहती है।
कॉपी की गई कमांड टर्मिनल में पेस्ट करें। यह इस SKILL.md को उस एजेंट में इंस्टॉल करती है।
npx skills add conorluddy/ios-simulator-skill --skill ios-simulator-skill -a cursor -yकॉपी की गई कमांड टर्मिनल में पेस्ट करें। यह इस SKILL.md को उस एजेंट में इंस्टॉल करती है।
npx skills add conorluddy/ios-simulator-skill --skill ios-simulator-skill -a claude-code -yकॉपी की गई कमांड टर्मिनल में पेस्ट करें। यह इस SKILL.md को उस एजेंट में इंस्टॉल करती है।
npx skills add conorluddy/ios-simulator-skill --skill ios-simulator-skill -a codex -yकॉपी की गई कमांड टर्मिनल में पेस्ट करें। यह इस SKILL.md को उस एजेंट में इंस्टॉल करती है।
npx skills add conorluddy/ios-simulator-skill --skill ios-simulator-skill -a grok -yकॉपी किया गया संदेश Grok Bot चैट में भेजें। Bot यह SKILL.md GitHub से लाता है और उसे उन स्किल में जोड़ देता है जो आपके सभी Bot साझा करते हैं।
Install this skill: https://github.com/conorluddy/ios-simulator-skill/tree/HEAD/ios-simulator-skill/skills/ios-simulator-skillपब्लिशर से
Build, test, and automate iOS applications using accessibility-driven navigation and structured data instead of pixel coordinates.
# 1. Check environment
bash scripts/sim_health_check.sh
# 2. Launch app
python3 scripts/app_launcher.py --launch com.example.app
# 3. Map screen to see elements
python3 scripts/screen_mapper.py
# 4. Tap button
python3 scripts/navigator.py --find-text "Login" --tap
# 5. Enter text
python3 scripts/navigator.py --find-type TextField --enter-text "[email protected]"
Paths: scripts/ is relative to the directory containing this SKILL.md, not the user's project.
Examples write scripts/... for brevity; run them by absolute path from the user's project
(e.g. python3 <skill-dir>/scripts/navigator.py ...) so relative Xcode project paths still resolve.
All scripts support --help for detailed options; most support --json for machine-readable output.
Always prefer the accessibility tree over screenshots for navigation. The accessibility tree gives you element types, labels, frames, and tap targets — structured data that's cheaper and more reliable than image analysis.
Use this priority:
screen_mapper.py → structured element list (5-7 lines, ~10 tokens)navigator.py --find-text/--find-type/--find-id → semantic interactionScreenshots cost 1,600–6,300 tokens depending on size. The accessibility tree costs 10–50 tokens in default mode.
build_and_test.py - Build Xcode projects, run tests, parse results with progressive disclosure
--run builds, installs and launches the app in one call: Launched: <bundle> on <device> (pid N)Tests: NOT RUN, not FAIL; retry with --no-parallel--project, --scheme, --clean, --test, --run, --no-parallel, --verbose, --jsonlog_monitor.py - Real-time log monitoring with intelligent filtering
--app, --severity, --follow, --duration, --output, --jsonappearance.py - Control simulator appearance: dark mode, Dynamic Type size, contrast, and locale/region
xcrun simctl ui--contrast high|normal toggles Increase Contrast and reads it back to confirm; --reset also restores normal contrast--bundle-id--theme, --text-size, --contrast, --locale, --region, --reset, --bundle-id, --udid, --json, --verboselocation.py - Simulate GPS coordinates, named city presets, and GPX scenario playback
--lat/--lng or pick a city with --city--gpx <scenario>--waypoints and --speed--clear; list available scenarios with --list-scenarios--lat, --lng, --city, --gpx, --waypoints, --speed, --clear, --list-scenarios, --udid, --json, --verbosemedia.py - Seed or empty the photo library for photo-picker tests
--add a.jpg b.png via xcrun simctl addmedia--clear --yes empties the library via idb photos clear (idb 1.7+); --clear --yes --add leaves exactly the added files--yes, --clear refuses if the library has photos (they can't be recovered): ask the user first--add, --clear, --yes, --udid, --jsonscreen_mapper.py - Analyze current screen and list interactive elements
Coverage: line suggesting --deep--deep reads through idb's axbridge backend (idb 1.7+): also sees Safari/WKWebView content
and in-app alerts the default read misses, plus many unlabelled container views. It turns on
the device's accessibility automation mode (not restored afterwards). Web-content frames are
relative to the web view, so use --deep to find elements, not to take tap coordinates--verbose, --hints, --deep, --jsonnavigator.py - Find and interact with elements semantically
--find-exact); interactive leaf elements rank above containers sharing the label--tap on a Button/Link/Switch/CheckBox/Tab with a unique accessibility ID or label uses an accessibility press
(idb 1.7+), so overlays like a floating search bar can't intercept it; output says
(accessibility press). Otherwise it taps the frame center--set-value TEXT replaces a field's value without the keyboard (any characters, idb 1.7+).
Focus doesn't move, so use --enter-text when a Return key must submit afterwards
The value is read back before success is claimed (not for secure fields); a mismatch exits 1--tap --expect VALUE taps only if the element's value is VALUE (toggles: 1 on, 0 off) and
exits 1 without tapping otherwise, so "turn X off" is safe to repeatCheckBox. Only a press flips them (no HID touch does, even on the
switch itself); if neither ID nor label is unique, the output warns to check the value--find-text, --find-exact, --find-type, --find-id, --index, --tap, --expect, --tap-at, --enter-text, --set-value, --key-sequence h,i,return)--key z --command --shift (redo); --shift/--control/--option need idb 1.7+--type, --slow, --key, --shift, --control, --option, --command, --count, --key-sequence, --button, --clear, --dismiss--uninstall needs --yes: the app's data is deleted)--args) and environment variables (--env KEY=VALUE, injected as SIMCTL_CHILD_*) to the app on launch/restart--launch, --terminate, --restart, --install, --uninstall, --yes, --open-url, --list, --state, --args, --env, --wait-for-debuggeraccessibility_audit.py - Check WCAG compliance on current screen
--verbose, --output, --jsonvisual_diff.py - Compare two screenshots for visual changes
--threshold, --output, --details, --jsontest_recorder.py - Automatically document test execution
--test-name, --output, --verbose, --jsonapp_state_capture.py - Create comprehensive debugging snapshots
--app-bundle-id, --output, --log-lines, --jsonsim_health_check.sh - Verify environment is properly configured
model_inspector.py - Inspect Core Data and SwiftData models from project files
--raw ModelName)--project-path, --core-data-only, --swiftdata-only, --show-versions, --raw, --verbose, --jsoncontainer.py - Inspect app sandbox: files, UserDefaults, and Core Data store paths
clipboard.py - Manage simulator clipboard for paste testing
--copy, --test-name, --expected, --jsonstatus_bar.py - Override simulator status bar appearance
--preset, --time, --data-network, --battery-level, --clear, --jsonpush_notification.py - Send simulated push notifications
--list shows delivered notifications; --clear withdraws them all (both idb 1.7+; sending stays on simctl)--list won't show it--bundle-id, --title, --body, --badge, --payload, --list, --clear, --jsonprivacy_manager.py - Grant, revoke, and reset app permissions
--bundle-id, --grant, --revoke, --reset, --list, --jsonsim_list.py - List simulators with progressive disclosure
--suggestsimctl list (57k → 2k tokens)--get-details, --suggest, --device-type, --jsonsimulator_selector.py - Suggest the best simulator for the job
config.json), latest iOS, common test models, and boot status--list--boot--suggest, --list, --boot, --jsonsimctl_boot.py - Boot simulators with optional readiness verification
--udid, --name, --wait-ready, --timeout, --all, --type, --jsonsimctl_shutdown.py - Gracefully shutdown simulators
--udid, --name, --verify, --timeout, --all, --type, --jsonsimctl_create.py - Create simulators dynamically
--device, --runtime, --name, --list-devices, --list-runtimes, --jsonsimctl_delete.py - Permanently delete simulators
--yes (no prompt; the simulator and its data can't be recovered): ask the user first--udid, --name, --yes, --all, --type, --old, --jsonsimctl_erase.py - Factory reset simulators without deletion
--yes (apps, data and settings can't be recovered): ask the user first--udid, --name, --yes, --verify, --timeout, --all, , , python3 scripts/duo.py --udid <DUO_UDID> --pose open
python3 scripts/duo.py --udid <DUO_UDID> --state --json
# Use the observed display_id, rather than assuming which display is active.
python3 scripts/app_state_capture.py --udid <DUO_UDID> --display 3 --output duo-state
python3 scripts/test_recorder.py --udid <DUO_UDID> --display 3 --test-name duo-layout
--display selects the screenshot display in file and inline modes; accessibility trees remain
independent and provide no verified coordinate mapping to that display. Rotation polls observed
interface state across native orientation candidates because sensor and interface orientation may
differ. The five-second verification polling window excludes initial reads and hinge dispatch;
individual commands have separate timeouts, so total requests can take longer. If a change times
out, inspect observed state before retrying. Inactive displays may capture black frames.
The private backend credits hinge and duoctl mechanism research. Replace folding and rotation independently when supported headless APIs offer equivalent control and observed readback; XCTest-only hinge APIs are insufficient. Video display selection is outside this package's scope.
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.
Screenshot Sizing: Screenshots are resized to save tokens. Presets: full (3-4 tiles, ~5K tokens), half (1 tile, ~1.6K tokens, default), quarter (1 tile, ~800 tokens, less detail). Use quarter for quick visual checks, half for readable UI, full only when pixel-level detail matters. Scripts that capture screenshots (app_state_capture.py, test_recorder.py) default to half.
bash scripts/sim_health_check.shpython3 scripts/app_launcher.py --launch com.example.apppython3 scripts/screen_mapper.pypython3 scripts/navigator.py --find-text "Button" --tappython3 scripts/accessibility_audit.pypython3 scripts/app_state_capture.py --app-bundle-id com.example.appMost operational limits can be tuned via environment variables. Defaults work for typical local development; raise them for slow CI runners, large monorepo builds, or accessibility audits on complex screens.
Example:
# Slow GitHub Actions runner: give boot 10 minutes
IOS_SIM_BOOT_TIMEOUT=600 python3 scripts/simctl_boot.py --wait-ready
idb 1.5.1+ (1.6.3+ recommended) - required for every interactive script (tap, swipe, type):
brew install facebook/fb/idb (installs both idb-cli and idb-companion)pip3 install pillowVerify with bash scripts/sim_health_check.sh (add --json for structured output).
Taps, swipes and typing do nothing, but reads work. idb reports success and the screen
never changes. On Xcode 27 this means idb-companion is older than 1.5.1: it looks for
SimulatorKit.framework at the path Xcode 26 used. Upgrade both together, then restart running
companions: brew upgrade facebook/fb/idb-cli facebook/fb/idb-companion && idb kill.
SimulatorKit is required for HID interactions. Same cause, same fix.
Health check warns "idb companions started before idb-companion was last installed". Those
companions still run the pre-upgrade binary. Run idb kill; the next idb call starts a fresh one.
Connection refused or No such file from every idb call. A dead companion is still in
idb's registry at /tmp/idb/state, so idb dials a socket nobody is listening on instead of
starting a fresh companion. Fix: idb disconnect <udid>.
open -a Simulator fails. Xcode 27 has no Simulator.app; it was replaced by
DeviceHub.app in Xcode.app/Contents/Applications/. Boot headlessly instead:
xcrun simctl boot <udid>. Note that quitting DeviceHub shuts down the simulator it hosts.
idb: command not found. The companion and the CLI are separate packages;
brew install facebook/fb/idb installs both. If which -a idb shows more than one, the first on
PATH wins. An old pip fb-idb there needs pip uninstall fb-idb.
Known upstream idb issues (open as of idb 1.7.6):
describe-all returns only the application node, and SpringBoard alerts can't be tapped. The
default ax backend can't see across process boundaries; try
idb ui describe-all --json --api axbridge. Tap coordinates are points, not screenshot pixels.
After an app relaunch the default read can also stay stuck on a single zero-size Application
node; one screen_mapper.py --deep read (which may itself time out once) brings it back.describe-all but can't be performed.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.
Build, test, and drive iOS apps in the Simulator with 31 token-efficient scripts. Use when asked to build or test an Xcode project, launch an app on a simulator, tap/type/swipe through its UI by acces
---name: ios-simulator-skilldescription: Build, test, and drive iOS apps in the Simulator with 31 token-efficient scripts. Use when asked to build or…---# ios-simulator-skill/skills/ios-simulator-skill/SKILL.mdओवरव्यू
Build, test, and drive iOS apps in the Simulator with 31 token-efficient scripts. Use when asked to build or test an Xcode project, launch an app on a simulator, tap/type/swipe through its UI by accessibility label, take screenshots or visual diffs, audit accessibility, read logs or diagnose hangs, or manage simulators (boot, erase, permissions, location, push, appearance). macOS only; needs Xcode, Python 3.12+ and idb.
FAQ
पब्लिशर से ios-simulator-skill/skills/ios-simulator-skill/SKILL.md डाउनलोड करें, या पाथ कॉपी करके रिपॉज़िटरी खोलें। PlugMCP स्किल को सूचीबद्ध करता है, फ़ाइल होस्ट नहीं करता।
पब्लिशर इसे https://github.com/conorluddy/ios-simulator-skill पर रखता है।
Claude, Cursor, Codex और Grok Build वह SKILL.md पढ़ सकते हैं जिसे आप पब्लिशर की रिपॉज़िटरी से जोड़ते हैं। जब आप चैट में स्किल के GitHub फ़ोल्डर का लिंक भेजते हैं, तो Grok Bot उसे इंस्टॉल कर देता है।
duo.py - Experimental iPhone Duo hinge and interface orientation controls
--udid; no automatic device selection--state)--pose closed|partial|open (0°/90°/180°), --angle 0..180, or --orientation portrait|landscape|portrait-upside-down|landscape-flipped--udid, --state, --pose, --angle, --orientation, --json, --verbose--listgesture.py - Perform swipes, scrolls, pinches, and complex gestures
--swipe is the direction the finger moves--scroll is the direction the content moves (down reveals content below)idb ui pinch (--pinch out zooms in; --scale sets an explicit factor)idb ui tap --duration--double-tap X,Y [--tap-count N] - multi-tap at a point (idb 1.7+)--drag SOURCE DEST - press-hold, drag, release; each end is x,y or an accessibility label,
e.g. --drag "Row 1" "Row 4" (idb 1.7+)--rotate portrait|portrait-upside-down|landscape-left|landscape-right - physical device rotation (idb 1.7+)--shake - shake the device, for debug menus and undo (idb 1.7+)--swipe, --swipe-from/--swipe-to, --scroll, --scroll-amount, --pinch, --scale, --long-press, --duration, --refresh, --double-tap, --tap-count, --drag, --rotate, --shakekeyboard.py - Text input and hardware button control
--ls--cat (large files cached)--userdefaults.sqlite / .sqlite-wal / .sqlite-shm stores via --core-data-path--export--ls, --cat, --userdefaults, --core-data-path, --export, --udid, --json, --verbosehang_watcher.py (HangBuster) - Record + summarise os_log hang events with progressive disclosure
--start → returns a session ID; detached worker normalises + thresholds events on the fly--stop SESSION_ID → emits ~80–120 token L1 summary (header + top-N clusters + drill hint)--get-details SESSION_ID [--cluster N | --raw] → L2 full clusters or L3 per-event detail--list-sessions / --clear-sessions [--older-than 24h] / --diff A B (cross-session regression report)common/hang_pipeline.py)--budget-tokens N picks the densest level (L0/L1/L2) that fits; --terse forces L0--auto-sample captures a main-thread stack on first event per cluster (soft dependency: main_thread_sampler.py #62; graceful no-op if absent)jq exploration): skip the clustering pipeline, dump every matching log line verbatim to raw.ndjson
--start --raw-capture [--max-size-mb 10] [--no-gzip] — spawns log stream --style ndjson--max-size-mb, default 10) — worker stops cleanly on cap; extras.truncated=true--stop gzips raw.ndjson → raw.ndjson.gz (~15–19× compression; --no-gzip opts out)--get-details SESSION_ID on a raw session prints the path with a zcat | jq ... hintstream_died event then a bounded restart with 2s backoff. After IOS_SIM_HANG_MAX_RESTARTS (default 3) the session is marked crashed, never left in stale running state. --list-sessions shows capture=Xs and restarts=N.IOS_SIM_HANG_SESSION_TTL_HOURS, default 24h) + aggregate cap (IOS_SIM_HANG_TOTAL_CAP_MB, default 100 MB, oldest-first eviction) both run on every --start.--watch [--duration N] (live stream) and --since 5m (historical)--bundle-id (post-parse — hang capture stays simulator-global so RunningBoard/SpringBoard events are kept), --predicate (also via IOS_SIM_HANG_PREDICATE)--json; session storage at ~/.ios-simulator-skill/sessions/<id>/{meta.json,events.jsonl,summary.json,raw.ndjson.gz}Quick start (summarised mode):
SID=$(python3 scripts/hang_watcher.py --start --min-hang-ms 200)
# ... interact with the simulator (open sheets, scroll, navigate) ...
python3 scripts/hang_watcher.py --stop $SID # token-tight L1 summary
python3 scripts/hang_watcher.py --get-details $SID --cluster 1 # drill into cluster 1
python3 scripts/hang_watcher.py --diff $SID_BASELINE $SID # cross-session regression
Quick start (raw capture + jq exploration):
SID=$(python3 scripts/hang_watcher.py --start --raw-capture --max-size-mb 5)
# ... interact with the simulator ...
python3 scripts/hang_watcher.py --stop $SID
# → "Session ...: raw mode, 737 lines, 0.96 MB → 0.05 MB gzipped"
# Top processes by event count:
zcat ~/.ios-simulator-skill/sessions/$SID/raw.ndjson.gz \
| jq -s 'group_by(.processImagePath) | map({proc: (.[0].processImagePath | split("/") | last), n: length}) | sort_by(-.n) | .[:5]'
# All RunningBoard assertion invalidations:
zcat .../raw.ndjson.gz | jq -c 'select(.subsystem == "com.apple.runningboard" and (.eventMessage | startswith("Invalidating")))'
# Hangs per minute:
zcat .../raw.ndjson.gz | jq -r '.timestamp[:16]' | sort | uniq -c
localization_audit.py - Detect string catalog gaps, missing keys, and placeholder mismatches
needs_review/new keys per locale in .xcstrings catalogsString(localized:) / NSLocalizedString) via --source%d, %@, %s, %lld) across locales.strings and .stringsdict support via plistlib--strict exits 2 on any finding--catalog, --source, --locale, --strict, --json, --verbose--type--booted--jsonIOS_SIM_ERASE_TIMEOUT | 90 | Wait-for-erase timeout (seconds) |
IOS_SIM_HANG_PREDICATE | (default) | Override the os_log predicate used by hang_watcher.py (default catches RunningBoard kills + "Hang detected" + main-thread hangs). Hang events originate from system daemons (RunningBoard, SpringBoard) so the predicate stays simulator-global — --bundle-id is applied post-parse, not ANDed in. |
IOS_SIM_HANG_MIN_MS | 250 | HangBuster threshold — events below this duration never reach disk (smaller = more sensitive, larger summaries) |
IOS_SIM_HANG_SESSION_TTL_HOURS | 24 | HangBuster session prune age; pruning runs on every --start |
IOS_SIM_HANG_DEFAULT_TOP_N | 3 | Default top-N clusters in --stop L1 output |
IOS_SIM_HANG_BUDGET_TOKENS | (unset) | Default token budget for --stop (picks L0/L1/L2 to fit) |
IOS_SIM_HANG_MAX_RESTARTS | 3 | HangBuster worker: max log stream respawn attempts on EOF/subprocess death before the session is marked crashed |
IOS_SIM_HANG_TOTAL_CAP_MB | 100 | HangBuster aggregate disk cap. When total session-state exceeds this on --start, oldest sessions are dropped first. Set to 0 to disable. |
IOS_SIM_LOG_JSON_CAP | 100 | Max errors/warnings in log_monitor.py JSON output |
IOS_SIM_LOG_LINE_MAX | 300 | Per-line truncation in log summaries |
IOS_SIM_LOG_TAIL | 200 | Lines of log tail in verbose / sample output |
IOS_SIM_LOG_TEXT_SUMMARY | 15 | Errors/warnings shown in text-mode log summary |
IOS_SIM_MAX_ELEMENTS | 25 | Items listed by navigator.py --list and push_notification.py --list |
IOS_SIM_POLL_INTERVAL | 0.5 | Boot/erase state polling interval (seconds) |
IOS_SIM_RELAUNCH_DELAY_MS | 1000 | Delay between terminate and re-launch in app_launcher.py |
IOS_SIM_SCREEN_BUTTONS_PREVIEW | 15 | Button names listed by screen_mapper.py |
IOS_SIM_SCREEN_SECTION_ITEMS | 10 | Items per section shown by screen_mapper.py |
IOS_SIM_STATE_SUBPROCESS_TIMEOUT | 15 | Subprocess timeout in app_state_capture.py (seconds) |
IOS_SIM_TAP_SETTLE_MS | 500 | Post-tap settle delay in navigator.py |