/xcode-build-fixer
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
$ npx -y skills add omarshahine/HomeClaw --skill xcode-build-fixer --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/xcode-build-fixer
Context preview
The summary Claude sees to decide when to auto-load this skill.
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
SKILL.md
xcode-build-fixer.SKILL.mdname: xcode-build-fixer
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.
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.
Source-Level Compilation Fixes
Apply code changes that reduce type-checker and compiler overhead. See [references/fix-patterns.md](references/fix-patterns.md) for before/after patterns.
Typical fixes:
- Add explicit type annotations to complex expressions.
- Break long chained or nested expressions into intermediate typed variables.
- Mark classes `final` when they are not subclassed.
- Tighten access control (`private`/`fileprivate`) for internal-only symbols.
- Extract monolithic SwiftUI `body` properties into smaller composed subviews.
- Replace deeply nested result-builder code with separate typed helpers.
- Add explicit return types to closures passed to generic functions.
SPM Restructuring
Restructure Swift packages to improve build parallelism and reduce rebuild scope.
Typical fixes:
- Move shared types to a lower-layer module to eliminate circular or upward dependencies.
- Split oversized modules (200+ files) by feature area.
- Extract protocol definitions into lightweight interface modules.
- Remove unnecessary `@_exported import` usage.
- Align build options across targets that import the same packages to prevent module variant duplication.
- Pin branch-tracked dependencies to tagged versions or commit hashes for deterministic resolution.
Before applying version pin changes:
- Run `git ls-remote --tags <url>` to confirm tags exist. If the upstream has no tags, pin to a specific revision hash instead.
- Verify the pinned version resolves successfully with `xcodebuild -resolvePackageDependencies` before proceeding.
Execution Workflow
1. Read the approved optimization plan or developer instruction. 2. For each approved item, identify the exact files and locations to change. 3. Apply the change. 4. Verify the change compiles: run a quick `xcodebuild build` to confirm no errors were introduced. 5. After all approved changes are applied, re-benchmark using the same inputs from the original baseline:
python3 scripts/benchmark_builds.py \
--project App.xcodeproj \
--scheme MyApp \
--configuration Debug \
--destination "platform=iOS Simulator,name=iPhone 16" \
--output-dir .build-benchmark6. Compare post-change medians to the baseline and report deltas.
Evaluating Regressions
Not every slower number is a true regression. The fixer must evaluate the full picture before recommending a revert.
Compilation caching trade-off
A change like `COMPILATION_CACHE_ENABLE_CACHING = YES` may make a standard clean build slightly slower (cache population overhead) while making cached clean builds significantly faster. Since cached clean builds reflect the realistic developer workflow (branch switching, pulling changes, Clean Build Folder with a warm cache), a slower standard clean build paired with a faster cached clean build is a net improvement, not a regression. The same logic applies to any change where the first-time cost is higher but subsequent builds benefit.
Compare all build types
Evaluate standard clean, cached clean (when available), and incremental builds together. A change is only a clear regression if it makes the metrics that matter to the developer's daily workflow worse. If only the cold-start clean build is slower but the developer rarely does truly cold builds, that may be acceptable.
Per-change vs. cumulative
A single change that regresses on its own may still be worth keeping if it enables a larger cumulative improvement (e.g., enabling compilation caching makes one build type slower but unlocks cache benefits for ever
Read more
name: xcode-build-fixer 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.
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.
Source-Level Compilation Fixes
Apply code changes that reduce type-checker and compiler overhead. See [references/fix-patterns.md](references/fix-patterns.md) for before/after patterns.
Typical fixes:
- Add explicit type annotations to complex expressions.
- Break long chained or nested expressions into intermediate typed variables.
- Mark classes `final` when they are not subclassed.
- Tighten access control (`private`/`fileprivate`) for internal-only symbols.
- Extract monolithic SwiftUI `body` properties into smaller composed subviews.
- Replace deeply nested result-builder code with separate typed helpers.
- Add explicit return types to closures passed to generic functions.
SPM Restructuring
Restructure Swift packages to improve build parallelism and reduce rebuild scope.
Typical fixes:
- Move shared types to a lower-layer module to eliminate circular or upward dependencies.
- Split oversized modules (200+ files) by feature area.
- Extract protocol definitions into lightweight interface modules.
- Remove unnecessary `@_exported import` usage.
- Align build options across targets that import the same packages to prevent module variant duplication.
- Pin branch-tracked dependencies to tagged versions or commit hashes for deterministic resolution.
Before applying version pin changes:
- Run `git ls-remote --tags <url>` to confirm tags exist. If the upstream has no tags, pin to a specific revision hash instead.
- Verify the pinned version resolves successfully with `xcodebuild -resolvePackageDependencies` before proceeding.
Execution Workflow
1. Read the approved optimization plan or developer instruction. 2. For each approved item, identify the exact files and locations to change. 3. Apply the change. 4. Verify the change compiles: run a quick `xcodebuild build` to confirm no errors were introduced. 5. After all approved changes are applied, re-benchmark using the same inputs from the original baseline:
python3 scripts/benchmark_builds.py \
--project App.xcodeproj \
--scheme MyApp \
--configuration Debug \
--destination "platform=iOS Simulator,name=iPhone 16" \
--output-dir .build-benchmark6. Compare post-change medians to the baseline and report deltas.
Evaluating Regressions
Not every slower number is a true regression. The fixer must evaluate the full picture before recommending a revert.
Compilation caching trade-off
A change like `COMPILATION_CACHE_ENABLE_CACHING = YES` may make a standard clean build slightly slower (cache population overhead) while making cached clean builds significantly faster. Since cached clean builds reflect the realistic developer workflow (branch switching, pulling changes, Clean Build Folder with a warm cache), a slower standard clean build paired with a faster cached clean build is a net improvement, not a regression. The same logic applies to any change where the first-time cost is higher but subsequent builds benefit.
Compare all build types
Evaluate standard clean, cached clean (when available), and incremental builds together. A change is only a clear regression if it makes the metrics that matter to the developer's daily workflow worse. If only the cold-start clean build is slower but the developer rarely does truly cold builds, that may be acceptable.
Per-change vs. cumulative
A single change that regresses on its own may still be worth keeping if it enables a larger cumulative improvement (e.g., enabling compilation caching makes one build type slower but unlocks cache benefits for ever
HomeKit smart home control via MCP — lights, locks, thermostats, and scenes for Claude Desktop, Claude Code, and OpenClaw
Repo: omarshahine/HomeClaw
Other skills on homeclaw.
- /ios-app-intents
Design and implement App Intents, app entities, and App Shortcuts for iOS apps so useful actions and content are available to Shortcuts, Siri, Spotlight, widgets, controls, and other intent-driven system surfaces. Use when exposing app actions outside the UI, adding `AppEntity`
Open skill - /ios-debugger-agent
Use XcodeBuildMCP to build, run, launch, and debug the current iOS project on a booted simulator. Trigger when asked to run an iOS app, interact with the simulator UI, inspect on-screen state, capture logs/console output, or diagnose runtime behavior using XcodeBuildMCP tools.
Open skill - /ios-ettrace-performance
Capture and interpret ETTrace profiles for iOS simulator apps, including symbolicated launch and runtime flamegraphs. Use when asked to profile an iOS app flow, gather simulator performance traces, identify CPU-heavy stacks, compare before/after traces, or produce flamegraph
Open skill - /ios-memgraph-leaks
Capture, inspect, compare, and root-cause iOS memory graph leaks using Apple's leaks and memgraph tools. Use when debugging leaked iOS objects, simulator memgraphs, retain-cycle suspicions, memory growth after navigation/logout/account changes, or when asked to prove an iOS leak
Open skill - /spm-build-analysis
Analyze Swift Package Manager dependencies, package plugins, module variants, and CI-oriented build overhead that slow Xcode builds. Use when a developer suspects packages, plugins, or dependency graph shape are hurting clean or incremental build performance, mentions SPM
Open skill - /swiftui-expert-skill
Use when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state management, view composition, performance, Liquid Glass adoption, or Instruments `.trace` capture/analysis for hangs, hitches, CPU hotspots, or
Open skill

