Skip to content
alyn
AvdLee

Xcode Build Benchmark skill

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.

$npx skills add AvdLee/Xcode-Build-Optimization-Agent-Skill --skill xcode-build-benchmark
View this skill on GitHubAvdLee/Xcode-Build-Optimization-Agent-Skill/skills/xcode-build-benchmark/SKILL.md
Pack stars
1,270
Pack installs
21k
Alyn Score
60/99
Updated
2 months ago
License
MIT
– views – installs via Alyn

Install Xcode Build Benchmark

Pick your agent. Every command is ready to paste.

$npx skills add AvdLee/Xcode-Build-Optimization-Agent-Skill --skill xcode-build-benchmark

The open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.

01

Install it

Run the command above, or upload the folder in Claude.

02

Ask naturally

Describe the task. Your agent loads xcode-build-benchmark when the request matches its description.

03

Name it if needed

If it does not trigger, say “use the xcode-build-benchmark skill”. In Codex, type $xcode-build-benchmark.

The skill itself

SKILL.md

FolderGitHub

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:

Additional Resources

Tips for Xcode Build Benchmark

  • • Start a fresh session after installing so your agent picks up the new skill.
  • • This skill ships scripts. Read them before the first run, and run it in a project without secrets first.
  • • It bundles reference files. The agent reads them only when needed, so they cost no context until then.
  • • It is part of a pack with 6 skills. Install only the ones you need with --skill to keep triggers precise.
  • • If two skills overlap, mention the one you want by name.

Questions about Xcode Build Benchmark

What does the Xcode Build Benchmark skill do?

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.

How do I install Xcode Build Benchmark?

Run "npx skills add AvdLee/Xcode-Build-Optimization-Agent-Skill --skill xcode-build-benchmark" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.

Does Xcode Build Benchmark work in Cursor and Codex?

Yes. Xcode Build Benchmark uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.

Is Xcode Build Benchmark free?

Xcode Build Benchmark is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.

Who made Xcode Build Benchmark?

Xcode Build Benchmark is published by AvdLee in the AvdLee/Xcode-Build-Optimization-Agent-Skill repository, together with 5 other skills.

Similar skills. From other creators.