Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

serve-sim

БесплатноЗапускает вложенные скриптыНе проверен

Control and stream a running iOS, iPad, or Apple Watch Simulator with npx serve-sim. Use for simulator preview, accessibility refs (ax --refs, tap @eN…

EvanBaconот EvanBacon★ 2 962 звезды на GitHub

Об этом скилле

serve-sim

Drive an Apple Simulator (iOS, iPad, Apple Watch) from an agent using the serve-sim CLI. serve-sim spawns a Swift helper that captures the simulator framebuffer via simctl io, exposes it as an MJPEG stream plus a binary WebSocket input channel, and serves a React preview UI on top. This skill teaches an agent the exact CLI surface, the gesture JSON shape, the gotchas, and the recommended workflows.

When to use

  • The user wants an agent to tap, swipe, drag, pinch, or send hardware buttons to a running Apple Simulator.
  • The user wants to stream a simulator to a browser (local, LAN, or tunneled) for review or remote control.
  • The user wants to inject a synthetic camera feed (file, webcam, or animated placeholder) into a specific app on the simulator.
  • The user wants to toggle CoreAnimation debug overlays (off-screen rendering, blended layers, slow animations) for performance work.
  • The user wants to simulate a memory warning or rotate the device programmatically.
  • The user wants to read the simulator's accessibility tree to find UI elements without pixel hunting.
  • The user wants to grant, revoke, or reset an app's privacy permissions — camera, photos, location, contacts, or push notifications.
  • The user wants to record the screen or inspect what just happened (serve-sim record / buffer) without opening a video by hand.
  • Taps or typing have stopped working and serve-sim or doctor pointed at repair-input.

When NOT to use

  • Android emulators → use adb shell tooling.
  • Building or installing an iOS app → use xcodebuild or xcrun simctl install.
  • React Native in-app runtime debugging (Redux state, network inspection, component tree) → use rn-debugger tooling.
  • Real iOS hardware devices → use xcrun devicectl or Xcode.

Prerequisites

Before any other action, verify the host satisfies these. If something is missing, tell the user exactly what to install — do not proceed.

Requirement Check command Why
macOS host uname -s returns Darwin serve-sim only runs on macOS
Xcode CLI tools xcrun --version exits 0 simctl is the underlying simulator driver
Node.js ≥20 node --version ≥20 serve-sim is an npm package run via npx
macOS 14+ (optional) sw_vers -productVersion ≥14 Required ONLY for camera subcommand

A bundled helper script is available: scripts/check-prereqs.sh. Run it; if it exits non-zero, surface the message to the user.

A booted simulator is required for most subcommands. Check with xcrun simctl list devices booted. If none are booted, tell the user to open Xcode → Simulator or to run xcrun simctl boot <UDID>.

Mental model

┌──────────────┐  simctl io  ┌─────────────────┐  MJPEG / WS  ┌─────────┐
│ iOS Simulator│ ──────────► │ serve-sim-bin   │ ───────────► │ Browser │
└──────────────┘   (Swift)   │ (per-device)    │              └─────────┘
                             └─────────────────┘
                                     ▲
                              state file in
                            $TMPDIR/serve-sim/
                                     ▲
                            ┌──────────────────┐
                            │ serve-sim CLI    │
                            └──────────────────┘

Key invariants the agent must respect:

  • All coordinates are normalized 0..1, with (0, 0) at top-left and (1, 1) at bottom-right of the display. Never pass pixel coordinates.
  • One helper per device. Multiple booted simulators are supported by passing several device names or by attaching to all.
  • State lives in $TMPDIR/serve-sim/server-{udid}.json. Use serve-sim --list to query it; do not read the JSON directly unless you know what you are doing.
  • The orientation set via rotate is remembered by the helper, and subsequent gestures are rotated client-side. An agent that sends raw coords after a rotation does not need to compensate manually.

Common operations

Goal Command Notes
Start preview server npx serve-sim [device] Default preview at http://localhost:3200, stream at :3100. Foreground process.
Start headless / daemon npx serve-sim --detach [device] Returns JSON with pid, port, url. Use for agent loops.
Show stream in host's preview npx serve-sim --detach -q → hand off url to host preview tool See "Showing the stream in your agent's preview" section.
List running streams npx serve-sim --list Add -q for JSON-only output.
Stop all helpers npx serve-sim --kill Pass [device] to stop a specific one.
Single tap npx serve-sim tap <x> <y> <x> <y> in 0..1. Use this, not gesture, for plain taps. See "Critical gotcha" below.
Multi-step gesture npx serve-sim gesture '<json>' See references/gestures.md.
Hardware button `npx
Полный SKILL.md на GitHub

Установить serve-sim в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

README.mdevals/evals.jsonreferences/agent-guide.mdreferences/buttons-rotation.mdreferences/ca-debug.mdreferences/camera.mdreferences/endpoints.mdreferences/gestures.mdreferences/permissions.mdreferences/workflows.mdscripts/check-prereqs.shscripts/ensure-running.sh

FAQ

Что делает скилл serve-sim?

Control and stream a running iOS, iPad, or Apple Watch Simulator with npx serve-sim. Use for simulator preview, accessibility refs (ax --refs, tap @eN --settle), taps, gestures, hardware buttons, rotation, camera injection, permissions, recording and the rolling buffer, the persistent control process, repair-input, and CoreAnimation debug.

Как установить скилл serve-sim?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл serve-sim запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить serve-sim с