serve-sim

GitHub

用于在终端中流式传输和控制已启动的 Apple iOS 模拟器,提供构建、安装、启动应用及通过浏览器预览进行点击、输入、手势等操作的能力。

.agents/skills/serve-sim/SKILL.md openchamber/openchamber

触发场景

需要在终端操作 iOS 模拟器而不打开 Xcode 需要自动化测试或控制 Capacitor iOS 应用界面交互

安装

npx skills add openchamber/openchamber --skill serve-sim -g -y
更多选项

非标准路径

npx skills add https://github.com/openchamber/openchamber/tree/main/.agents/skills/serve-sim -g -y

不安装直接使用

npx skills use openchamber/openchamber@serve-sim

指定 Agent (Claude Code)

npx skills add openchamber/openchamber --skill serve-sim -a claude-code -g -y

安装 repo 全部 skill

npx skills add openchamber/openchamber --all -g -y

预览 repo 内 skill

npx skills add openchamber/openchamber --list

SKILL.md

Frontmatter
{
    "name": "serve-sim",
    "description": "Use when working with the OpenChamber iOS Simulator app without opening Xcode - boot\/install\/launch the Capacitor iOS app, start a browser stream, tap\/type\/gesture\/rotate, inspect accessibility, or hand a simulator URL to the user."
}

serve-sim

Use serve-sim to stream and control a booted Apple Simulator from the terminal. It captures the simulator framebuffer, serves a browser preview, and exposes CLI controls for taps, typing, gestures, hardware buttons, rotation, memory warnings, permissions, camera injection, and accessibility inspection.

Scripted Workflow

Run the discrete scripts from the repository root so each step has an observable completion boundary:

  1. Build the simulator app:

    bun run mobile:build:ios:simulator
    
  2. Boot if needed, install, and launch:

    bun run mobile:sim:run
    
  3. Start the detached browser stream:

    bun run mobile:sim:serve
    

    Surface the returned JSON url; it is the only authoritative stream address.

  4. Stop helpers when finished unless the user asks to keep them running:

    bun run mobile:sim:kill
    

Completion means the app launched, the returned stream URL was surfaced, requested interactions were verified, and helpers were stopped or intentionally left running.

Manual Controls

  • Tap normalized coordinates: bunx serve-sim tap 0.5 0.5
  • Type focused text: bunx serve-sim type "hello"
  • Hardware home: bunx serve-sim button home
  • Rotate: bunx serve-sim rotate portrait
  • List streams: bunx serve-sim --list -q
  • Accessibility tree: curl http://localhost:3100/ax

Run direct CLI commands from packages/mobile (the binary lives in that package; plain serve-sim inside with-mobile-env.mjs from elsewhere fails with command not found).

Coordinates are normalized 0..1, not pixels. Prefer tap for simple taps; do not emulate taps using separate gesture begin/end commands because that can register as long press.

Preconditions

  • macOS host.
  • Xcode installed; use DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer if xcode-select points at CommandLineTools.
  • Node 18+.
  • At least one simulator can be booted with xcrun simctl.

Use the scripts above instead of opening Xcode for build/install/launch. Consume JSON output rather than parsing human output. If accessibility lookup cannot identify a target, report the missing target instead of guessing coordinates.

版本历史

  • 2db90f7 当前 2026-08-20 04:55

    优化了 Agent 技能指导说明;此前版本新增了单命令移动模拟器开发循环及更新文档。

  • 74b1bd8 2026-07-25 10:37

同 Skill 集合

.agents/skills/changelog-authoring/SKILL.md
.agents/skills/clack-cli-patterns/SKILL.md
.agents/skills/communication-style/SKILL.md
.agents/skills/desktop-shell/SKILL.md
.agents/skills/drag-to-reorder/SKILL.md
.agents/skills/locale-ui-patterns/SKILL.md
.agents/skills/openchamber-change-discipline/SKILL.md
.agents/skills/performance-engineering/SKILL.md
.agents/skills/pr-review/SKILL.md
.agents/skills/relay-transport/SKILL.md
.agents/skills/settings-ui-patterns/SKILL.md
.agents/skills/sync-state-invariants/SKILL.md
.agents/skills/theme-system/SKILL.md
.agents/skills/triage-issues/SKILL.md
.agents/skills/triage-prs/SKILL.md
.agents/skills/ui-api-decoupling/SKILL.md
.agents/skills/update-changelog/SKILL.md
.agents/skills/writing-for-agents/SKILL.md

元信息

文件数
0
版本
2471b29
Hash
ee890d59
收录时间
2026-07-25 10:37

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-17 20:07
浙ICP备14020137号-1