swift-build

Build, test, and manage iOS/macOS projects via the Swift/Xcode toolchain on macOS.

Updated May 3, 2026
One-click install
npx skills add https://github.com/spikelab/multiplai-cc-mktplace --skill swift-build-spikelab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swift-build
Source: https://github.com/spikelab/multiplai-cc-mktplace/tree/main/plugins/multiplai-apple/skills/swift-build
Command: npx skills add https://github.com/spikelab/multiplai-cc-mktplace --skill swift-build-spikelab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Running Swift builds, tests, and iOS simulator operations requires the Apple toolchain (xcodebuild, xcrun/simctl), which exists only on macOS — and driving it from a Docker container or parsing its verbose output is painful. This Skill routes all Swift/Xcode commands through a single script that detects the environment, auto-discovers the project type and scheme, and returns compact, LLM-friendly output. ## Core Features & Use Cases - Build & Test Automation: Runs swift build/swift test for SwiftPM packages and xcodebuild for Xcode projects, with automatic scheme discovery and test filtering (--filter). - Simulator Management: Lists, boots, and shuts down iOS simulators, installs and launches apps, and captures screenshots — all through xcrun simctl. - UI Testing & Screenshot Extraction: Runs XCUITest bundles and exports XCTAttachment PNGs from result bundles for agent self-verification of GUI work. - Container-to-Host Bridging: From a Docker container with a configured SSH bridge, routes the same commands to a macOS host through a gateway-compatible allowlist. - Use Case: While doing TDD on an iOS app from a container, run the test suite with a filter, boot a simulator, install the app, and pull UI test screenshots back into the workspace — without ever touching SSH directly. ## Quick Start Ask Claude to build and test your Swift package by running the swift-host.sh script with the build or test command, optionally passing --package-path to your project directory.

Frequently Asked Questions about swift-build

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build and test a Swift package from the command line?

Run the swift-host.sh script with the build or test command, optionally passing --package-path to target a package directory. It auto-detects SwiftPM versus Xcode projects and runs swift build/test or xcodebuild with an auto-discovered scheme.

How do I run iOS simulator tests and capture screenshots?

Use the sim subcommands to list, boot, and manage simulators via xcrun simctl, and sim screenshot to capture the booted device. For UI verification, the uitest command runs an XCUITest bundle and screenshots exports XCTAttachment PNGs from the result bundle.

Can I run xcodebuild from a Docker container on Linux?

Only with a configured container-to-host SSH bridge to a macOS machine — the script routes commands over SSH using gateway-allowlisted commands. Plain Linux without the bridge is unsupported because the Swift/Xcode toolchain exists only on macOS.

Does swift-build work on Linux without a Mac?

No. The skill requires macOS because xcodebuild, xcrun/simctl, and the iOS SDKs ship only for macOS. On a plain Linux host the script names the missing toolchain and exits with an error.

Why does my bridged build fail with paths containing spaces?

The SSH gateway currently mis-parses quoted command strings, breaking project paths with spaces and Xcode scheme names containing parentheses. Keep container-built projects at space-free paths or build locally on the Mac until the gateway fix ships.