/apple-platform-build:apple-platform-build [scheme or task, e.g. 'run unit tests' or 'build MyApp']from Apple Platform Build
Build, test, run, and diagnose Xcode projects for iOS, macOS, watchOS, tvOS, and visionOS. Use whenever a task involves compiling Swift or Objective-C code in an .xcodeproj or .xcworkspace, running XCTest or Swift Testing suites, rendering SwiftUI previews, reading build errors, or driving a simulator. Prefers the Xcode MCP server bundled with this plugin and falls back to xcodebuild.
Ships in Apple Platform Build. 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.
Drive the user's Xcode workspace through Xcode itself instead of re-deriving the build from the command line.
$ARGUMENTS
If the line above still reads $ARGUMENTS literally, the task is the text the user wrote alongside the skill mention; with nothing given, build the active scheme and report the result.
This plugin registers an MCP server named xcode that runs xcrun mcpbridge, Apple's bridge into the running Xcode (Xcode 26.3 or later). Building through it reuses Xcode's own build system, derived data, signing, and run destinations, so results match what the user sees in the IDE and incremental builds stay fast. xcodebuild from a shell starts a separate build service, can pick different settings, and loses the preview, debugger, and device-interaction tools entirely. Use the shell only when the bridge is unavailable.
The bridge only works when Xcode is running with the workspace open and Xcode > Settings > Intelligence > Model Context Protocol > Xcode Tools enabled. If the xcode tools are missing from your tool list or the first call fails:
XcodeListWorkspaces shows what Xcode has open. If the project is not open, XcodeOpenWorkspace with the absolute path to the .xcworkspace (preferred) or .xcodeproj. Pass the returned workspace identifier to later calls when more than one workspace is open.XcodeListSchemes and XcodeListRunDestinations; switch with XcodeSwitchScheme / XcodeSwitchRunDestination only when the active ones do not match the task. Tell the user if you change them, since the choice persists in their IDE.BuildProject, then GetBuildLog filtered to errors (add warnings only when the user asked about them). Fix errors in source, then rebuild; stop and report after three failed rounds on the same error rather than thrashing.GetTestList to confirm the targets exist, then RunAllTests or RunSomeTests with specific identifiers. Read failures from the result; GetConsoleOutput has the log lines when an assertion message is not enough.RunProject launches the active scheme; RenderPreview returns a snapshot of a SwiftUI preview and is the fastest way to check a view change. DeviceInteractionStartWorkspaceSession then DeviceInteractionInstallAndRun and DeviceInteractionSynthesize drive the simulator for UI checks; end with DeviceInteractionEndSession.
To verify a feature end to end on the simulator (tap through flows, catch crashes and console errors, check each screen's layout), use the simulator-verify skill of this plugin. For layout correctness alone (text cut off, overlaps, off-screen content, tap targets), use the apvt skill: it reads the real frames from the running simulator or macOS app (start it with apvt run or apvt launch), and an app launched by Xcode needs apvt launch-env's variables to carry its agent. The same skill covers a SwiftUI screen that stutters (apvt perf: bodies evaluated too often or too slowly, late frames) and replaying the steps to a screen after each fix (apvt flow).XcodeRefreshCodeIssuesInFile gives compiler diagnostics for one file; GetTargetBuildSettings answers "which setting is this target using"; DocumentationSearch beats guessing at an Apple API signature.Prefer your own file tools for source edits; they work on filesystem paths. Use XcodeWrite / XcodeMV / XcodeRM only when a change must also update the project navigator, for example adding a new file to a target that lacks a synchronized folder, because those tools take Xcode project paths rather than filesystem paths.
When the bridge is unavailable, use xcodebuild and keep its output readable:
xcodebuild -list -json -workspace App.xcworkspace
xcodebuild build -workspace App.xcworkspace -scheme App -destination 'generic/platform=iOS Simulator' 2>&1 | grep -E 'error:|warning:|BUILD'
xcodebuild test -workspace App.xcworkspace -scheme App -destination 'platform=iOS Simulator,name=iPhone 17' 2>&1 | grep -E 'error:|failed|passed|Executed'
Use -project instead of -workspace for a bare .xcodeproj, and swift build / swift test for a Swift package without an Xcode project. Report the exact failing command and its error lines, not a summary.
What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/apvtFind and fix layout mistakes in an iOS app running in the iOS Simulator or in a native macOS app (AppKit or SwiftUI) with apvt (Apple Platform View Tester), which reads the live view tree with frames in points, and measure SwiftUI views that re-evaluate their body too often or too slowly. Use after changing a SwiftUI view, UIKit or AppKit layout, when a user reports text cut off, overlapping, truncated, off-screen or outside the window, under the status bar, or too small to tap, when a SwiftUI screen stutters, hitches or burns CPU, or when asked to verify a screen's or window's layout, assert view positions, replay the steps to a screen, or get an annotated screenshot. Not for physical devices, Mac Catalyst, release builds, or color contrast./simulator-verifyVerify that an iOS app really works by driving it in the iOS Simulator - build and launch it through the Xcode MCP server, tap, swipe and type through its flows, check each result in the live UI hierarchy, catch crashes and console errors, and check every screen's layout with apvt. Use after implementing or fixing a feature, when asked to test, QA, smoke-test or "check that it works" on the simulator, to reproduce a reported bug, or to walk through a spec or acceptance criteria. Not for unit tests alone (use apple-platform-build), physical devices, or macOS apps.Other plugins' skills for the same job
npx claudepluginhub k-ymmt/skills --plugin apple-platform-build