Back to Skills

xcode-build-benchmark

Benchmark Xcode clean and incremental builds with repeatable inputs, timing summaries, and timestamped `.build-benchmark/` artifacts. Use when a developer wants a baseline, wants to compare before and after changes, asks to measure build performance, mentions build times, build duration, how long builds take, or wants to know if builds got faster or slower.

1,075stars41forksUpdated 5/26/2026

Security Assessment

Safe(100/100)
Security Score100/100

About xcode-build-benchmark

The xcode-build-benchmark skill provides a structured workflow for benchmarking Xcode build performance using repeatable inputs and consistent build conditions. It is designed to establish reliable baseline measurements before any build optimization work begins. The skill focuses on collecting clean, cached clean, zero-change, and optional incremental build timings while preserving reproducibility across runs. By enforcing consistent build commands, destinations, configurations, caching behavior, and warm-up rules, it helps developers accurately compare build performance before and after project changes. All benchmark results are stored as timestamped JSON artifacts in a dedicated `.build-benchmark/` directory for future analysis and comparison.

The skill includes a defined benchmarking workflow that captures multiple build scenarios and summarizes performance using medians, minimums, maximums, and timing spread rather than relying on a single run. It supports both helper-script-based execution and equivalent manual `xcodebuild` workflows with timing summaries preserved. Additional capabilities include detection of compilation cache behavior, measurement of fixed per-build overhead through zero-change builds, optional incremental rebuild testing via touched source files, and preservation of raw build output for analysis. The workflow also includes safeguards for git worktree environments and explicitly avoids modifying project files during benchmarking.

This skill is intended for iOS and macOS developers, build engineers, and performance-focused teams who need accurate Xcode build timing baselines. Common use cases include evaluating whether build times improved after refactoring, diagnosing slow incremental builds, comparing branch performance, validating caching effectiveness, and generating reproducible performance artifacts for optimization specialists. It is especially useful in projects where build duration impacts developer productivity or continuous integration workflows.

FAQ

What types of builds does this skill benchmark?

The skill benchmarks clean builds, cached clean builds when compilation caching is enabled, zero-change builds, and optional incremental builds using a touched source file.

Does the skill modify project files during benchmarking?

No. The benchmarking workflow explicitly avoids changing project files as part of the measurement process.

Can the skill work without the provided helper script?

Yes. If the helper script cannot be used, equivalent `xcodebuild` commands with `-showBuildTimingSummary` can be run manually while preserving the raw output.

What information is required before running benchmarks?

The workflow requires or infers the workspace or project path, scheme, configuration, destination, simulator or device preference, and whether a custom DerivedData path is needed.

What limitations or environmental considerations should users know about?

Benchmark results can be noisy under unstable system conditions, so rerunning under calmer conditions may be recommended. Additionally, git worktrees with missing excluded directories in Swift Package Manager configurations may require those directories to be created before dependency resolution succeeds.

All Files

5 files
scripts/benchmark_builds.py12.1 KB
View
SKILL.md4.5 KB
View
references/benchmarking-workflow.md2.2 KB
View
schemas/build-benchmark.schema.json4.5 KB
View
references/benchmark-artifacts.md4.7 KB
View

Install xcode-build-benchmark

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill