xcode-build-benchmark

Benchmark Xcode clean and incremental builds into timestamped JSON artifacts.

3|Updated Jun 15, 2026
One-click install
npx skills add https://github.com/patrickserrano/lacquer --skill xcode-build-benchmark-patrickserrano
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: xcode-build-benchmark
Source: https://github.com/patrickserrano/lacquer/tree/main/profiles/ios/skills/xcode-build-benchmark
Command: npx skills add https://github.com/patrickserrano/lacquer --skill xcode-build-benchmark-patrickserrano

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Developers trying to optimize Xcode build times often guess at causes without a trustworthy baseline. This Skill produces repeatable clean, cached-clean, zero-change, and incremental build measurements so before-and-after comparisons are grounded in real data. ## Core Features & Use Cases - Repeatable Build Measurement: Runs 3 clean builds, optional cached-clean builds when COMPILATION_CACHE_ENABLE_CACHING is detected, and zero-change or touch-file incremental builds with a consistent command, scheme, configuration, and destination. - Structured Artifacts: Writes a timestamped JSON artifact plus raw xcodebuild logs to .build-benchmark/, including medians, min/max, parsed Build Timing Summary categories, and environment details. - Use Case: Before enabling new compiler flags or restructuring modules, run the benchmark to capture a baseline, then rerun after the change and compare medians to verify builds actually got faster. ## Quick Start Ask the AI to benchmark the clean and incremental build times of your Xcode workspace using the xcode-build-benchmark skill and save the results to .build-benchmark.

Frequently Asked Questions about xcode-build-benchmark

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

FAQPage Schema
How do I benchmark Xcode build times?▼

Run the benchmark_builds.py script with your workspace or project, scheme, configuration, and destination. It performs a warm-up, then 3 clean builds and 3 zero-change or incremental builds, saving medians, min, max, and timing summaries to a JSON artifact in .build-benchmark.

How to measure incremental build time in Xcode?▼

Pass --touch-file with a representative Swift source file to benchmark_builds.py. The script touches that file before each of 3 builds, measuring a real edit-rebuild loop; without the flag it measures zero-change builds, which reveal fixed per-build overhead.

Does the benchmark handle COMPILATION_CACHE_ENABLE_CACHING?▼

Yes. The script detects COMPILATION_CACHE_ENABLE_CACHING = YES via -showBuildSettings and automatically runs a cached-clean phase: it warms the compilation cache, deletes DerivedData before each run, and measures realistic clean builds with a warm cache. Pass --no-cached-clean to skip.

Why is my first clean build slower than later runs?▼

The first clean build after warm-up often runs 20-40% slower due to cold OS-level disk and linker caches. The script mitigates this with a warm-up clean and build cycle; if variance remains high, prefer the median or min and note it in the artifact.

Why does xcodebuild crash resolving SPM packages in a git worktree?▼

SPM packages with exclude: paths referencing gitignored directories such as __Snapshots__ cause xcodebuild -resolvePackageDependencies to crash inside a worktree. Create the missing directories manually before running any benchmark builds.

What are the limitations of Xcode build benchmarking?▼

Results are noisy under system load, so medians across 3 runs are reported rather than single fastest times. Timing-summary categories are cumulative parallel task times, not wall-clock time, so they indicate compiler workload but do not prove a category blocks the build.