$npx -y skills add stablyai/orca --skill orca-emulatorControl a mobile (iOS) emulator / simulator stream from inside Orca using the orca CLI. Use for taps, gestures, typing, hardware buttons, camera injection, permissions, accessibility tree, and more — all while seeing the live view in Orca's emulator pane. Prefer this over raw `
| 1 | # Orca Emulator (serve-sim powered) |
| 2 | |
| 3 | Drive an Apple Simulator (iOS / iPad / Watch) **from within Orca** using `ORCA emulator ...` commands (or `ORCA emulator exec` for raw power). This wraps the excellent [serve-sim](https://github.com/EvanBacon/serve-sim) open-source tool so agents get a consistent Orca-native CLI surface, automatic helper management, and seamless integration with Orca's live emulator pane (the visual "preview" surface). |
| 4 | |
| 5 | The underlying serve-sim helper captures the real simulator framebuffer (via private SimulatorKit / IOSurface for low-latency 60fps H.264 or MJPEG) and exposes a WebSocket control channel. Orca's bridge owns the helper processes and per-worktree "active emulator" state so unqualified commands "just work" on whatever device/pane is current for the worktree. |
| 6 | |
| 7 | ## CLI executable |
| 8 | |
| 9 | Choose the Orca executable once: use the `ORCA_CLI_COMMAND` environment value when set; |
| 10 | otherwise use `orca-dev` in a dev session exposing `ORCA_DEV_REPO_ROOT`, `orca-ide` on |
| 11 | Linux outside an Orca-managed terminal, and `orca` everywhere else. Never try bare |
| 12 | `orca` first on unmanaged Linux because it normally resolves to the GNOME screen reader. |
| 13 | |
| 14 | In every command example — fenced blocks, tables, and prose — `ORCA` is a documentation |
| 15 | placeholder. Replace it with the chosen executable before running the command; do not |
| 16 | create a shell variable or run `ORCA` literally. The command examples are intentionally |
| 17 | shell-neutral for POSIX shells, PowerShell, and cmd.exe. |
| 18 | |
| 19 | ## When to use |
| 20 | |
| 21 | - The user/agent wants to **tap, swipe, drag, pinch, or press hardware buttons** on a running iOS simulator while seeing the live result in Orca. |
| 22 | - You want **camera injection** (placeholder, webcam, or file loop) for testing camera flows. |
| 23 | - You need to **grant/revoke app permissions** (camera, photos, notifications, location, etc.) or read the **accessibility tree**. |
| 24 | - Rotate the device, simulate memory warnings, toggle CoreAnimation debug overlays, etc. |
| 25 | - You are inside an Orca worktree/terminal and want the emulator to be **workspace-scoped** (like browser tabs) with explicit targeting when needed. |
| 26 | - The agent should use Orca's preview pane instead of external Simulator.app or raw serve-sim URLs. |
| 27 | |
| 28 | **When NOT to use** |
| 29 | - Android emulators → use the `orca-emulator-android` skill (same `ORCA emulator` namespace, cross-platform via adb/emulator). |
| 30 | - Building or installing the app itself → use `xcodebuild`, `xcrun simctl install`, `expo run:ios`, etc. (launch the app, then use `ORCA emulator` to drive it). |
| 31 | - In-app debugging (state, network, views) → use the app's own tools or the browser pane if it's a webview. |
| 32 | - Remote/SSH worktrees for emulator control (currently out of scope / unsupported; simulator hardware is local to a Mac). |
| 33 | |
| 34 | ## Prerequisites (enforced / surfaced by Orca) |
| 35 | |
| 36 | - macOS host (with Xcode Command Line Tools: `xcrun --version`). |
| 37 | - A booted simulator (`xcrun simctl list devices booted` or let Orca/attach help boot one). |
| 38 | - Node available (for the serve-sim bits; Orca bundles the CLI surface). |
| 39 | - macOS 14+ recommended for full camera injection features. |
| 40 | |
| 41 | Orca will give clear errors if these are missing (e.g. "emulator commands require macOS + Xcode tools"). |
| 42 | |
| 43 | An active emulator "session" for the worktree is required for most commands. Use `ORCA emulator list` / `attach` or open the emulator pane in the UI. |
| 44 | |
| 45 | ## Mental model |
| 46 | |
| 47 | ```text |
| 48 | ┌────────────────────┐ |
| 49 | │ Orca worktree │ |
| 50 | │ - active emulator │◄── ORCA emulator tap / type / ... |
| 51 | │ - live pane (UI) │ |
| 52 | └─────────┬──────────┘ |
| 53 | │ (registers active stream) |
| 54 | ▼ |
| 55 | ┌────────────────────┐ WS / control ┌─────────────────┐ framebuffer ┌──────────────┐ |
| 56 | │ Orca EmulatorBridge│ ───────────────► │ serve-sim-bin │ ────────────► │ iOS Simulator│ |
| 57 | │ (main process) │ (or exec serve-sim) (per-device) │ └──────────────┘ |
| 58 | └────────────────────┘ └─────────────────┘ |
| 59 | ▲ |
| 60 | │ (state + lifecycle) |
| 61 | ┌────────────────────┐ |
| 62 | │ orca CLI (agents) │ e.g. ORCA emulator tap 0.5 0.7 |
| 63 | │ orca-emulator skill│ |
| 64 | └────────────────────┘ |
| 65 | ``` |
| 66 | |
| 67 | Orca owns: |
| 68 | - Starting/stopping the serve-sim helper (via --detach or direct). |
| 69 | - Per-worktree "active" emulator (like active browser tab). |
| 70 | - Explicit targeting with `--worktree`, `--device`, `--emulator <id>`. |
| 71 | - The visual live pane (renderer uses serve-sim-client for the stream). |
| 72 | |
| 73 | Agents use the Orca executable chosen above (on PATH i |