# Xcode Build Fixer

Apply approved Xcode build optimization changes following best practices, then...

- Repository: https://github.com/AvdLee/Xcode-Build-Optimization-Agent-Skill (1268 stars)
- Category: Mobile
- License: MIT
- Last updated: 2026-09-14
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add AvdLee/Xcode-Build-Optimization-Agent-Skill --skill xcode-build-fixer -g -a claude-code -y`
Codex: `npx skills add AvdLee/Xcode-Build-Optimization-Agent-Skill --skill xcode-build-fixer -g -a codex -y`
Cursor: `npx skills add AvdLee/Xcode-Build-Optimization-Agent-Skill --skill xcode-build-fixer -g -a cursor -y`
Gemini CLI: `npx skills add AvdLee/Xcode-Build-Optimization-Agent-Skill --skill xcode-build-fixer -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add AvdLee/Xcode-Build-Optimization-Agent-Skill`

## Description

Apply approved Xcode build optimization changes following best practices, then re-benchmark to verify improvement. Use when a developer has an approved optimization plan from xcode-build-orchestrator, wants to apply specific build fixes, needs help implementing build setting changes, script phase guards, source-level compilation fixes, or SPM restructuring that was recommended by an analysis skill.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Xcode Build Fixer

Use this skill to implement approved build optimization changes and verify them with a benchmark.

## Core Rules

- Only apply changes that have explicit developer approval.
- Apply one logical fix at a time so changes are reviewable and reversible.
- Re-benchmark after applying changes to verify improvement.
- Report exactly what changed, which files were touched, and the measured delta.
- If a change produces no improvement or causes a regression, flag it immediately.

## Inputs

The fixer expects one of:

- An approved optimization plan at `.build-benchmark/optimization-plan.md` with checked approval boxes.
- An explicit developer instruction describing the fix to apply (e.g., "set `DEBUG_INFORMATION_FORMAT` to `dwarf` for Debug").

When working from an optimization plan, read the approval checklist and implement only the checked items.

## Fix Categories

### Build Settings

Change `project.pbxproj` values to match the recommendations in [build-settings-best-practices.md](references/build-settings-best-practices.md).

Typical fixes:

- Set `DEBUG_INFORMATION_FORMAT = dwarf` for Debug
- Set `SWIFT_COMPILATION_MODE = singlefile` for Debug
- Enable `COMPILATION_CACHE_ENABLE_CACHING = YES`
- Enable `EAGER_LINKING = YES` for Debug
- Align cross-target settings to eliminate module variants

When editing `project.pbxproj`, locate the correct `buildSettings` block by matching the target name and configuration name. Verify the change with `xcodebuild -showBuildSettings` after applying.

### Script Phases

Fix run script phases that waste time during incremental or debug builds.

Typical fixes:

- Add input and output file declarations so Xcode can skip unchanged scripts.
- Add configuration guards: `[[ "$CONFIGURATION" != "Release" ]] && exit 0` for release-only scripts.
- Move input/output lists into `.xcfilelist` files when the list is long.
- Enable `Based on dependency analysis` when inputs and outputs are declared.

The rest: https://github.com/AvdLee/Xcode-Build-Optimization-Agent-Skill/blob/HEAD/skills/xcode-build-fixer/SKILL.md
