Xcode build baseline
Benchmark Xcode clean, cached-clean, zero-change, and incremental builds with repeatable inputs, timing summaries, and `.build-benchmark/` artifacts.From its SKILL.md
npx -y skills add Xopoko/build-swift-apps --skill xcode-build-baselineAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
2.6 KB, 552 tokens by cl100k_base, as published. Nobody here has run it
Xcode Build Baseline
Measure before recommending build-time changes. Do not edit project files while benchmarking.
Rules
- Keep workspace/project, scheme, configuration, destination, DerivedData path, and warm-up rules consistent.
- Capture clean and incremental behavior separately.
- Write timestamped JSON artifacts under
.build-benchmark/. - Report medians and spread, not only the fastest run.
- For iOS Simulator, resolve an installed iPhone/iOS pair; prefer
OS=latestonly when Xcode accepts it. - In git worktrees, create missing package
exclude:directories such as__Snapshots__before dependency resolution, or SPM can crash.
Inputs
Infer or ask for workspace/project, scheme, configuration, destination, simulator/device preference, custom DerivedData needs, and a representative Swift file for incremental touch tests.
Default Run
- Normalize the build command and record every cache-affecting flag.
- Warm up once only if needed to prove the command succeeds.
- Run 3 clean builds.
- If
COMPILATION_CACHE_ENABLE_CACHING = YES, run 3 cached-clean builds; use--no-cached-cleanonly when intentionally skipped. - Run 3 zero-change builds with no
--touch-file; this measures fixed overhead from dependency planning, scripts, codesign, validation, and related phases. - Optionally run 3 incremental builds with
--touch-file path/to/SomeFile.swift. - Preserve raw logs, summaries, and JSON artifacts.
Preferred helper:
python3 ../../shared/build-optimization/scripts/benchmark_builds.py \
--workspace App.xcworkspace \
--scheme MyApp \
--configuration Debug \
--destination "platform=iOS Simulator,name=<latest available iPhone simulator>,OS=latest" \
--output-dir .build-benchmark
If the helper is unavailable, run equivalent xcodebuild commands with -showBuildTimingSummary and keep raw output.
Output
Return clean, cached-clean when enabled, zero-change, and touched-incremental medians/min/max; biggest timing categories; environment details; artifact path; and noise caveats.
If the user only requested measurement, stop there. For optimization, hand the artifact to the relevant skill: xcode-compile-profiler, xcode-project-auditor, swiftpm-build-inspector, or xcode-build-strategist.
Resources
references/benchmarking-workflow.md../../shared/build-optimization/references/benchmark-artifacts.md../../shared/build-optimization/schemas/build-benchmark.schema.json
What ships with it: 1 file
2.2 KB alongside SKILL.md
references/
- benchmarking-workflow.md2.2 KB