simulator-workflow

A workflow for building, installing, and launching iOS apps on simulators. An iOS simulator is a computer-based device environment for running an app without a physical iPhone.

In plain words
What is it for?
Use it to build Bazel iOS targets, locate the resulting app bundle, resolve or boot a simulator, install the app, read its bundle ID, and launch it.
Why use it?
It standardizes the path from a Bazel build to finding the app, choosing a simulator, installing the app, and launching it.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/debugswift/xcodebazelmcp/simulator-workflow
Any agent
npx skills add DebugSwift/XcodeBazelMCP --skill simulator-workflow
Clone the repo
git clone --depth 1 https://github.com/DebugSwift/XcodeBazelMCP

Made for: Claude Code, Codex.

Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 699 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00040 $0.00699
Opus 5 $0.00020 $0.00349
Sonnet 5 $0.00008 $0.00140
Haiku 4.5 $0.00004 $0.00070

Measured yesterday against content hash 618cbaadf51c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

simulator-workflow scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

6. **Read bundle ID** — `plutil -convert json -o -` on `Info.plist` (sync `execSync`)
.agents/skills/simulator-workflow/SKILL.md · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Simulator Workflow

Build + Run + Launch Chain

The bazel_ios_build_and_run tool chains these steps (each failure short-circuits):

  1. Buildbazel build <target>
  2. Find app — search bazel-bin/ using target label's package path
  3. Resolve simulator — priority: explicit UDID > name match > first booted > first available iPhone > first available device
  4. Boot — lazy, only simctl boot if state != Booted
  5. Installsimctl install <udid> <app_path>
  6. Read bundle IDplutil -convert json -o - on Info.plist (sync execSync)
  7. Launchsimctl launch <udid> <bundleId>

App Bundle Discovery

  • After bazel build, search bazel-bin/ using the target label's package path.
  • Target //:Foobazel-bin/Foo.app, //Apps/Bar:Barbazel-bin/Apps/Bar/Bar.app.
  • rules_apple places bundles inside <target>_archive-root/Payload/findAppBundle searches recursively.

Simulator Resolution

resolveSimulator returns { device: SimulatorDevice; warning?: string }:

  • warning is set when the resolved simulator is not the explicitly requested one (fallback).
  • resolveSimulatorFromArgs in helpers.ts is the convenience wrapper — returns { sim, warning }.
  • prependWarning(message, warning) prepends the warning to tool output.

Launch Environment Variables

Env vars are passed via SIMCTL_CHILD_* prefix convention — simctl forwards them to the launched process.

For Cursor DEBUG MODE (NDJSON hypothesis logs), use the swift-agent-debug-log skill and bazel_ios_agent_debug_* tools:

  • AGENT_DEBUG_LOG_PATH / AGENT_DEBUG_SESSION_ID via launchEnv on build_and_run or agent_debug_repro
  • Simulator fallback: Documents/agent-debug.ndjson + bazel_ios_agent_debug_log_pull
  • Do not rely on the sim app writing directly to .cursor/debug-*.log on the host

Platform CPU Flags

Platform Flag
iOS simulator --ios_multi_cpus=sim_arm64
iOS device --ios_multi_cpus=arm64
macOS (none — host arch)
tvOS --tvos_cpus=sim_arm64
watchOS --watchos_cpus=arm64
visionOS --visionos_cpus=sim_arm64

Read the full file on GitHub · 60 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 60 lines · 40 tokens per session scan A 618cbaadf51c

Subscribe to this mod's changes

simulator-workflow is a skill published in the GitHub repository DebugSwift/XcodeBazelMCP (7 stars, last pushed 1mo ago), licensed MIT. It adds 40 tokens to every session and 699 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.