/apple-dev:xcodebuildmcp-build-loopfrom apple-dev
Set up and use XcodeBuildMCP to compile and test Xcode projects after Swift edits. Use after any edit to a `.xcodeproj` or `Package.swift`. Triggers on `xcodebuild`, simulator build, build verification, agent-driven iOS development.
Ships in apple-dev. 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.
The build is the test. After any non-trivial Swift edit, compile the project end to end on a real simulator (or macOS scheme) through XcodeBuildMCP. Fix failures before continuing. Type checker passing is not enough.
Any task that edits Swift, SwiftUI, Package.swift, asset catalogs, or Xcode project settings in a repo built with xcodebuild (.xcodeproj or .xcworkspace). Skip only for pure docs or non-Swift changes.
The Swift type checker passes long before the project actually links. SwiftUI semantics, @Observable registration, Sendable and MainActor isolation, package dependency resolution, and platform availability gates only fail at the full build or at runtime. A green editor with a red xcodebuild is a regression you will ship.
npm install -g xcodebuildmcp (or use npx xcodebuildmcp from the MCP config).~/.claude/settings.json or .mcp.json). Use the package's documented command and args (typically npx -y xcodebuildmcp).mcp__XcodeBuildMCP__* appear. If not, the MCP did not start; see references/setup-and-commands.md.mcp__XcodeBuildMCP__build_sim_name_proj for iOS / iPadOS / visionOS simulators, or build_mac_proj for macOS. Pass projectPath, scheme, simulatorName (for sim builds).mcp__XcodeBuildMCP__test_sim against the relevant per-package test scheme.Once per session, set defaults so subsequent calls stay short:
mcp__XcodeBuildMCP__session-set-defaults
projectPath: "<ABSOLUTE_PATH_TO_XCODEPROJ>"
simulatorName: "iPhone 16"
Then later calls can omit projectPath and simulatorName.
If you do not know the scheme name, list schemes first with mcp__XcodeBuildMCP__list_schems_proj.
Package.swift.mcp__XcodeBuildMCP__* tools do not appear in the session. Cause: the MCP server did not start. Fix: check the registration in ~/.claude/settings.json (or .mcp.json), run npx -y xcodebuildmcp --help in a shell to verify the binary resolves, then restart Claude Code.No such module 'X'. Cause: the target imports X but does not depend on the package that vends it. Fix: add the missing .product(name: "X", package: "X") to target.dependencies in Package.swift.xcrun simctl list devices available, copy a name verbatim (case, spacing), update session-set-defaults.clean_proj. Cause: stale DerivedData (often after a branch switch or deployment-target bump). Fix: call clean_proj first; if persistent, delete ~/Library/Developer/Xcode/DerivedData/<ProjectHash>.Eight more failure modes with fix recipes live in references/common-errors.md.
references/setup-and-commands.md: concrete tool signatures, scheme discovery, multi-package projects, MCP connectivity checks.references/common-errors.md: one-screen remediation recipes for the recurring xcodebuild failure modes.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
8 skills in this plugin
/add-approuterAdopt AppRouter (github.com/dimillian/AppRouter) for type-safe SwiftUI navigation with sheets and deep linking. Use when starting an app's nav layer or replacing ad-hoc `NavigationStack` path management. SimpleRouter or tab Router./foundation-models-integrationAdd Apple's on-device Foundation Models (Apple Intelligence) to a SwiftUI app: streaming, `@Generable` structured output, `Tool` protocol, availability checks. iOS / iPadOS / macOS / visionOS 26+. Triggers on `SystemLanguageModel`, `LanguageModelSession`, `@Generable`./ios26-liquid-glass-adoptionAdopt iOS 26 / iPadOS 26 / macOS 26 SwiftUI APIs: Liquid Glass, modernized toolbars and tab bars, matched transitions, scroll position. Triggers: `glassEffect`, `buttonStyle(.glass)`, `ToolbarSpacer`, `matchedTransitionSource`, `tabBarMinimizeBehavior`./modular-package-skeletonScaffold a new iOS, iPadOS, macOS, or visionOS app with the canonical modular SwiftPM layout (Models, Network, Env, DesignSystem, per-feature UI packages). Use when starting a new SwiftUI app or restructuring a monolithic Xcode project into Swift Packages./refactor-to-no-viewmodelMigrate legacy SwiftUI code from ObservableObject + @Published + ViewModel patterns to @Observable + @Environment + view-state enums. Use when modernizing an iOS or macOS codebase, removing ViewModel layers, or replacing Combine with async/await./swiftui-doctrineApply modern SwiftUI conventions on Apple platforms (iOS, iPadOS, macOS, visionOS). Triggers on SwiftUI views, `@Observable` services, `NavigationStack`, Swift `async/await`, and Apple-platform project work. Enforces no-ViewModel, modular SwiftPM.npx claudepluginhub joaquincampo/my-plugins --plugin apple-dev