Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
avdlee avatar

Xcode Build Benchmark

  • 2.8k installs
  • 1.2k repo stars
  • Updated April 15, 2026
  • avdlee/xcode-build-optimization-agent-skill

xcode-build-benchmark is an agent skill that runs repeatable Xcode clean and incremental build timings and saves median results to .build-benchmark JSON artifacts.

About

xcode-build-benchmark is an agent skill for producing repeatable Xcode build baselines before optimization work begins. It collects workspace or project path, scheme, configuration, destination, and whether simulator or device numbers are needed, then normalizes xcodebuild flags that affect caching. The default workflow warms up once, runs three clean builds, optionally three cached clean builds when COMPILATION_CACHE_ENABLE_CACHING is YES, three zero-change builds to measure fixed overhead, and optional incremental builds after touching a representative Swift file via --touch-file. Results save medians, min, and max timings plus environment details into timestamped JSON under .build-benchmark using scripts/benchmark_builds.py when available. Worktree users must create missing SPM exclude directories such as __Snapshots__ before resolvePackageDependencies to avoid xcodebuild crashes. The skill forbids modifying project files during measurement and reports biggest timing-summary categories from -showBuildTimingSummary output. When users only want numbers, it stops after measurement; optimization handoffs route to sibling skills like xcode-compilation-analyzer or spm-build-analysis.

  • Measures clean, cached clean, zero-change, and optional incremental builds separately.
  • Uses benchmark_builds.py with medians and spread instead of single fastest runs.
  • Writes timestamped JSON artifacts to .build-benchmark for before-and-after comparisons.
  • Worktree guidance creates missing SPM exclude directories before package resolution.
  • Hands off saved artifacts to xcode-compilation-analyzer or spm-build-analysis for optimization.

Xcode Build Benchmark by the numbers

  • 2,814 all-time installs (skills.sh)
  • +63 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #56 of 1,453 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

xcode-build-benchmark capabilities & compatibility

Capabilities
normalized xcodebuild command collection with co · clean, cached clean, zero change, and incrementa · median min max reporting from multiple measured · timestamped json artifact export under .build be · handoff routing to specialized xcode optimizatio
Use cases
ci cd · testing · debugging
Platforms
macOS
From the docs

What xcode-build-benchmark says it does

Run 3 zero-change builds (build immediately after a successful build with no edits)
SKILL.md
npx skills add https://github.com/avdlee/xcode-build-optimization-agent-skill --skill xcode-build-benchmark

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2.8k
repo stars1.2k
Security audit3 / 3 scanners passed
Last updatedApril 15, 2026
Repositoryavdlee/xcode-build-optimization-agent-skill

How do I get a trustworthy before-and-after baseline for Xcode build times without changing project files during measurement?

Benchmark Xcode clean, cached clean, zero-change, and incremental builds with repeatable commands and timestamped .build-benchmark JSON artifacts.

Who is it for?

iOS developers comparing build performance across branches, settings, or optimization experiments on Xcode workspaces.

Skip if: Skip when you need Android or non-Xcode build systems or immediate code changes without a measured baseline first.

When should I use this skill?

User asks to benchmark Xcode builds, measure build duration, compare clean versus incremental times, or baseline before optimization.

What you get

Median clean, cached clean, zero-change, and optional incremental timings plus saved JSON artifact path and timing-summary categories.

  • .build-benchmark JSON timing artifact
  • median clean and incremental timing report

By the numbers

  • [object Object]
  • [object Object]
  • [object Object]

Files

SKILL.mdMarkdownGitHub ↗

Xcode Build Benchmark

Use this skill to produce a repeatable Xcode build baseline before anyone tries to optimize build times.

Core Rules

  • Measure before recommending changes.
  • Capture clean and incremental builds separately.
  • Keep the command, destination, configuration, scheme, and warm-up rules consistent across runs.
  • Write a timestamped JSON artifact to .build-benchmark/.
  • Do not change project files as part of benchmarking.

Inputs To Collect

Confirm or infer:

  • workspace or project path
  • scheme
  • configuration
  • destination
  • whether the user wants simulator or device numbers
  • whether a custom DerivedData path is needed

If the project has both clean-build and incremental-build pain, benchmark both. That is the default.

Worktree Considerations

When benchmarking inside a git worktree, SPM packages with exclude: paths that reference gitignored directories (e.g., __Snapshots__) will cause xcodebuild -resolvePackageDependencies to crash. Create those missing directories before running any builds.

Default Workflow

1. Normalize the build command and note every flag that affects caching or module reuse. 2. Run one warm-up build if needed to validate that the command succeeds. 3. Run 3 clean builds. 4. If COMPILATION_CACHE_ENABLE_CACHING = YES is detected, run 3 cached clean builds. These measure clean build time with a warm compilation cache -- the realistic scenario for branch switching, pulling changes, or Clean Build Folder. The script handles this automatically by building once to warm the cache, then deleting DerivedData (but not the compilation cache) before each measured run. Pass --no-cached-clean to skip. 5. Run 3 zero-change builds (build immediately after a successful build with no edits). This measures the fixed overhead floor: dependency computation, project description transfer, build description creation, script phases, codesigning, and validation. A zero-change build that takes more than a few seconds indicates avoidable per-build overhead. Use the default benchmark_builds.py invocation (no --touch-file flag). 6. Optionally run 3 incremental builds with a file touch to measure a real edit-rebuild loop. Use --touch-file path/to/SomeFile.swift to touch a representative source file before each build. 7. Save the raw results and summary into .build-benchmark/. 8. Report medians and spread, not just the single fastest run.

Preferred Command Path

Use the shared helper when possible:

python3 scripts/benchmark_builds.py \
  --workspace App.xcworkspace \
  --scheme MyApp \
  --configuration Debug \
  --destination "platform=iOS Simulator,name=iPhone 16" \
  --output-dir .build-benchmark

If you cannot use the helper script, run equivalent xcodebuild commands with -showBuildTimingSummary and preserve the raw output.

Required Output

Return:

  • clean build median, min, max
  • cached clean build median, min, max (when COMPILATION_CACHE_ENABLE_CACHING is enabled)
  • zero-change build median, min, max (fixed overhead floor)
  • incremental build median, min, max (if --touch-file was used)
  • biggest timing-summary categories
  • environment details that could affect comparisons
  • path to the saved artifact

If results are noisy, say so and recommend rerunning under calmer conditions.

When To Stop

Stop after measurement if the user only asked for benchmarking. If they want optimization guidance, hand off the artifact to the relevant specialist by reading its SKILL.md and applying its workflow to the same project context:

  • `xcode-compilation-analyzer`
  • `xcode-project-analyzer`
  • `spm-build-analysis`
  • `xcode-build-orchestrator` for full orchestration

Additional Resources

  • For the benchmark contract, see references/benchmarking-workflow.md
  • For the shared artifact format, see references/benchmark-artifacts.md
  • For the JSON schema, see schemas/build-benchmark.schema.json

Related skills

How it compares

Pick xcode-build-benchmark when you need persisted, comparable timing artifacts rather than ad-hoc `xcodebuild -showBuildTimingSummary` console output alone.

FAQ

Does benchmarking modify the Xcode project?

No. The skill explicitly forbids changing project files as part of benchmarking measurement runs.

What is a zero-change build?

A build immediately after a successful build with no edits, measuring fixed overhead like dependency computation and codesigning.

What helper script should be used?

Prefer python3 scripts/benchmark_builds.py with workspace, scheme, configuration, destination, and --output-dir .build-benchmark.

Is Xcode Build Benchmark safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

DevOps & CI/CDdevopstesting

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.