iOS 模拟器技能包

为 Claude Code 提供构建、测试和自动化 iOS 应用的 27 个脚本,通过渐进式披露和可访问性优先导航节省 token。

Star 数
★ 1.3k
最近更新
今天
License
MIT
主语言
Python

30 秒速览

运行形态
Agent 插件 / 技能命令行工具
可在哪里用
平台专用Claude Code
费用
免费,无需付费服务
上手难度
中 · 需要几步配置
开始前需要
macOS 12+Xcode Command Line ToolsPython 3IDB(可选)Pillow(可选)Shell / 命令行
典型场景
iOS 开发者希望让 Claude Code 自动构建和测试 Xcode 项目,而不让 AI 消耗大量构建日志 token。
不适合
  • 需要 Android 或 Web 自动化测试的团队
  • 无法使用 macOS 15+ 与 Xcode 26+ 的开发者
  • 不愿安装 idb 等额外依赖的轻量用户

这个 Agent 能做什么,适合哪些场景?

该仓库是 Claude Code 的官方技能包,包含 27 个 Python/shell 脚本,覆盖 Xcode 构建(通过 xcodebuild)和模拟器交互(通过 xcrun simctl 和 idb)。它针对 AI 代理进行优化,默认输出仅 3-5 行,比原始工具输出减少 96% 的 token。核心创新是渐进式披露:构建和测试结果仅返回摘要行和 xcresult ID,可按需提取错误、警告和日志。导航基于 iOS 可访问性 API 而非像素坐标,使 UI 交互在 UI 变化时更稳健。所有脚本支持 --help 和 --json,可通过 ~/.claude/skills/ 安装,由 Claude Code 自动加载。

该技能提供 27 个脚本,每个脚本封装一个 iOS 开发任务。build_and_test.py 运行 xcodebuild 编译测试,并返回摘要(如 'Build: SUCCESS (0 errors, 3 warnings) [xcresult-20251018-143052]'),随后可通过 --get-errors、--get-warnings、--get-log 按需提取详情。模拟器交互脚本使用可访问性树:navigator.py 通过 --find-text 和 --tap 语义查找并点击元素,screen_mapper.py 分析当前屏幕并列出可交互元素。其他脚本处理设备状态(appearance.py 切换深色模式/语言、location.py 模拟 GPS)、生命周期(simctl_boot.py、simctl_shutdown.py 等)、权限(privacy_manager.py 支持 13 项服务)、推送通知(push_notification.py)和测试(accessibility_audit.py 检查 WCAG、visual_diff.py 比较截图)。脚本通过 xcrun simctl 和 idb 与模拟器交互,输出优化为简洁摘要,大型输出通过 ProgressiveCache 存储并由短 ID 引用。环境变量(IOS_SIM_*)允许调整超时、输出上限和 token 预算。

  1. iOS 开发者希望让 Claude Code 自动构建和测试 Xcode 项目,而不让 AI 消耗大量构建日志 token。
  2. QA 工程师需要稳健的 UI 自动化,通过可访问性标签而非固定坐标点击按钮,例如 --find-text 'Login' --tap。
  3. 利用 hang_watcher.py 和 log_monitor.py 调查崩溃和挂起,其 os_log 输出逐步过滤。
  4. 需要自动执行可访问性审计(WCAG)和应用沙盒检查的团队,以生成部署前报告。
  5. 希望模拟 GPS、推送通知和权限状态以进行全面测试的 CI 管道。

如何安装或部署这个 Agent?

在 Claude Code 中运行:

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

或通过 git clone 安装:

git clone https://github.com/conorluddy/ios-simulator-skill.git ~/.claude/skills/ios-simulator-skill

然后重启 Claude Code。需要 macOS 12+、Xcode 命令行工具(xcode-select --install)、Python 3。可选:IDB(brew install idb-companion)用于交互功能,Pillow(pip3 install pillow)用于视觉差异。

如何使用这个 Agent?

安装后,技能自动加载。使用其脚本,例如:

构建项目:

python scripts/build_and_test.py --project MyApp.xcodeproj --scheme MyApp

获取错误:

python scripts/build_and_test.py --get-errors xcresult-20251018-143052

点击按钮:

python scripts/navigator.py --find-text 'Login' --tap

列出可点击元素:

python scripts/navigator.py --list-tappable

所有脚本支持 --help。环境变量可调整行为,例如:
export IOS_SIM_BOOT_TIMEOUT=600 # 延长启动超时

典型用法示例:

python scripts/simctl_boot.py --wait-ready
python scripts/simctl_create.py --device 'iPhone 15' --runtime '17.0'

这个 Agent 有哪些优点和局限?

优点
  • 渐进式披露将 token 消耗减少高达 99%(例如登录流程从 400+ 行输出降至 15 行)。
  • 基于可访问性的导航比坐标点击更稳健,可适应 UI 变化。
  • 27 个脚本覆盖全面:构建、测试、设备状态、导航、权限、推送、日志。
  • 所有脚本支持 --json 和 --help,便于 CI 集成。
  • 可高度配置:IO_SIM_* 环境变量调整超时、输出上限和 token 预算。
局限
  • 平台特定:仅适用于 macOS 12+,需要 Xcode 和 iOS 模拟器;不适用于 Android 或 Web。
  • 与 Claude Code 深度集成(作为 Claude Skill 安装);非 SDK 或独立工具。
  • 可选功能(IDB、Pillow)需要额外安装。
  • 针对本地 Apple Silicon 开发调优;在较慢的 CI 运行器上可能需要提升超时和上限。
  • 文档假定用户熟悉 Xcode 项目和模拟器概念。

