xcode-build-benchmark

A tool for measuring clean and incremental Xcode builds with repeatable settings. A clean build compiles everything again, while an incremental build reuses work that has not changed.

In plain words
What is it for?
It is for timing builds, recording the project, scheme, destination, configuration, and command used, and saving timestamped results in a .build-benchmark folder.
Why use it?
It creates a reliable baseline before optimization, making before-and-after build times comparable instead of relying on memory or inconsistent commands.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/avdlee/xcode-build-optimization-agent-skill/xcode-build-benchmark
Any agent
npx skills add AvdLee/Xcode-Build-Optimization-Agent-Skill --skill xcode-build-benchmark
Clone the repo
git clone --depth 1 https://github.com/AvdLee/Xcode-Build-Optimization-Agent-Skill

Made for: Claude Code, Codex.

Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 995 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00077 $0.00995
Opus 5 $0.00039 $0.00498
Sonnet 5 $0.00015 $0.00199
Haiku 4.5 $0.00008 $0.00100

Measured 2d ago against content hash 91b85f1b9b73, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

xcode-build-benchmark scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/benchmark_builds.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

3 near-identical copies found in the catalogue:

skills/xcode-build-benchmark/SKILL.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Read the full file on GitHub · 89 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 89 lines · 77 tokens per session scan A 91b85f1b9b73

Subscribe to this mod's changes

xcode-build-benchmark is a skill published in the GitHub repository AvdLee/Xcode-Build-Optimization-Agent-Skill (1,212 stars, last pushed 20d ago), licensed MIT. It adds 77 tokens to every session and 995 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

ios-design-agent-skill

Audit and improve iOS/SwiftUI app aesthetics — typography, color, spatial composition, motion, and atmospheric depth. Use when reviewing UI design, critiquing screenshots, or improving SwiftUI view code beyond functional correctness.

vermont42/iOS-Design-Agent-Skill · 51 tokens

app-implement-feature

Guide for implementing features in baguette — a Swift CLI + WebSocket server that drives iOS simulators via private SimulatorKit. Use this skill when: (1) Adding a new gesture, button, keyboard surface, stream format, or device-chrome behaviour (anything that lands across Domain / Infrastructure / App +…

tddworks/baguette · 192 tokens

baguette

Drive iOS simulators programmatically via the baguette CLI — taps, swipes, multi-finger gestures, hardware buttons (Home / Lock / Volume / Action / Power), ASCII keyboard text, and frame capture, all without opening Xcode. Use when: (1) an agent needs to drive a booted iOS simulator from a script — tap a coordinate…

tddworks/baguette · 249 tokens

mobile-automation

Control Android and iOS devices, emulators and simulators — launch apps, tap, swipe, type, take screenshots, read the accessibility tree. Use when a task involves a mobile device or app, mobile UI testing, or reproducing a bug on a phone.

mobile-next/mobile-mcp · 58 tokens

serve-sim-placeholder-assets

Audit and update serve-sim's Device Hub-style simulator placeholder assets from local Xcode/CoreTypes resources. Use after installing a new Xcode or macOS seed, or when iPhone, iPad, Watch, or Vision placeholder previews look wrong.

EvanBacon/serve-sim · 56 tokens

yida-dashboard

经营看板/驾驶舱/数据大屏产品化交付。含真实数据、筛选联动、卡片截图、组织内短链和钉钉待办闭环。常规图表使用 yida-rechart;明确 ECharts、复杂 ECharts option 或维护旧图表时使用 yida-chart。普通统计优先 yida-report。.

openyida/openyida · 84 tokens