Agent skill

Xcode Build Workflows

by conorluddy in conorluddy/xclaude-plugin

Directs iOS build, test and clean operations through the execute_xcode_command MCP tool instead of raw xcodebuild in the shell, with parameter-level retries on failure.

MITAuto-check passedMobile

Install Xcode Build Workflows

skills CLI
$ npx skills add conorluddy/xclaude-plugin --skill xcode-workflows -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install conorluddy/xclaude-plugin xcode-workflows --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/conorluddy/xclaude-plugin.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/xcode-workflows .claude/skills/xcode-workflows && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
xcode-workflows
GitHub stars
183
Token cost
~3k tokens
SKILL.md length
920 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

Directs iOS build, test and clean operations through the execute_xcode_command MCP tool instead of raw xcodebuild in the shell, with parameter-level retries on failure.

  • Works in 7 steps: Building an App → Running Tests → Clean Build → …
  • Building an iOS project and diagnosing build failures
  • SKILL.md covers ⚠️ CRITICAL: Always Use MCP…, When to Use Bash (And When NOT…, Quick Reference and Standard Workflows, plus 7 more sections
  • Calls xcodebuild, git and xcrun

What it does

The xclaude-plugin consolidates xcodebuild into one token-efficient MCP dispatcher, and the skill makes using it the first rule for anything about building or testing iOS projects. Operations include listing schemes, building, testing, cleaning and reading the Xcode version. If the tool fails, the agent reads the error and adjusts the parameters rather than falling back to bash xcodebuild or xcrun.

A table contrasts the wrong shell command with the right tool operation for each task, and a second list says bash remains fine for file operations, text inspection, git, environment checks and project exploration. Stated benefits are structured error handling, lower token use, plugin integration and consistent responses. The description adds scheme configuration, interpreting xcodebuild output and troubleshooting common build errors.

When your agent uses it

  • Building an iOS project and diagnosing build failures
  • Running an Xcode test suite and reading the results
  • Listing schemes or cleaning a build

Example prompts

  • “Build the app's Debug scheme and explain any compiler errors.”
  • “Run the unit tests for the iOS project and summarize which failed.”

Requirements

  • The xclaude-plugin with its execute_xcode_command MCP tool
  • Xcode on a Mac

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Building an App
  2. Running Tests
  3. Clean Build
  4. Enable Parallel Builds
  5. Incremental Builds
  6. Reduce Verbosity
  7. Use Derived Data Caching

What it can do on your machine

Read from SKILL.md and the folder at commit 6de4b2c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • xcodebuild
    • git
    • xcrun

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Xcode Build Workflows loads about 3k tokens when it runs. Until then it costs about 69 tokens; SKILL.md has 920 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~69
When it runs · the whole SKILL.md, loaded when a task matches
~3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from conorluddy/xclaude-plugin at commit 6de4b2c, republished under its MIT licence (© conorluddy). 920 words, ~3,037 tokens.

Download SKILL.mdSave it as .claude/skills/xcode-workflows/SKILL.md (or your agent's skills folder).
name
xcode-workflows
description
Xcode build system guidance for xcodebuild operations. Use when building iOS projects, running tests, analyzing build failures, or configuring schemes. Covers build/clean/test operations, interpreting xcodebuild output, and troubleshooting common build errors.

Xcode Workflows

Use the execute_xcode_command MCP tool for all iOS build operations

The xclaude-plugin provides the execute_xcode_command MCP tool which consolidates all xcodebuild operations into a single, token-efficient dispatcher.

⚠️ CRITICAL: Always Use MCP Tools First

This is the most important rule: When working with iOS builds, you MUST use the execute_xcode_command MCP tool.

  • ✅ DO: Invoke execute_xcode_command for all build/test/clean operations
  • ✅ DO: If the MCP tool fails, adjust parameters and retry
  • ✅ DO: Read error messages and debug the parameters
  • ❌ NEVER: Fall back to bash xcodebuild commands
  • ❌ NEVER: Use xcodebuild directly in bash
  • ❌ NEVER: Run xcrun xcodebuild in a terminal

Why? The MCP tool provides:

  • Structured error handling
  • Token efficiency (consolidated into 1 tool vs. verbose bash output)
  • Proper integration with the xclaude-plugin architecture
  • Consistent response formatting

If execute_xcode_command fails, the issue is with parameters or the project - not that you should use bash.

When to Use Bash (And When NOT to)

❌ NEVER Use Bash For These (Use MCP Tools Instead)
Task❌ WRONG (Bash)✅ RIGHT (MCP Tool)
List schemesxcodebuild -listexecute_xcode_command op: "list"
Build appxcodebuild -scheme...execute_xcode_command op: "build"
Run testsxcodebuild -scheme... testexecute_xcode_command op: "test"
Clean buildxcodebuild cleanexecute_xcode_command op: "clean"
Get Xcode infoxcodebuild -versionexecute_xcode_command op: "version"
✅ Bash is Acceptable For (Non-Build Tasks)
  • File operations: mkdir, cp, rm, ls, etc.
  • Text inspection: grep, find, cat, etc.
  • Git operations: git status, git log, etc.
  • Environment checks: which, xcode-select --version, etc.
  • Project exploration: find . -name "*.swift", etc.
The Rule: If it's about Xcode building/testing → Use MCP tool, not bash

Quick Reference

TaskMCP ToolOperationKey Parameters
Build for simulatorexecute_xcode_commandbuildscheme, configuration:Debug
Build for deviceexecute_xcode_commandbuildscheme, configuration:Release, destination
Run testsexecute_xcode_commandtestscheme, destination
Clean buildexecute_xcode_commandcleanscheme
List schemesexecute_xcode_commandlist-
Get Xcode infoexecute_xcode_commandversion-

Standard Workflows

1. Building an App

Step 1: Discover Schemes - Use execute_xcode_command with operation: "list"

Invoke the execute_xcode_command MCP tool:

json
{
  "operation": "list",
  "project_path": "/path/to/Project.xcodeproj"
}

Note: project_path is optional - auto-detected from current directory.

Returns:

json
{
  "schemes": ["MyApp", "MyAppTests", "MyAppUITests"],
  "targets": ["MyApp", "MyAppKit", "MyAppTests"]
}

Step 2: Build - Use execute_xcode_command with operation: "build"

Invoke the execute_xcode_command MCP tool with build parameters:

json
{
  "operation": "build",
  "scheme": "MyApp",
  "configuration": "Debug",
  "destination": "platform=iOS Simulator,name=iPhone 15"
}

Common Destinations:

  • iOS Simulator (explicit - recommended): "platform=iOS Simulator,name=iPhone 15,OS=18.0"
  • iOS Simulator (auto-resolve): "platform=iOS Simulator,name=iPhone 15" (will auto-detect latest OS)
  • iOS Device: "platform=iOS,id=<device-udid>"
  • Any Simulator: "platform=iOS Simulator,name=Any iOS Simulator Device"
  • macOS: "platform=macOS"

Note: The destination parameter now supports auto-resolution! If you omit the OS version, the tool will automatically query available simulators and select the latest OS version for the specified device name. For explicit control, include the OS version in your destination string.

2. Running Tests

Unit Tests:

json
{
  "operation": "test",
  "scheme": "MyApp",
  "destination": "platform=iOS Simulator,name=iPhone 15"
}

Specific Test Plan:

json
{
  "operation": "test",
  "scheme": "MyApp",
  "destination": "platform=iOS Simulator,name=iPhone 15",
  "options": {
    "test_plan": "UnitTests"
  }
}

Run Specific Tests:

json
{
  "operation": "test",
  "scheme": "MyApp",
  "destination": "platform=iOS Simulator,name=iPhone 15",
  "options": {
    "only_testing": [
      "MyAppTests/LoginTests/testSuccessfulLogin",
      "MyAppTests/LoginTests/testInvalidCredentials"
    ]
  }
}

Skip Specific Tests:

json
{
  "operation": "test",
  "scheme": "MyApp",
  "destination": "platform=iOS Simulator,name=iPhone 15",
  "options": {
    "skip_testing": ["MyAppUITests"]
  }
}
3. Clean Build

When to Clean:

  • Build artifacts corrupted
  • Switching branches significantly
  • Mysterious build failures
  • Before release builds
json
{
  "operation": "clean",
  "scheme": "MyApp"
}

Clean + Build Pattern:

json
{
  "operation": "build",
  "scheme": "MyApp",
  "configuration": "Debug",
  "options": {
    "clean_before_build": true
  }
}

Configurations

Debug vs Release

Debug (Default):

  • Optimizations disabled
  • Debug symbols included
  • Faster compile time
  • Larger binary
  • Use for: Development, testing

Release:

  • Optimizations enabled
  • Debug symbols optional
  • Slower compile time
  • Smaller binary
  • Use for: Production, App Store, performance testing
json
{
  "operation": "build",
  "scheme": "MyApp",
  "configuration": "Release"
}

Build Options

Common Options
json
{
  "operation": "build",
  "scheme": "MyApp",
  "options": {
    "clean_before_build": true,
    "parallel": true,
    "sdk": "iphoneos17.0",
    "arch": "arm64",
    "quiet": false
  }
}

Options Explained:

  • clean_before_build: Clean before building (ensures fresh build)
  • parallel: Enable parallel builds (faster on multi-core)
  • sdk: Specific SDK version (usually auto-selected)
  • arch: Target architecture (arm64 for devices, x86_64 for old simulators)
  • quiet: Reduce build output verbosity

Interpreting Build Results

Success Response
json
{
  "success": true,
  "summary": "Build succeeded",
  "warnings": 3,
  "build_time": "45.2s",
  "scheme": "MyApp",
  "configuration": "Debug"
}
Failure Response
json
{
  "success": false,
  "error": "Build failed",
  "errors": 2,
  "warnings": 5,
  "failure_reason": "Compilation errors in ViewController.swift"
}
Progressive Disclosure

Large build logs use progressive disclosure:

json
{
  "success": true,
  "summary": "Build succeeded with 15 warnings",
  "cache_id": "build-abc123",
  "quick_stats": {
    "warnings": 15,
    "build_time": "62.3s"
  },
  "next_steps": [
    "Use cache_id to get full build log if needed",
    "Review warnings for potential issues"
  ]
}

Common Build Errors

Show full SKILL.md (375 more words)Show less
Error: "No scheme named 'X' found"

Cause: Scheme doesn't exist or isn't shared

Solution:

  1. Run list operation to see available schemes
  2. Check if scheme is shared (Xcode → Product → Scheme → Manage Schemes)
Error: "Code signing identity not found"

Cause: Missing or invalid signing certificate

Solution:

  1. Check Team ID in project settings
  2. Verify certificates in Keychain
  3. Use automatic signing if possible
json
{
  "operation": "build",
  "scheme": "MyApp",
  "options": {
    "code_sign_identity": "Apple Development",
    "development_team": "TEAM_ID_HERE"
  }
}
Error: "SDK not found"

Cause: Requesting unavailable SDK version

Solution:

  1. Run version operation to see available SDKs
  2. Update sdk option or remove to use latest
Error: "Destination not found"

Cause: Invalid destination specifier

Solution:

  1. Use execute_simulator_command with operation "list" to see available devices
  2. Check device name spelling
  3. Ensure device/simulator is available

Testing Workflows

Complete Test Suite
1. list → Get test scheme
2. clean → Ensure fresh state
3. test → Run all tests
4. Analyze results → Check for failures
Flaky Test Detection

Run tests multiple times:

json
{
  "operation": "test",
  "scheme": "MyApp",
  "options": {
    "test_iterations": 5,
    "retry_on_failure": true
  }
}

Note: Test iteration support depends on Xcode version.

Test Result Analysis

Tests return:

json
{
  "success": false,
  "tests_run": 45,
  "tests_passed": 43,
  "tests_failed": 2,
  "failures": [
    {
      "test": "MyAppTests.LoginTests.testInvalidPassword",
      "message": "XCTAssertEqual failed: (\"error\") is not equal to (\"invalid\")"
    }
  ]
}

Project Auto-Detection

xcodebuild operations auto-detect project files:

  1. Searches current directory for .xcworkspace
  2. Falls back to .xcodeproj
  3. Returns error if multiple or none found

Explicit Path:

json
{
  "operation": "build",
  "project_path": "/path/to/specific/Project.xcodeproj",
  "scheme": "MyApp"
}

Build Performance Tips

1. Enable Parallel Builds
json
{
  "options": {
    "parallel": true
  }
}
2. Incremental Builds

Don't clean unless necessary - incremental builds are much faster.

3. Reduce Verbosity

For CI/automated builds:

json
{
  "options": {
    "quiet": true
  }
}
4. Use Derived Data Caching

Default behavior - xcodebuild uses DerivedData for caching.

CI/CD Integration

GitHub Actions Pattern
1. version → Verify Xcode installation
2. list → Validate scheme exists
3. clean → Ensure fresh build
4. build → Compile project
5. test → Run test suite
6. Analyze results → Fail pipeline if tests fail
Build Artifacts

Build produces:

  • .app bundle in DerivedData
  • .xcresult test results bundle
  • Build logs (via progressive disclosure)

Advanced: Build Settings

Query build settings:

json
{
  "operation": "list",
  "project_path": "/path/to/Project.xcodeproj"
}

Returns scheme/target info. For detailed build settings, use Resource:

xc://reference/build-settings

Scheme Management

Shared vs User Schemes

Shared Schemes:

  • Checked into source control
  • Available to all users
  • Recommended for team projects

User Schemes:

  • Local to your machine
  • Not visible to xcodebuild by default

Best Practice: Share schemes used for CI/CD.

Integration with MCP Tools

This Skill works with execute_xcode_command tool:

  • All operations use the execute_xcode_command tool
  • Tool handles xcodebuild execution and output parsing
  • Tool provides progressive disclosure for large outputs
  • This Skill teaches WHEN and HOW to use operations
  • ios-testing-patterns: Advanced test strategies and analysis
  • simulator-workflows: Device management for testing
  • crash-debugging: Analyzing build crashes
  • xc://operations/xcode: Complete xcodebuild operations reference
  • xc://reference/build-settings: Build settings dictionary
  • xc://reference/error-codes: Common error codes and solutions

Tip: Use list to discover, build to compile, test to validate. Clean only when needed.

© conorluddy, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/xcode-workflows of conorluddy/xclaude-plugin.

Open the folder on GitHubat commit 6de4b2c

Compare with similar skills

Xcode Build Workflows next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Xcode Build Workflows compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Xcode Build Workflows this skillconorluddy/xclaude-plugin183—~3kAutomated safety check: PassMIT
Xcodebuildmcpw-winter/dot314139—~196Automated safety check: PassMIT
Orca iOS Simulator Controlstablyai/orca87k1 repos~584Automated safety check: PassApache-2.0
Apple Crash Log .NET Symbolicationdotnet/skills5.6k1 repos~2.4kAutomated safety check: PassMIT
Update Swiftui APIsAvdLee/SwiftUI-Agent-Skill3.7k—~1.2kAutomated safety check: PassMIT
iOS Simulator Skillconorluddy/ios-simulator-skill1.3k—~5.7kAutomated safety check: PassMIT

Similar skills

  • Xcodebuildmcp

    w-winter/dot314

    Build/test Xcode projects via the XcodeBuildMCP MCP server using a local CLI wrapper for pi (no MCP support).

    139 GitHub stars~196 tokensUpdated 4 days ago
    MobileAuto-check passed
  • iOS Simulator control from inside Orca, with the live device view in Orca's emulator pane. Use when driving a booted Apple Simulator on macOS: taps, gestures…

    87k GitHub starsUsed in 1 repo~584 tokens
    MobileAuto-check passed
  • Official

    Resolves .NET runtime frames in Apple .ips crash logs to function names, source files and line numbers using dSYM symbols, atos and the Microsoft symbol server.

    5.6k GitHub starsUsed in 1 repo~2.4k tokens
    MobileAuto-check passed
  • Update Swiftui APIs

    AvdLee/SwiftUI-Agent-Skill

    Scan Apple's SwiftUI documentation for deprecated APIs and update the SwiftUI Expert Skill with modern replacements.

    3.7k GitHub stars~1.2k tokensUpdated yesterday
    MobileAuto-check passed
  • iOS Simulator Skill

    conorluddy/ios-simulator-skill

    29 production-ready scripts for iOS app testing, building, and automation.

    1.3k GitHub stars~5.7k tokensUpdated yesterday
    MobileAuto-check passed
  • Inspector MCP

    ipedro/Inspector

    A skill your agent uses when an agent needs to inspect a live iOS app through the Inspector MCP bridge, register or troubleshoot InspectorMCPServer for a consumer Xcode project, or query, resolve…

    170 GitHub stars~3.4k tokensUpdated 5 mo ago
    MobileAuto-check passed

More from conorluddy/xclaude-plugin

All 8 skills in this repo
  • iOS Accessibility Testing

    conorluddy/xclaude-plugin

    Guides WCAG 2.1 and VoiceOver accessibility testing for iOS apps, working from the accessibility tree and not from screenshots.

    183 GitHub stars~5k tokensUpdated 25 days ago
    Auto-check passed
  • iOS Crash Log Debugging

    conorluddy/xclaude-plugin

    Walks through retrieving, symbolicating and diagnosing iOS crash logs, turning a cryptic stack trace into the function names that actually failed.

    183 GitHub stars~4.9k tokensUpdated 25 days ago
    Auto-check passed
  • iOS Simulator Workflows

    conorluddy/xclaude-plugin

    Manages iOS Simulator devices and apps through the execute_simulator_command MCP tool instead of raw simctl: boot, create and delete devices, install and launch apps, screenshots and diagnostics.

    183 GitHub stars~3.3k tokensUpdated 25 days ago
    Auto-check passed
  • xc-plugin State Management

    conorluddy/xclaude-plugin

    Teaches how xc-plugin saves tokens with progressive disclosure, cached responses and consistent configuration, so large device lists and build logs arrive as summaries first.

    183 GitHub stars~4k tokensUpdated 25 days ago
    Auto-check passed
  • UI Automation Workflows

    conorluddy/xclaude-plugin

    Accessibility-first UI automation using IDB. An agent skill from conorluddy/xclaude-plugin.

    183 GitHub stars~2.2k tokensUpdated 25 days ago
    Auto-check passed
  • Performance Profiling

    conorluddy/xclaude-plugin

    Instruments integration and performance analysis workflows for iOS apps.

    183 GitHub stars~7.3k tokensUpdated 25 days ago
    Auto-check passed

Categories

Questions about Xcode Build Workflows

What does Xcode Build Workflows do?

Directs iOS build, test and clean operations through the execute_xcode_command MCP tool instead of raw xcodebuild in the shell, with parameter-level retries on failure. The xclaude-plugin consolidates xcodebuild into one token-efficient MCP dispatcher, and the skill makes using it the first rule for anything about building or testing iOS projects. Operations include listing schemes, building, testing, cleaning and reading the Xcode version.

When should I use Xcode Build Workflows?

Xcode Build Workflows fits situations like: building an iOS project and diagnosing build failures; running an Xcode test suite and reading the results; listing schemes or cleaning a build.

How do I install Xcode Build Workflows in Claude Code?

Run `npx skills add conorluddy/xclaude-plugin --skill xcode-workflows -a claude-code`. Or copy the skill folder (skills/xcode-workflows in conorluddy/xclaude-plugin) into .claude/skills/xcode-workflows in your project. Claude Code loads it when a task matches its description.

How do I install Xcode Build Workflows in Codex?

Run `npx skills add conorluddy/xclaude-plugin --skill xcode-workflows -a codex`. Or copy the skill folder (skills/xcode-workflows in conorluddy/xclaude-plugin) into .agents/skills/xcode-workflows in your project. Codex loads it when a task matches its description.

Can I use Xcode Build Workflows in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add conorluddy/xclaude-plugin --skill xcode-workflows -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/xcode-workflows, .gemini/skills/xcode-workflows, .github/skills/xcode-workflows and .opencode/skills/xcode-workflows in your project.

What does Xcode Build Workflows need to run?

Going by SKILL.md and its folder, Xcode Build Workflows needs the command-line tools its instructions call (xcodebuild, git and xcrun). Our summary lists: The xclaude-plugin with its execute_xcode_command MCP tool; Xcode on a Mac.

Does Xcode Build Workflows access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Xcode Build Workflows safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Xcode Build Workflows use?

Xcode Build Workflows is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Xcode Build Workflows use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Xcode Build Workflows?

Skills that share tags, products or a category with Xcode Build Workflows: Xcodebuildmcp (w-winter/dot314, 139 stars), Orca iOS Simulator Control (stablyai/orca, 87k stars), Apple Crash Log .NET Symbolication (dotnet/skills, 5.6k stars) and Update Swiftui APIs (AvdLee/SwiftUI-Agent-Skill, 3.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Xcode Build Workflows?

conorluddy (a GitHub user) maintains it in conorluddy/xclaude-plugin, which has 183 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on September 12, 2026.

Source: conorluddy/xclaude-plugin on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.