这个 Agent 与同类方案有什么区别?

与相关度最高的同类 agent 并排比较关键指标。

Agent 源码审查 形态 / 费用 Star 最近更新 主语言 完整支持的平台
iOS 模拟器技能包 当前 62 · 存在缺口 Agent 插件 / 技能免费 ★ 1.3k 今天 Python Claude Code
Agent Device 设备验证 CLI 50 · 缺口较多 命令行工具免费 ★ 5.1k 今天 TypeScript Codex · Claude Code
bdg 浏览器调试 CLI 68 · 存在缺口 命令行工具免费 ★ 177 今天 TypeScript Codex · Claude Code
Tura 65 · 存在缺口 命令行工具免费 + 模型费 ★ 661 12 天前 Rust —

FollowAgents 如何评估这个 Agent?

FollowAgents 源码审查 · FARS-2.1
存在缺口
62/ 100 五分制 3.1 / 5
本评测基于 2026年8月9日 的源码;此后该项目发布了 3 个正式版本,尚未复审。分数与结论只代表评测时的版本。 最近版本 ↓
信任安全 17/29
可靠稳定 9/14
适用触发 12/18
规范维护 11/18
有效结果 9/13
证据核验 4/8
查看各维度的扣分理由
信任安全17 / 29 · 2.9/5

证据显示:脚本通过环境变量配置,默认限制输出,删除模拟器需确认,缓存路径明确,依赖为常见工具。扣分:依赖安全性仅声明版本,未提供锁文件或漏洞扫描;回滚仅依赖模拟器删除/擦除,无专门回滚机制。

可靠稳定9 / 14 · 3.2/5

证据显示:脚本提供--help和--json,错误处理有文档,环境变量解析失败有警告。扣分:未提供测试结果,依赖可用性未验证。

适用触发12 / 18 · 3.3/5

证据显示:面向开发者和AI代理,场景覆盖构建、测试、导航等,触发通过命令行参数精确控制,环境要求明确。扣分:未提供不同环境的详细适配说明。

规范维护11 / 18 · 3.1/5

证据显示:README结构清晰,安装说明详细,命名一致,示例丰富,已知限制有提及,MIT许可证明确。扣分:无CHANGELOG,版本号仅在pyproject中。

有效结果9 / 13 · 3.5/5

证据显示:输出优化,节省token,提供对比数据。扣分:成本效益数据未独立验证。

证据核验4 / 8 · 2.5/5

证据显示:README中的声明与代码结构一致,评估数据有提供。扣分:评估数据未提供原始日志,无法独立验证。

风险与缓解建议
  • 依赖安全性未充分验证,建议检查依赖版本和漏洞。
  • 回滚机制有限,删除模拟器操作需谨慎。
  • 评估数据未提供原始日志,需谨慎对待通过率声明。
证据充分度:低 评估于 2026年8月9日 审查版本 e0ee87a884b4 评估后仓库已有新提交,评分可能未覆盖最新改动
查看完整评分方法 →

最近版本

来自该项目 GitHub Releases 的最新发布记录,说明为上游原文摘录,未经本站改写或测试。

  1. v1.7.0 v1.7.0 — idb 1.7 support and safer simulator automation
    发布说明摘录
    The skill now uses idb 1.7 accessibility actions to reach controls under overlays, replace field values without the keyboard, and inspect web content. It also adds media management and requires explicit confirmation for destructive operations. Migration: destructive commands require --yes Update automation that intentionally erases or deletes simulators, uninstalls apps, or clears photos: - simctl_erase.py: add --yes, including batch modes. - simctl_delete.py: add --yes; interactive prompts have been removed. - app_launcher.py --uninstall: add --yes. …
    在 GitHub 查看 ↗
  2. v1.6.0 v1.6.0 — Codex support and interaction fixes
    发布说明摘录
    The skill now runs in Codex as well as Claude Code, and the gesture, keyboard and navigator scripts actually do what they say. Several of them failed silently: they reported success while doing nothing. Codex support ```bash codex plugin marketplace add conorluddy/ios-simulator-skill codex plugin add ios-simulator-skill@conorluddy ``` You can also install it from /plugins inside Codex. For a manual install, copy the skill folder to ~/.agents/skills/ios-simulator-skill/. The README has a table of user-level and project-level paths for both agents. …
    在 GitHub 查看 ↗
  3. v1.5.0 v1.5.0 — Xcode 27 support via idb-companion 1.5.1+
    发布说明摘录
    If taps, swipes or typing silently stopped working on Xcode 27, upgrade idb: ```bash brew tap facebook/fb brew install facebook/fb/idb-companion facebook/fb/idb-cli ``` Then check your setup with bash scripts/sim_health_check.sh. Xcode 27 support Xcode 27 moved SimulatorKit.framework, and idb-companion builds older than 1.5.1 can't find it. The companion still starts and the accessibility tree still reads correctly, so idb reports success — while every tap, swipe and keystroke is silently dropped. …
    在 GitHub 查看 ↗
在 GitHub 查看 ↗ 安装 ↓

对比同类 Agent

用同一套 FARS 评审,横向比较这个 Agent 所属的短名单。

相关 Agents