From build-visionos-apps
Build, run, and debug visionOS apps on the visionOS Simulator or Apple Vision Pro. Use when launching a visionOS app, wiring a run entrypoint, or diagnosing build, startup, or runtime failures.
How this skill is triggered — by the user, by Claude, or both
Slash command
/build-visionos-apps:build-run-debug-visionosThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill to set up one project-local `script/build_and_run.sh` entrypoint,
Use this skill to set up one project-local script/build_and_run.sh entrypoint,
wire .codex/environments/environment.toml so the Codex app shows a Run button,
then use that script as the default build/run path for the visionOS Simulator.
Prefer shell-first workflows:
./script/build_and_run.sh as the single boot + build + install + launch entrypoint once it existsxcodebuild with a visionOS destination for Xcode projects/workspacesxcrun simctl to boot the simulator, install the .app, launch, and stream logslog stream / xcrun simctl spawn booted log stream for unified loggingvisionOS apps are GUI apps that must run in the Simulator or on device — there is no raw-executable launch path. Do not assume macOS desktop launch or iOS touch-only flows.
If XcodeBuildMCP is available (this plugin wires it via .mcp.json), prefer it
for simulator-aware build/run/install/launch, UI inspection, and log capture.
Fall back to xcodebuild + xcrun simctl immediately when the MCP does not
provide a clean visionOS path.
Discover the project shape.
git rev-parse --is-inside-work-tree; if absent, git init at the
project root (never nest inside an existing parent repo)..xcworkspace, .xcodeproj, Package.swift.xrOS/visionOS deployment
target, ImmersiveSpace/RealityView usage, a RealityKitContent package).Resolve the runnable target, scheme, and bundle id.
xcodebuild -list to enumerate schemes; prefer the app scheme.PRODUCT_BUNDLE_IDENTIFIER) — needed to launch
and to filter logs.Pick a simulator destination.
xcrun simctl list devices visionOS to find a booted/available device.platform=visionOS Simulator,name=Apple Vision Pro.xcrun simctl boot "Apple Vision Pro" then open -a Simulator.Create or update script/build_and_run.sh (see references/run-button-bootstrap.md).
.app → launch → (optional) stream logs.--logs, --debug (lldb attach), --device, --verify.Write .codex/environments/environment.toml once the script exists, with a
Run action pointing at ./script/build_and_run.sh (exact shape in references).
Build and run through the script. Default to ./script/build_and_run.sh.
Summarize failures correctly.
Debug the right way.
--logs (unified logging filtered to the app subsystem) for lifecycle,
immersive-space, and authorization issues.--debug / lldb for symbolicated crash debugging.The visionOS Simulator does not provide:
Recommend an Apple Vision Pro device when the task depends on hand/eye input, world sensing, or true immersive rendering. Never claim simulator behavior proves device behavior for those features.
find . -name '*.xcworkspace' -o -name '*.xcodeproj' -o -name 'Package.swift'xcodebuild -list -workspace <ws> / -project <proj>xcrun simctl list devices visionOSxcodebuild -scheme <S> -destination 'platform=visionOS Simulator,name=Apple Vision Pro' buildxcrun simctl boot, xcrun simctl install booted <app>, xcrun simctl launch booted <bundle-id>xcrun simctl spawn booted log stream --level debug --predicate 'subsystem == "<bundle-id>"'references/run-button-bootstrap.md: canonical visionOS build_and_run.sh and
.codex/environments/environment.toml contract.developer.apple.com/documentation/visionos (Getting started),
"Running your app in the simulator or on a device".build_and_run.sh can own the workflow..codex/environments/environment.toml before the script exists,
and do not point the Run action at a stale path.script/build_and_run.sh.Provide: detected project type and platform; the script path and Codex Run action configured; the destination used; whether build/install/launch succeeded; the top blocker if they failed; and the smallest sensible next action.
npx claudepluginhub likw99/agent-plugins --plugin build-visionos-appsGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.