Builds, runs, and debugs macOS apps using shell-first Xcode and Swift workflows. Creates a project-local build-and-run script with optional flags for lldb, log streaming, and process verification.
Ships in build-macos-apps. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
xcode, swift, macos, build-script, debugging, shell-workflow
/build-macos-apps:build-run-debugfrom build-macos-apps
npx claudepluginhub kael-odin/codex-plugins-zh --plugin build-macos-apps11 skills in this plugin
/appkit-interopBridge macOS SwiftUI into AppKit narrowly. Use when implementing representables, reaching NSWindow or panels, handling menus, or using the responder chain./liquid-glassImplement and review macOS SwiftUI Liquid Glass UI. Use when adopting system glass, removing conflicting custom chrome, or building glass surfaces./packaging-notarizationPrepare macOS packaging and notarization workflows. Use when archiving apps, validating bundles, or explaining distribution-only failures./signing-entitlementsInspect macOS signing, entitlements, and Gatekeeper issues. Use when diagnosing code signing, sandbox, hardened runtime, or trust failures./swiftpm-macosBuild, run, and test SwiftPM macOS packages and executables. Use when the repo is package-first or has no Xcode project./swiftui-patternsBuild macOS SwiftUI scenes and components with desktop patterns. Use when shaping windows, commands, toolbars, settings, split views, or inspectors.Other plugins' skills for the same job