{"id":49720081,"url":"https://github.com/AvdLee/Xcode-Build-Optimization-Agent-Skill","last_synced_at":"2026-05-25T13:01:42.082Z","repository":{"id":347769709,"uuid":"1180781840","full_name":"AvdLee/Xcode-Build-Optimization-Agent-Skill","owner":"AvdLee","description":"An Agent Skill helping you to optimize Xcode incremental and clean builds by running benchmarks and optimizing build settings.","archived":false,"fork":false,"pushed_at":"2026-04-15T16:57:33.000Z","size":1132,"stargazers_count":1067,"open_issues_count":4,"forks_count":40,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-05-25T07:07:45.386Z","etag":null,"topics":["agent","agent-skills","ios","ios-development","skills","xcode"],"latest_commit_sha":null,"homepage":"https://www.rocketsim.app","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AvdLee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":["avdlee"]}},"created_at":"2026-03-13T12:04:00.000Z","updated_at":"2026-05-25T06:50:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/AvdLee/Xcode-Build-Optimization-Agent-Skill","commit_stats":null,"previous_names":["avdlee/xcode-build-optimization-agent-skill"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AvdLee/Xcode-Build-Optimization-Agent-Skill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvdLee%2FXcode-Build-Optimization-Agent-Skill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvdLee%2FXcode-Build-Optimization-Agent-Skill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvdLee%2FXcode-Build-Optimization-Agent-Skill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvdLee%2FXcode-Build-Optimization-Agent-Skill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AvdLee","download_url":"https://codeload.github.com/AvdLee/Xcode-Build-Optimization-Agent-Skill/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvdLee%2FXcode-Build-Optimization-Agent-Skill/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33475746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-25T06:32:55.349Z","status":"ssl_error","status_checked_at":"2026-05-25T06:32:35.322Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","agent-skills","ios","ios-development","skills","xcode"],"created_at":"2026-05-09T00:00:28.507Z","updated_at":"2026-05-25T13:01:42.075Z","avatar_url":"https://github.com/AvdLee.png","language":"Python","funding_links":["https://github.com/sponsors/avdlee"],"categories":["🧠 Agent Skills"],"sub_categories":[],"readme":"\u003ca href=\"https://www.rocketsim.app\"\u003e\u003cimg src=\"assets/xcode-build-optimization-banner.jpg\" alt=\"Xcode Build Optimization Agent Skills - Monitor your build performance with RocketSim\" /\u003e\u003c/a\u003e\n\n# Xcode Build Optimization Agent Skills\n\nOpen-source Agent Skills for benchmarking and optimizing Xcode build performance across clean builds, incremental builds, compile hotspots, project settings, and Swift Package Manager overhead.\n\n## Quick Start\n\nInstall all six skills (the orchestrator needs the specialist skills to work):\n\n```bash\nnpx skills add https://github.com/avdlee/xcode-build-optimization-agent-skill\n```\n\nThen open your Xcode project in your AI coding tool and say:\n\n\u003e Use the /xcode-build-orchestrator skill to analyze build performance and come up with a plan for improvements.\n\nThe 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.\n\nFor 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/).\n\n## Every Second Counts\n\nA 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**.\n\nMost projects have several seconds of easy wins hiding in build settings, script phases, and compiler flags. This skill finds them.\n\n## How It Works\n\nThe orchestrator coordinates five specialist skills in a recommend-first workflow. Nothing is modified until you approve.\n\n```mermaid\nflowchart LR\n    Orchestrator --\u003e Benchmark[\"Benchmark\\n(clean + incremental)\"]\n    Benchmark --\u003e Compilation[\"Compilation\\nAnalyzer\"]\n    Benchmark --\u003e Project[\"Project\\nAnalyzer\"]\n    Benchmark --\u003e SPM[\"SPM\\nAnalyzer\"]\n    Compilation --\u003e Plan[\"Optimization\\nPlan\"]\n    Project --\u003e Plan\n    SPM --\u003e Plan\n    Plan --\u003e You{{\"You review\\n\u0026 approve\"}}\n    You --\u003e Fixer[\"Build\\nFixer\"]\n    Fixer --\u003e ReBenchmark[\"Re-benchmark\\n\u0026 verify\"]\n```\n\n**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.\n\n\u003e Use the Xcode build orchestrator to analyze build performance and come up with a plan for improvements.\n\n**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.\n\n\u003e Implement the approved items from the optimization plan at .build-benchmark/optimization-plan.md, then re-benchmark to verify the improvements.\n\nThe plan file is your evidence trail -- shareable with teammates, reviewable in PRs, and diffable over time.\n\n## What It Checks\n\nThe agent runs [over 40 individual checks](OPTIMIZATION-CHECKS.md) across build settings, project configuration, source code, and package dependencies.\n\n| Check | What the agent looks for | |\n|-------|--------------------------|---|\n| 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) |\n| Script phase analysis | Missing input/output declarations, scripts running unnecessarily, debug/simulator guards | [Details](OPTIMIZATION-CHECKS.md#script-phase-analysis) |\n| Compile hotspot detection | Long type-checks, complex expressions, compiler diagnostic flags | [Details](OPTIMIZATION-CHECKS.md#compile-hotspot-detection) |\n| Zero-change build overhead | Fixed-cost phases (codesign, validation, scripts) inflating incremental builds | [Details](OPTIMIZATION-CHECKS.md#zero-change-build-overhead) |\n| Target dependency review | Accuracy, parallelism blockers, monolithic targets | [Details](OPTIMIZATION-CHECKS.md#target-dependency-review) |\n| Module variant detection | Config drift across targets causing duplicate module builds | [Details](OPTIMIZATION-CHECKS.md#module-variant-detection) |\n| SPM graph analysis | Plugin overhead, branch pins, package layering, circular dependencies | [Details](OPTIMIZATION-CHECKS.md#spm-graph-analysis) |\n| Swift macro impact | Cascading rebuilds, swift-syntax universal builds | [Details](OPTIMIZATION-CHECKS.md#swift-macro-impact) |\n| SwiftUI view decomposition | Monolithic body properties, result builder complexity | [Details](OPTIMIZATION-CHECKS.md#swiftui-view-decomposition) |\n| Asset catalog parallelism | Single-threaded compilation bottleneck, splitting for parallel builds | [Details](OPTIMIZATION-CHECKS.md#asset-catalog-parallelism) |\n| Access control optimization | Missing `final`, overly broad visibility inflating compiler work | [Details](OPTIMIZATION-CHECKS.md#access-control-optimization) |\n| Incremental build diagnostics | Planning Swift module, SwiftEmitModule, Task Backtraces | [Details](OPTIMIZATION-CHECKS.md#incremental-build-diagnostics) |\n\n## Community Results\n\nReal-world improvements reported by developers who used these skills. Add your own by opening a pull request.\n\nThe `xcode-build-orchestrator` generates your table row at the end of every optimization run, so contributing is a single copy-paste.\n\n\u003e [!NOTE]\n\u003e 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.\n\n| App | Clean Build | Incremental Build |\n|-----|------------|-------------------|\n| [Helm for App Store Connect](https://helm-app.com) | 86s → 91s (+5s / within noise) | 70s → 9s (-61s / 87% faster) |\n| [Stock Analyzer](https://www.stock-analyzer.app) | 41.5s → 33.2s (-8.3s / 20% faster) | 5.3s → 3.6s (-1.7s / 32% faster) |\n| [Enchanted](https://github.com/gluonfield/enchanted/pull/216) | 19.4s → 16.6s (-2.8s / 14% faster) | 2.5s → 2.2s (-0.3s / 12% faster) |\n| [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) |\n| [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) |\n| [Dash](https://dashworkouts.app) | 67.8s → 66.9s (-0.9s / within noise) | 6.7s → 7.1s (+0.4s / within noise) |\n| [Klivvr](https://klivvr.com/) | 247ss → 167s (-80s / 32% faster) | 48s → 48s (same) |\n\n## Who This Is For\n\n- iOS and macOS teams with slow local build loops\n- developers investigating a recent build-time regression\n- teams that want evidence-backed Xcode build optimization instead of guesswork\n- developers who want a reusable Agent Skills package, not a one-off script\n\n## Included Skills\n\n| Skill | Purpose |\n|-------|---------|\n| `xcode-build-orchestrator` | End-to-end workflow: benchmark, analyze, prioritize, approve, fix, re-benchmark |\n| `xcode-build-benchmark` | Repeatable clean and incremental build benchmarks with timestamped artifacts |\n| `xcode-compilation-analyzer` | Swift compile hotspot analysis and source-level recommendations |\n| `xcode-project-analyzer` | Build settings, scheme, script phase, and target dependency auditing |\n| `spm-build-analysis` | Package graph, plugin overhead, and module variant review |\n| `xcode-build-fixer` | Apply approved optimization changes and verify with benchmarks |\n\nThe orchestrator is the recommended starting point -- it coordinates the other five skills automatically. Install all six skills so the orchestrator can access each specialist.\n\n## Installation Options\n\n### Option A: Using skills.sh\n\nInstall all six skills (required -- the orchestrator depends on the specialist skills):\n\n```bash\nnpx skills add https://github.com/avdlee/xcode-build-optimization-agent-skill\n```\n\nTo install a single skill for standalone use, add the `--skill` flag:\n\n```bash\nnpx skills add https://github.com/avdlee/xcode-build-optimization-agent-skill --skill xcode-project-analyzer\n```\n\nAvailable 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.\n\n### Option B: Claude Code Plugin\n\n1. Add the marketplace:\n\n```bash\n/plugin marketplace add AvdLee/Xcode-Build-Optimization-Agent-Skill\n```\n\n2. Install the plugin:\n\n```bash\n/plugin install xcode-build-skills@xcode-build-skills\n```\n\nTo enable for everyone in a repository, add to your project configuration:\n\n```json\n{\n  \"enabledPlugins\": {\n    \"xcode-build-skills@xcode-build-skills\": true\n  },\n  \"extraKnownMarketplaces\": {\n    \"xcode-build-skills\": {\n      \"source\": {\n        \"source\": \"github\",\n        \"repo\": \"AvdLee/Xcode-Build-Optimization-Agent-Skill\"\n      }\n    }\n  }\n}\n```\n\n### Option C: Cursor Plugin (coming soon)\n\nThis repository is packaged for Cursor plugin submission, but the marketplace listing is not live yet.\n\nOnce approved, you'll be able to install it from the Cursor Marketplace.\n\n### Option D: Codex / OpenAI-compatible tools\n\nThis repository includes an `agents/openai.yaml` manifest. Copy or symlink the skill folders into your Codex skills directory:\n\n```bash\ncp -R skills/ \"$CODEX_HOME/skills/\"\n```\n\nSee [Codex skills documentation](https://developers.openai.com/codex/skills/#where-to-save-skills) for details on where to save skills.\n\n### Option E: Using pi package manager\n\nInstall via [pi](https://github.com/mariozechner/pi-mono):\n```bash\npi install https://github.com/AvdLee/Xcode-Build-Optimization-Agent-Skill\n```\n\nThe skills will be available automatically in pi sessions.\n\n### Option F: Manual Install\n\n1. Clone this repository.\n2. Install or symlink the specific skill folder from `skills/` that you want.\n3. Ask your AI coding tool to use the corresponding skill.\n\nUseful 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)\n\n## Why Clean And Incremental Builds Both Matter\n\nClean builds expose:\n\n- package and module setup cost\n- full project graph overhead\n- target structure and explicit-module issues\n\nIncremental builds expose:\n\n- edit-loop pain\n- run script bottlenecks\n- cache invalidation problems\n- repeated package-plugin overhead\n\nThat 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/).\n\n## See Also My Other Skills\n\n- [Swift Concurrency Expert](https://github.com/AvdLee/Swift-Concurrency-Agent-Skill)\n- [SwiftUI Expert](https://github.com/AvdLee/SwiftUI-Agent-Skill)\n- [Core Data Expert](https://github.com/AvdLee/Core-Data-Agent-Skill)\n- [Swift Testing Expert](https://github.com/AvdLee/Swift-Testing-Agent-Skill)\n\n## Shared Support Layer\n\nEach 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:\n\n- `scripts/` -- helper scripts for benchmarking, timing-summary parsing, compilation diagnostics, report generation, and recommendation rendering\n- `references/` -- build settings best practices, artifact format, recommendation format, and source citations\n- `schemas/` -- JSON schema for benchmark output\n\nWhen a root-level file changes, the corresponding copies inside each skill that uses it must be updated (see [CONTRIBUTING.md](CONTRIBUTING.md)).\n\n## Skill Structure\n\u003c!-- BEGIN SKILL STRUCTURE --\u003e\n```text\nskills/\n  xcode-build-benchmark/\n    SKILL.md\n    references/\n      benchmark-artifacts.md\n      benchmarking-workflow.md\n  xcode-compilation-analyzer/\n    SKILL.md\n    references/\n      build-optimization-sources.md\n      code-compilation-checks.md\n      recommendation-format.md\n  xcode-project-analyzer/\n    SKILL.md\n    references/\n      build-optimization-sources.md\n      build-settings-best-practices.md\n      project-audit-checks.md\n      recommendation-format.md\n  spm-build-analysis/\n    SKILL.md\n    references/\n      build-optimization-sources.md\n      recommendation-format.md\n      spm-analysis-checks.md\n  xcode-build-orchestrator/\n    SKILL.md\n    references/\n      benchmark-artifacts.md\n      build-settings-best-practices.md\n      orchestration-report-template.md\n      recommendation-format.md\n  xcode-build-fixer/\n    SKILL.md\n    references/\n      build-settings-best-practices.md\n      fix-patterns.md\n      recommendation-format.md\n```\n\u003c!-- END SKILL STRUCTURE --\u003e\n\n## Research Basis\n\nAll 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.\n\nThe stored reference summaries live in `references/build-optimization-sources.md`.\n\n## RocketSim Positioning\n\nThis repo helps you optimize point-in-time build performance with an agent-guided workflow.\n\nRocketSim complements it by monitoring build performance over time:\n\n- automatic clean vs incremental build tracking\n- duration trends and percentile metrics\n- machine, Xcode, and macOS comparisons\n- team-wide visibility without custom build scripts\n\nIf 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.\n\n## Contributing\n\nContributions are welcome when they keep the repo focused on Xcode build optimization and Agent Skills format quality.\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for:\n\n- skill-authoring guidance\n- repo scope and quality standards\n- workflow notes for scripts and README sync\n\n## About The Author\n\nCreated 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.\n\n## License\n\nThis repository is available under the MIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAvdLee%2FXcode-Build-Optimization-Agent-Skill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAvdLee%2FXcode-Build-Optimization-Agent-Skill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAvdLee%2FXcode-Build-Optimization-Agent-Skill/lists"}