ios-simulator-skill by conorluddy/ios-simulator-skill
npx skills add https://github.com/conorluddy/ios-simulator-skill --skill ios-simulator-skill使用基于无障碍功能的导航和结构化数据(而非像素坐标)来构建、测试和自动化 iOS 应用程序。
# 1. 检查环境
bash scripts/sim_health_check.sh
# 2. 启动应用
python scripts/app_launcher.py --launch com.example.app
# 3. 映射屏幕以查看元素
python scripts/screen_mapper.py
# 4. 点击按钮
python scripts/navigator.py --find-text "Login" --tap
# 5. 输入文本
python scripts/navigator.py --find-type TextField --enter-text "user@example.com"
所有脚本都支持 --help 以获取详细选项,以及 --json 以获取机器可读的输出。
导航时始终优先使用无障碍功能树而非屏幕截图。 无障碍功能树提供元素类型、标签、框架和点击目标——这些结构化数据比图像分析成本更低、更可靠。
使用以下优先级:
screen_mapper.py → 结构化元素列表(5-7 行,约 10 个令牌)navigator.py --find-text/--find-type/--find-id → 语义交互广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
屏幕截图根据大小消耗 1,600–6,300 个令牌。无障碍功能树在默认模式下消耗 10–50 个令牌。
--project, --scheme, --clean, --test, --verbose, --json--app, --severity, --follow, --duration, --output, --json--verbose, --hints, --json--find-text, --find-type, --find-id, --tap, --enter-text, --json--swipe, --scroll, --pinch, --long-press, --refresh, --json--type, --key, --button, --slow, --clear, --dismiss, --json--launch, --terminate, --install, --uninstall, --open-url, --list, --state, --json--verbose, --output, --json--threshold, --output, --details, --json--test-name, --output, --verbose, --json--app-bundle-id, --output, --log-lines, --json--copy, --test-name, --expected, --json--preset, --time, --data-network, --battery-level, --clear, --json--bundle-id, --title, --body, --badge, --payload, --json--bundle-id, --grant, --revoke, --reset, --list, --json--udid, --name, --wait-ready, --timeout, --all, --type, --json--udid, --name, --verify, --timeout, --all, --type, --json--device, --runtime, --name, --list-devices, --list-runtimes, --json--udid, --name, --yes, --all, --type, --old, --json--udid, --name, --verify, --timeout, --all, --type, --booted, --json自动 UDID 检测:如果未提供 --udid,大多数脚本会自动检测已启动的模拟器。
设备名称解析:使用设备名称(例如 "iPhone 16 Pro")而不是 UDID——脚本会自动解析。
批量操作:许多脚本支持 --all 用于所有模拟器,或 --type iPhone 用于设备类型过滤。
输出格式:默认是简洁的人类可读输出。在 CI/CD 中使用 --json 获取机器可读的输出。
帮助:所有脚本都支持 --help 以获取详细选项和示例。
屏幕截图尺寸:屏幕截图会被调整大小以节省令牌。预设:full(3-4 个图块,约 5K 令牌),half(1 个图块,约 1.6K 令牌,默认),quarter(1 个图块,约 800 令牌,细节较少)。使用 quarter 进行快速视觉检查,half 用于可读的 UI,full 仅在像素级细节重要时使用。捕获屏幕截图的脚本(app_state_capture.py, test_recorder.py)默认为 half。
bash scripts/sim_health_check.shpython scripts/app_launcher.py --launch com.example.apppython scripts/screen_mapper.pypython scripts/navigator.py --find-text "Button" --tappython scripts/accessibility_audit.pypython scripts/app_state_capture.py --app-bundle-id com.example.app语义导航:通过含义(文本、类型、ID)而非像素坐标查找元素。可适应 UI 变化。
令牌效率:简洁的默认输出(3-5 行),带有可选的详细模式和 JSON 模式以获取详细结果。
无障碍功能优先:基于标准的无障碍功能 API 构建,以确保可靠性和兼容性。
零配置:在任何装有 Xcode 的 macOS 上立即工作。无需设置。
结构化数据:脚本输出 JSON 或格式化文本,而非原始日志。易于解析和集成。
自动学习:构建系统记住您的设备偏好。配置按项目存储。
直接使用这些脚本,或者当您的请求与技能描述匹配时,让 Claude Code 自动调用它们。
每周安装数
433
仓库
GitHub 星标
588
首次出现
Jan 20, 2026
安全审计
安装于
opencode382
codex375
gemini-cli372
claude-code336
github-copilot330
cursor326
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
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.
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
--project, --scheme, --clean, --test, --verbose, --jsonlog_monitor.py - Real-time log monitoring with intelligent filtering
--app, --severity, , , , screen_mapper.py - Analyze current screen and list interactive elements
--verbose, --hints, --jsonnavigator.py - Find and interact with elements semantically
--find-text, --find-type, --find-id, --tap, --enter-text, accessibility_audit.py - Check WCAG compliance on current screen
--verbose, --output, --jsonvisual_diff.py - Compare two screenshots for visual changes
--threshold, --output, --details, --json- Automatically document test execution
* Capture screenshots and accessibility trees per step
* Generate markdown reports with timing data
* Options: `--test-name`, `--output`, `--verbose`, `--json`
11. 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`
12. sim_health_check.sh - Verify environment is properly configured
* Check macOS, Xcode, simctl, IDB, Python
* List available and booted simulators
* Verify Python packages (Pillow)
* Copy text to clipboard
* Test paste flows without manual entry
* Options: `--copy`, `--test-name`, `--expected`, `--json`
14. 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`
15. 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`
16. 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`
* 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`
18. 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`
19. 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`
20. 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`
21. 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`
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.shpython scripts/app_launcher.py --launch com.example.apppython scripts/screen_mapper.pypython scripts/navigator.py --find-text "Button" --tappython scripts/accessibility_audit.pypython scripts/app_state_capture.py --app-bundle-id com.example.appSemantic 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.
Weekly Installs
433
Repository
GitHub Stars
588
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketFailSnykWarn
Installed on
opencode382
codex375
gemini-cli372
claude-code336
github-copilot330
cursor326
Google Workspace CLI 团队负责人技能:自动化站会、任务协调与团队沟通工具
6,100 周安装
--follow--duration--output--json--jsongesture.py - Perform swipes, scrolls, pinches, and complex gestures
--swipe, --scroll, --pinch, --long-press, --refresh, --jsonkeyboard.py - Text input and hardware button control
--type, --key, --button, --slow, --clear, --dismiss, --jsonapp_launcher.py - App lifecycle management
--launch, --terminate, --install, --uninstall, --open-url, --list, --state, --json