Skip to main content
skill CX Codex GP ChatGPT official · OpenAI

ios-simulator-browser — Codex skill: what it does, how to install

Mirrors an iOS Simulator into the Codex in-app browser and renders SwiftUI previews from Swift packages with hot reload. Useful for testing UI and capturing visual proof without Xcode Canvas.

Install into Codex · Skills CLI (Vercel) All methods and platforms ↓
npx skills add openai/plugins --skill ios-simulator-browser -a codex
Open on GitHub

What ios-simulator-browser does

The skill streams an active iOS Simulator into the Codex in-app browser using serve-sim. It retrieves the simulator identifier with xcrun simctl list devices available and opens the local preview stream. A termination trap automatically halts background processes when the terminal session closes.

Previews rely on the bundled script swiftui-preview-browser.mjs. It builds a temporary host application outside the user repository and monitors the chosen Package.swift target. Code changes swap into the simulator via a recompiled dylib. Previews refresh immediately without app restarts. The helper supports both PreviewProvider and #Preview declarations. It never modifies .xcodeproj files or build settings.

Install this skill when developing SwiftUI components inside modular Swift packages. It removes the need for Xcode Canvas during review. Skip it if your project relies on a monolithic application without standalone package targets.

What it helps with

  • mirror an iOS Simulator into the Codex in-app browser
  • render SwiftUI previews outside Xcode Canvas
  • hot-reload preview changes via dylib injection without app relaunches
  • capture browser screenshot proof of running mobile interfaces

Example prompts for the agent

  • Start mirroring the iOS simulator in Codex using serve-sim.
  • Render SwiftUI previews from Package.swift with hot reload enabled.
  • Launch StatusRowView_Previews in the simulator and capture browser proof.

How to install ios-simulator-browser

1Skills CLI (Vercel)

npx skills add openai/plugins --skill ios-simulator-browser -a codex

2Manually: put the files in place

.agents/skills/ios-simulator-browser/SKILL.md

For all projects use ~/.agents/skills/

From the same set201

The whole set →
supabase official supabase Guides the agent through database configuration and strict RLS policies in Supabase. CX Codex GP ChatGPT 8installs remotion-render official Remotion Exports videos and static stills from Remotion projects using CLI commands. CX Codex GP ChatGPT 3installs figma-create-new-file official Figma Creates blank Figma, FigJam, or Slides files inside draft folders. It resolves planKey and editor types before invoking Figma MCP tools. CX Codex GP ChatGPT 6installs swiftui-performance-audit official OpenAI Pinpoints SwiftUI runtime issues like frame drops, unresponsive taps, and excessive view body computations. Works code-first and guides Instruments profiling. CX Codex GP ChatGPT 109installs swiftui-liquid-glass official OpenAI This skill helps build and review SwiftUI Liquid Glass interfaces for iOS 26+. Use it when adopting the API or checking fallbacks, interaction, and design fit. CX Codex GP ChatGPT 121installs swiftui-ui-patterns official OpenAI This skill helps build and refactor SwiftUI interfaces, from navigation and state to layouts and controls. Use it for new screens or changes to an existing project. CX Codex GP ChatGPT 114installs swiftui-view-refactor official OpenAI Refactors SwiftUI view files into clean, testable structures with dedicated subview types and proper Observation ownership. CX Codex GP ChatGPT 113installs ios-memgraph-leaks official OpenAI Captures and inspects iOS leaks from a simulator process or .memgraph. Useful for tracing retained objects and checking a fix with before-and-after evidence. CX Codex GP ChatGPT 1,054installs

Similar

Questions about ios-simulator-browser

How do I install ios-simulator-browser in Codex?

Run npx skills add openai/plugins --skill ios-simulator-browser in your terminal. Codex registers the skill under .agents/skills/ios-simulator-browser/SKILL.md.

What does ios-simulator-browser do?

It mirrors an iOS Simulator screen into the Codex in-app browser and renders live SwiftUI previews from Swift packages. Code edits hot-swap dynamically without restarting the application.

Does the skill modify existing Xcode project files?

No, it creates a disposable host application outside your source tree. It does not touch your .xcodeproj, .xcworkspace, schemes, or build settings.

Source text

SKILL.md · MIT
---
name: ios-simulator-browser
description: Mirror an iOS Simulator into the Codex in-app browser and render SwiftUI previews from importable Swift packages in that simulator with hot reload. Use when a user wants to watch or interact with an iOS app in the browser, see a SwiftUI preview outside Xcode Canvas, iterate live on a preview, or capture browser-visible simulator proof.
---

# iOS Simulator Browser

## Browser Workflow

1. Obtain an explicit Simulator UDID from the existing iOS build/run workflow or from `xcrun simctl list devices available`.
2. Start `serve-sim` in a long-running terminal pinned to that simulator. Clean up any tracked stale helper for this simulator before starting, and install a trap so the helper is cleaned up when this terminal exits:

   ```bash
   SIM="<simulator-udid>"
   cleanup_serve_sim() {
     npx --yes serve-sim@latest --kill "$SIM" >/dev/null 2>&1 || true
   }
   trap cleanup_serve_sim EXIT INT TERM HUP
   cleanup_serve_sim
   npx --yes serve-sim@latest "$SIM"
   ```

3. Open the exact local preview URL printed by `serve-sim` in the Codex in-app browser.
4. Verify that a real frame is rendering before reporting success. A loaded page alone is not proof that the simulator stream is healthy.

- Keep the terminal alive while the browser mirror is in use. When finished, stop the terminal and wait for it to exit so the trap runs.
- If the terminal disappeared or did not exit cleanly, run `npx --yes serve-sim@latest --kill "$SIM"` before starting another mirror for that simulator.
- Never run an unscoped `serve-sim --kill`; another thread may own a different simulator mirror.

## SwiftUI Preview Workflow

Use the bundled launcher when the requested previews live in an importable Swift package. Point it at the package manifest and select the target whose previews should be displayed. It generates a disposable host project outside the user's source tree, installs and launches that host in Simulator, and watches the package for edits.

```bash
node <skill-root>/scripts/swiftui-preview-browser.mjs \
  /absolute/path/to/Package.swift \
  --package-target "<target>" \
  --device "<simulator-udid>"
```

- Watch mode is enabled by default. On a Swift package source edit, the launcher rebuilds a generated dylib and hot-swaps it into the running host without relaunching the app.
- The generated host shows every preview variant discovered in the selected Swift Package target with in-simulator page controls. To show a subset instead, pass `--preview-filter <regex[, ...]>`; it matches display names and code identifiers such as `StatusRowView_Previews`.
- Once the launcher prints the selected Simulator UDID, start `serve-sim` for that same UDID and open its printed URL in the in-app browser.

## Support Boundary

- Support Swift Package-backed `PreviewProvider` and `#Preview` declarations through the generated host.
- Do not edit the user's `.xcodeproj`, `.xcworkspace`, `Package.swift`, schemes, or build settings to force preview support.

## Proof

For browser or preview QA, capture a browser screenshot showing the simulator frame. For hot reload QA, also report the launcher's `hot reloaded package preview ... in pid ...` output and show the changed frame after editing.

© OpenAI · MIT · openai/plugins

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor