Skip to content
Back to search

xcode-build-skills

An Agent Skill helping you to optimize Xcode incremental and clean builds by running benchmarks and optimizing build settings.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked yesterday
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/avdlee-xcode-build-optimization-agent-skill/badge.svg)](/listings/avdlee-xcode-build-optimization-agent-skill)

HTML

<a href="/listings/avdlee-xcode-build-optimization-agent-skill"><img src="/api/listings/avdlee-xcode-build-optimization-agent-skill/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Install all six skills (the orchestrator needs the specialist skills to work):

npx skills add https://github.com/avdlee/xcode-build-optimization-agent-skill

Then open your Xcode project in your AI coding tool and say:

> Use the /xcode-build-orchestrator skill to analyze build performance and come up with a plan for improvements.

The agent will benchmark your clean and incremental builds, audit build settings, find compile hotspots, and produce an optimization plan at `.build-benchmark/optimization-plan.md`. No project files are modified until you explicitly approve changes.

For long-term monitoring across days, machines, Xcode versions, and teams, use [RocketSim Build Insights](https://www.rocketsim.app/docs/features/build-insights/build-insights/) and [Team Build Insights](https://www.rocketsim.app/docs/features/build-insights/team-build-insights/).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 50 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "$schema": "https://raw.githubusercontent.com/anthropics/claude-code/refs/heads/main/marketplace/marketplace.schema.json",
  3. "name": "xcode-build-skills",
  4. "version": "1.0.1",
  5. "owner": {
  6. "name": "Antoine van der Lee",
  7. "email": "contact@avanderlee.com"
  8. },
  9. "metadata": {
  10. "description": "Multi-skill Xcode build optimization plugin covering benchmarking, compile hotspots, project settings, SPM dependency analysis, and recommend-first orchestration."
  11. },
  12. "plugins": [
  13. {
  14. "name": "xcode-build-skills",
  15. "description": "Six Xcode build optimization skills in one plugin: benchmark, compilation analysis, project analysis, SPM build analysis, a recommend-first orchestrator, and a fixer for applying approved changes.",
  16. "repository": "https://github.com/AvdLee/Xcode-Build-Optimization-Agent-Skill",
  17. "version": "1.0.1",
  18. "author": {
  19. "name": "Antoine van der Lee",
  20. "email": "contact@avanderlee.com"
  21. },
  22. "license": "MIT",
  23. "category": "development",
  24. "keywords": [
  25. "xcode",
  26. "builds",
  27. "incremental-builds",
  28. "clean-builds",
  29. "swift",
  30. "ios",
  31. "macos",
  32. "spm",
  33. "benchmarking",
  34. "compilation",
  35. "project-settings",
  36. "explicit-modules"
  37. ],
  38. "tags": [
  39. "xcode",
  40. "build-optimization",
  41. "swift",
  42. "ios",
  43. "spm",
  44. "benchmarking",
  45. "apple-platforms"
  46. ],
  47. "source": "./"
  48. }
  49. ]
  50. }
README.md · README · 311 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <a href="https://www.rocketsim.app"><img src="assets/xcode-build-optimization-banner.jpg" alt="Xcode Build Optimization Agent Skills - Monitor your build performance with RocketSim" /></a>
  2. # Xcode Build Optimization Agent Skills
  3. Open-source Agent Skills for benchmarking and optimizing Xcode build performance across clean builds, incremental builds, compile hotspots, project settings, and Swift Package Manager overhead.
  4. ## Quick Start
  5. Install all six skills (the orchestrator needs the specialist skills to work):
  6. ```bash
  7. npx skills add https://github.com/avdlee/xcode-build-optimization-agent-skill
  8. ```
  9. Then open your Xcode project in your AI coding tool and say:
  10. > Use the /xcode-build-orchestrator skill to analyze build performance and come up with a plan for improvements.
  11. The agent will benchmark your clean and incremental builds, audit build settings, find compile hotspots, and produce an optimization plan at `.build-benchmark/optimization-plan.md`. No project files are modified until you explicitly approve changes.
  12. For long-term monitoring across days, machines, Xcode versions, and teams, use [RocketSim Build Insights](https://www.rocketsim.app/docs/features/build-insights/build-insights/) and [Team Build Insights](https://www.rocketsim.app/docs/features/build-insights/team-build-insights/).
  13. ## Every Second Counts
  14. A 1-second improvement on a 30-second incremental build sounds small. At 50 builds a day, that adds up to **3.5 hours per developer per year** -- or **35 hours across a team of ten**.
  15. Most projects have several seconds of easy wins hiding in build settings, script phases, and compiler flags. This skill finds them.
  16. ## How It Works
  17. The orchestrator coordinates five specialist skills in a recommend-first workflow. Nothing is modified until you approve.
  18. ```mermaid
  19. flowchart LR
  20. Orchestrator --> Benchmark["Benchmark\n(clean + incremental)"]
  21. Benchmark --> Compilation["Compilation\nAnalyzer"]
  22. Benchmark --> Project["Project\nAnalyzer"]
  23. Benchmark --> SPM["SPM\nAnalyzer"]
  24. Compilation --> Plan["Optimization\nPlan"]
  25. Project --> Plan
  26. SPM --> Plan
  27. Plan --> You{{"You review\n& approve"}}
  28. You --> Fixer["Build\nFixer"]
  29. Fixer --> ReBenchmark["Re-benchmark\n& verify"]
  30. ```
  31. **Phase 1 -- Analyze.** The orchestrator benchmarks your project, runs the three specialist analyzers, and produces a prioritized optimization plan at `.build-benchmark/optimization-plan.md`. No project files are modified.
  32. > Use the Xcode build orchestrator to analyze build performance and come up with a plan for improvements.
  33. **Phase 2 -- Fix.** Review the plan, check the approval boxes for the items you want, and ask the agent to apply them. The fixer implements only approved changes and re-benchmarks to verify.
  34. > Implement the approved items from the optimization plan at .build-benchmark/optimization-plan.md, then re-benchmark to verify the improvements.
  35. The plan file is your evidence trail -- shareable with teammates, reviewable in PRs, and diffable over time.
  36. ## What It Checks
  37. The agent runs [over 40 individual checks](OPTIMIZATION-CHECKS.md) across build settings, project configuration, source code, and package dependencies.
  38. | Check | What the agent looks for | |
  39. |-------|--------------------------|---|
  40. | Build settings audit | Debug/Release/General settings against best practices (compilation mode, optimization level, eager linking, compilation caching) | [Details](OPTIMIZATION-CHECKS.md#build-settings-audit) |
  41. | Script phase analysis | Missing input/output declarations, scripts running unnecessarily, debug/simulator guards | [Details](OPTIMIZATION-CHECKS.md#script-phase-analysis) |
  42. | Compile hotspot detection | Long type-checks, complex expressions, compiler diagnostic flags | [Details](OPTIMIZATION-CHECKS.md#compile-hotspot-detection) |
  43. | Zero-change build overhead | Fixed-cost phases (codesign, validation, scripts) inflating incremental builds | [Details](OPTIMIZATION-CHECKS.md#zero-change-build-overhead) |
  44. | Target dependency review | Accuracy, parallelism blockers, monolithic targets | [Details](OPTIMIZATION-CHECKS.md#target-dependency-review) |
  45. | Module variant detection | Config drift across targets causing duplicate module builds | [Details](OPTIMIZATION-CHECKS.md#module-variant-detection) |
  46. | SPM graph analysis | Plugin overhead, branch pins, package layering, circular dependencies | [Details](OPTIMIZATION-CHECKS.md#spm-graph-analysis) |
  47. | Swift macro impact | Cascading rebuilds, swift-syntax universal builds | [Details](OPTIMIZATION-CHECKS.md#swift-macro-impact) |
  48. | SwiftUI view decomposition | Monolithic body properties, result builder complexity | [Details](OPTIMIZATION-CHECKS.md#swiftui-view-decomposition) |
  49. | Asset catalog parallelism | Single-threaded compilation bottleneck, splitting for parallel builds | [Details](OPTIMIZATION-CHECKS.md#asset-catalog-parallelism) |
  50. | Access control optimization | Missing `final`, overly broad visibility inflating compiler work | [Details](OPTIMIZATION-CHECKS.md#access-control-optimization) |
  51. | Incremental build diagnostics | Planning Swift module, SwiftEmitModule, Task Backtraces | [Details](OPTIMIZATION-CHECKS.md#incremental-build-diagnostics) |
  52. ## Community Results
  53. Real-world improvements reported by developers who used these skills. Add your own by opening a pull request.
  54. The `xcode-build-orchestrator` generates your table row at the end of every optimization run, so contributing is a single copy-paste.
  55. > [!NOTE]
  56. > A small clean-build increase is normal when enabling compilation caching -- the first cold build populates the cache. Cached clean builds (branch switching, pulling changes) and incremental builds are where the real gains show up.
  57. | App | Clean Build | Incremental Build |
  58. |-----|------------|-------------------|
  59. | [Helm for App Store Connect](https://helm-app.com) | 86s → 91s (+5s / within noise) | 70s → 9s (-61s / 87% faster) |
  60. | [Stock Analyzer](https://www.stock-analyzer.app) | 41.5s → 33.2s (-8.3s / 20% faster) | 5.3s → 3.6s (-1.7s / 32% faster) |
  61. | [Enchanted](https://github.com/gluonfield/enchanted/pull/216) | 19.4s → 16.6s (-2.8s / 14% faster) | 2.5s → 2.2s (-0.3s / 12% faster) |
  62. | [Wikipedia iOS](https://github.com/wikimedia/wikipedia-ios/pull/5740) | 48.7s → 46.5s (-2.2s / 5% faster) | 12.9s → 12.2s (-0.7s / 5% faster) |
  63. | [Kickstarter iOS](https://github.com/kickstarter/ios-oss/pull/2808) | 83.4s → 83.5s (~0s / within noise) | 10.9s → 10.6s (-0.3s / 3% faster) |
  64. | [Dash](https://dashworkouts.app) | 67.8s → 66.9s (-0.9s / within noise) | 6.7s → 7.1s (+0.4s / within noise) |
  65. | [Klivvr](https://klivvr.com/) | 247ss → 167s (-80s / 32% faster) | 48s → 48s (same) |
  66. ## Who This Is For
  67. - iOS and macOS teams with slow local build loops
  68. - developers investigating a recent build-time regression
  69. - teams that want evidence-backed Xcode build optimization instead of guesswork
  70. - developers who want a reusable Agent Skills package, not a one-off script
  71. ## Included Skills
  72. | Skill | Purpose |
  73. |-------|---------|
  74. | `xcode-build-orchestrator` | End-to-end workflow: benchmark, analyze, prioritize, approve, fix, re-benchmark |
  75. | `xcode-build-benchmark` | Repeatable clean and incremental build benchmarks with timestamped artifacts |
  76. | `xcode-compilation-analyzer` | Swift compile hotspot analysis and source-level recommendations |
  77. | `xcode-project-analyzer` | Build settings, scheme, script phase, and target dependency auditing |
  78. | `spm-build-analysis` | Package graph, plugin overhead, and module variant review |
  79. | `xcode-build-fixer` | Apply approved optimization changes and verify with benchmarks |
  80. The orchestrator is the recommended starting point -- it coordinates the other five skills automatically. Install all six skills so the orchestrator can access each specialist.
  81. ## Installation Options
  82. ### Option A: Using skills.sh
  83. Install all six skills (required -- the orchestrator depends on the specialist skills):
  84. ```bash
  85. npx skills add https://github.com/avdlee/xcode-build-optimization-agent-skill
  86. ```
  87. To install a single skill for standalone use, add the `--skill` flag:
  88. ```bash
  89. npx skills add https://github.com/avdlee/xcode-build-optimization-agent-skill --skill xcode-project-analyzer
  90. ```
  91. Available individual skills: `xcode-build-benchmark`, `xcode-compilation-analyzer`, `xcode-project-analyzer`, `spm-build-analysis`, `xcode-build-orchestrator`, `xcode-build-fixer`. Note that the orchestrator requires all other skills to be installed.
  92. ### Option B: Claude Code Plugin
  93. 1. Add the marketplace:
  94. ```bash
  95. /plugin marketplace add AvdLee/Xcode-Build-Optimization-Agent-Skill
  96. ```
  97. 2. Install the plugin:
  98. ```bash
  99. /plugin install xcode-build-skills@xcode-build-skills
  100. ```
  101. To enable for everyone in a repository, add to your project configuration:
  102. ```json
  103. {
  104. "enabledPlugins": {
  105. "xcode-build-skills@xcode-build-skills": true
  106. },
  107. "extraKnownMarketplaces": {
  108. "xcode-build-skills": {
  109. "source": {
  110. "source": "github",
  111. "repo": "AvdLee/Xcode-Build-Optimization-Agent-Skill"
  112. }
  113. }
  114. }
  115. }
  116. ```
  117. ### Option C: Cursor Plugin (coming soon)
  118. This repository is packaged for Cursor plugin submission, but the marketplace listing is not live yet.
  119. Once approved, you'll be able to install it from the Cursor Marketplace.
  120. ### Option D: Codex / OpenAI-compatible tools
  121. This repository includes an `agents/openai.yaml` manifest. Copy or symlink the skill folders into your Codex skills directory:
  122. ```bash
  123. cp -R skills/ "$CODEX_HOME/skills/"
  124. ```
  125. See [Codex skills documentation](https://developers.openai.com/codex/skills/#where-to-save-skills) for details on where to save skills.
  126. ### Option E: Using pi package manager
  127. Install via [pi](https://github.com/mariozechner/pi-mono):
  128. ```bash
  129. pi install https://github.com/AvdLee/Xcode-Build-Optimization-Agent-Skill
  130. ```
  131. The skills will be available automatically in pi sessions.
  132. ### Option F: Manual Install
  133. 1. Clone this repository.
  134. 2. Install or symlink the specific skill folder from `skills/` that you want.
  135. 3. Ask your AI coding tool to use the corresponding skill.
  136. Useful docs: [Codex Skills](https://developers.openai.com/codex/skills/#where-to-save-skills) | [Claude Code Agent Skills](https://code.claude.com/en/skills) | [Cursor Skills](https://cursor.com/docs/context/skills#enabling-skills)
  137. ## Why Clean And Incremental Builds Both Matter
  138. Clean builds expose:
  139. - package and module setup cost
  140. - full project graph overhead
  141. - target structure and explicit-module issues
  142. Incremental builds expose:
  143. - edit-loop pain
  144. - run script bottlenecks
  145. - cache invalidation problems
  146. - repeated package-plugin overhead
  147. That distinction is central to this repo and follows both Apple's Xcode guidance and the SwiftLee workflow in [Build performance analysis for speeding up Xcode builds](https://www.avanderlee.com/optimization/analysing-build-performance-xcode/).
  148. ## See Also My Other Skills
  149. - [Swift Concurrency Expert](https://github.com/AvdLee/Swift-Concurrency-Agent-Skill)
  150. - [SwiftUI Expert](https://github.com/AvdLee/SwiftUI-Agent-Skill)
  151. - [Core Data Expert](https://github.com/AvdLee/Core-Data-Agent-Skill)
  152. - [Swift Testing Expert](https://github.com/AvdLee/Swift-Testing-Agent-Skill)
  153. ## Shared Support Layer
  154. Each skill bundles its own copies of the scripts, references, and schemas it needs so it works after standalone installation. The canonical copies live at the repo root:
  155. - `scripts/` -- helper scripts for benchmarking, timing-summary parsing, compilation diagnostics, report generation, and recommendation rendering
  156. - `references/` -- build settings best practices, artifact format, recommendation format, and source citations
  157. - `schemas/` -- JSON schema for benchmark output
  158. When a root-level file changes, the corresponding copies inside each skill that uses it must be updated (see [CONTRIBUTING.md](CONTRIBUTING.md)).
  159. ## Skill Structure
  160. <!-- BEGIN SKILL STRUCTURE -->
  161. ```text
  162. skills/
  163. xcode-build-benchmark/
  164. SKILL.md
  165. references/
  166. benchmark-artifacts.md
  167. benchmarking-workflow.md
  168. xcode-compilation-analyzer/
  169. SKILL.md
  170. references/
  171. build-optimization-sources.md
  172. code-compilation-checks.md
  173. recommendation-format.md
  174. xcode-project-analyzer/
  175. SKILL.md
  176. references/
  177. build-optimization-sources.md
  178. build-settings-best-practices.md
  179. project-audit-checks.md
  180. recommendation-format.md
  181. spm-build-analysis/
  182. SKILL.md
  183. references/
  184. build-optimization-sources.md
  185. recommendation-format.md
  186. spm-analysis-checks.md
  187. xcode-build-orchestrator/
  188. SKILL.md
  189. references/
  190. benchmark-artifacts.md
  191. build-settings-best-practices.md
  192. orchestration-report-template.md
  193. recommendation-format.md
  194. xcode-build-fixer/
  195. SKILL.md
  196. references/
  197. build-settings-best-practices.md
  198. fix-patterns.md
  199. recommendation-format.md
  200. ```
  201. <!-- END SKILL STRUCTURE -->
  202. ## Research Basis
  203. All checks are grounded in Apple documentation, WWDC sessions, and proven community practices. See [OPTIMIZATION-CHECKS.md](OPTIMIZATION-CHECKS.md) for the full list of checks with references to each source.
  204. The stored reference summaries live in `references/build-optimization-sources.md`.
  205. ## RocketSim Positioning
  206. This repo helps you optimize point-in-time build performance with an agent-guided workflow.
  207. RocketSim complements it by monitoring build performance over time:
  208. - automatic clean vs incremental build tracking
  209. - duration trends and percentile metrics
  210. - machine, Xcode, and macOS comparisons
  211. - team-wide visibility without custom build scripts
  212. If you want to catch regressions earlier and see whether your build times are improving over weeks or months, use [RocketSim Build Insights](https://www.rocketsim.app/docs/features/build-insights/build-insights/) after you apply the improvements from this repo.
  213. ## Contributing
  214. Contributions are welcome when they keep the repo focused on Xcode build optimization and Agent Skills format quality.
  215. Please read [CONTRIBUTING.md](CONTRIBUTING.md) for:
  216. - skill-authoring guidance
  217. - repo scope and quality standards
  218. - workflow notes for scripts and README sync
  219. ## About The Author
  220. Created by [Antoine van der Lee](https://www.avanderlee.com), creator of SwiftLee and RocketSim. The practical build workflow in this repository is informed by the SwiftLee article [Build performance analysis for speeding up Xcode builds](https://www.avanderlee.com/optimization/analysing-build-performance-xcode/) and ongoing work on RocketSim Build Insights.
  221. ## License
  222. This repository is available under the MIT License. See [LICENSE](LICENSE) for details.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.