plugins/build-macos-apps/skills/build-run-debug/SKILL.md
Build, run, and debug macOS apps with shell-first Xcode and Swift workflows. Use when launching apps or diagnosing build, startup, or runtime failures.
npx skillsauth add openai/plugins build-run-debugInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
Prefer shell-first workflows:
./script/build_and_run.sh as the single kill + build + run entrypoint once it existsxcodebuild for Xcode workspaces or projectsswift build plus raw executable launch inside that script for true SwiftPM command-line toolsswift build plus project-local .app bundle staging and /usr/bin/open -n launch for SwiftPM AppKit/SwiftUI GUI appslldb, log stream, telemetry verification, or post-launch process checksDo not assume simulators, touch interaction, or mobile-specific tooling.
If an Xcode-aware MCP surface is already available and the user explicitly wants it, use it only where it fits. Keep that usage narrow and honest: prefer it for Xcode-oriented discovery, logging, or debugging support, and do not force simulator-specific workflows onto pure macOS tasks.
Discover the project shape.
git rev-parse --is-inside-work-tree.git init at the project/workspace root before building so Codex app git-backed features are available. Never run git init inside a nested subdirectory when the current workspace already belongs to a parent repo..xcworkspace, .xcodeproj, and Package.swift.Resolve the runnable target and process name.
.app bundle for AppKit/SwiftUI GUI apps.Create or update script/build_and_run.sh.
--debug to launch under lldb or attach the debugger--logs to stream process logs after launch--telemetry to stream unified logs filtered to the app subsystem/category--verify to launch the app and confirm the process exists with pgrep -x <AppName>swift build, locate the artifact, then invoke an ad hoc run command.dist/<AppName>.app, copy the binary to Contents/MacOS/<AppName>, generate a minimal Contents/Info.plist with CFBundlePackageType=APPL, CFBundleExecutable, CFBundleIdentifier, CFBundleName, LSMinimumSystemVersion, and NSPrincipalClass=NSApplication, then launch with /usr/bin/open -n <bundle>.--logs and --telemetry, launch the bundle with /usr/bin/open -n first, then stream unified logs with /usr/bin/log stream --info ....references/run-button-bootstrap.md as the canonical source for the
script shape and exact environment file format. Do not fork a second
authoritative snippet in another skill or command.script/build_and_run.sh, not in App/, Views/, Models/, Stores/, Services/, or Support/.Write .codex/environments/environment.toml at the project root once the script exists.
.codex/environments/environment.toml.references/run-button-bootstrap.md.Run action command to point at ./script/build_and_run.sh instead of creating a duplicate action.Build and run through the script.
./script/build_and_run.sh../script/build_and_run.sh --debug, --logs, --telemetry, or --verify when the user asks for debugger/log/telemetry/process verification support.Summarize failures correctly.
Debug the right way.
--logs or --telemetry mode for config, entitlement, sandbox, and action-event verification.NSApp.setActivationPolicy(.regular) and NSApp.activate(ignoringOtherApps: true).--debug mode or direct lldb if symbolized crash debugging is needed.telemetry.Use Xcode-aware MCP tooling only when it helps.
find . -name '*.xcworkspace' -o -name '*.xcodeproj' -o -name 'Package.swift'xcodebuild -list -workspace <workspace>xcodebuild -list -project <project>./script/build_and_run.sh./script/build_and_run.sh --debug./script/build_and_run.sh --logs./script/build_and_run.sh --telemetry./script/build_and_run.sh --verifyreferences/run-button-bootstrap.md: canonical build_and_run.sh and .codex/environments/environment.toml contract.build_and_run.sh script can own the workflow..codex/environments/environment.toml before the run script exists, and do not point the Run action at a stale script path.Provide:
tools
Top-level workflow skill for USD performance diagnosis and optimization. Use for slow loading, high memory, low FPS, or 'optimize my scene' requests; delegates auth/runtime setup to Phase 0 owners.
data-ai
Use when the user mentions MagicPath, designs, UI components, themes, canvas selections, or repo-to-canvas UI work; run magicpath-ai to search, inspect, install, or author components.
documentation
Use as the top-level router for Omniverse Realtime Viewer USD app requests and focused viewer reference documents.
tools
Turn Notion specs into implementation plans, tasks, and progress tracking; use when implementing PRDs/feature specs and creating Notion plans + tasks from them.