xcode-build-orchestrator

avdlee/xcode-build-optimization-agent-skill · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/avdlee/xcode-build-optimization-agent-skill --skill xcode-build-orchestrator
0 commentsdiscussion
summary

Use this skill as the recommend-first entrypoint for end-to-end Xcode build optimization work.

skill.md

Xcode Build Orchestrator

Use this skill as the recommend-first entrypoint for end-to-end Xcode build optimization work.

Non-Negotiable Rules

  • Wall-clock build time (how long the developer waits) is the primary success metric. Every recommendation must state its expected impact on the developer's actual wait time.
  • Start in recommendation mode.
  • Benchmark before making changes.
  • Do not modify project files, source files, packages, or scripts without explicit developer approval.
  • Preserve the evidence trail for every recommendation.
  • Re-benchmark after approved changes and report the wall-clock delta.

Two-Phase Workflow

The orchestration is designed as two distinct phases separated by developer review.

Phase 1 -- Analyze (recommend-only)

Run this phase in agent mode because the agent needs to execute builds, run benchmark scripts, write benchmark artifacts, and generate the optimization report. However, treat Phase 1 as recommend-only: do not modify any project files, source files, packages, or build settings. The only files the agent creates during this phase are benchmark artifacts and the optimization plan inside .build-benchmark/.

  1. Collect the build target context: workspace or project, scheme, configuration, destination, and current pain point. When both .xcworkspace and .xcodeproj exist, prefer .xcodeproj unless the workspace contains sub-projects required for the build. Workspaces that reference external projects may fail if those projects are not checked out.
  2. Run xcode-build-benchmark to establish a baseline if no fresh benchmark exists. The benchmark script auto-detects COMPILATION_CACHE_ENABLE_CACHING = YES and includes cached clean builds that measure the realistic developer experience (warm cache). If the build fails to compile, check git log for a recent buildable commit. When working in a worktree, cherry-picking a targeted build fix from a feature branch is acceptable to reach a buildable state. If SPM packages reference gitignored directories in their exclude: paths (e.g., __Snapshots__), create those directories before building -- worktrees do not contain gitignored content and xcodebuild -resolvePackageDependencies will crash otherwise.
  3. Verify the benchmark artifact has non-empty timing_summary_categories. If empty, the timing summary parser may have failed -- re-parse the raw logs or inspect them manually. If COMPILATION_CACHE_ENABLE_CACHING is enabled, also verify the artifact includes cached_clean runs.
    • Benchmark confidence check: For each build type (clean, cached clean, incremental), compare the min and max values. If the spread (max - min) exceeds 20% of the median, flag the benchmark as having high variance and recommend running additional repetitions (5+ runs) before drawing conclusions. High variance makes it difficult to distinguish real improvements from noise. After applying changes, only claim an improvement if the post-change median falls outside the baseline's min-max range.
  4. If incremental builds are the primary pain point and Xcode 16.4+ is available, recommend the developer enable Task Backtraces (Scheme Editor > Build tab > Build Debugging > "Task Backtraces"). This reveals why each task re-ran, which is critical for diagnosing unexpected replanning or input invalidation. Include any Task Backtrace evidence in the analysis.
  5. Determine whether compile tasks are likely blocking wall-clock progress or just consuming parallel CPU time. Compare the sum of all timing-summary category seconds against the wall-clock median: if the sum is 2x+ the median, most work is parallelized and compile hotspot fixes are unlikely to reduce wait time. If SwiftCompile, CompileC, SwiftEmitModule, or Planning Swift module dominate the timing summary and appear likely to be on the critical path, run diagnose_compilation.py to capture type-checking hotspots. If they are parallelized, still run diagnostics but label findings as "parallel efficiency improvements" rather than "build time improvements."
  6. Run the specialist analyses that fit the evidence by reading each skill's SKILL.md and applying its workflow:
  7. Merge findings into a single prioritized improvement plan.
  8. Generate the markdown optimization report using generate_optimization_report.py and save it to .build-benchmark/optimization-plan.md. This report includes the build settings audit, timing analysis, prioritized recommendations, and an approval checklist.
  9. Stop and present the plan to the developer for review.

The developer reviews .build-benchmark/optimization-plan.md, checks the approval boxes for the recommendations they want implemented, and then triggers phase 2.

Phase 2 -- Execute and verify (agent mode)

Run this phase in agent mode after the developer has reviewed and approved recommendations from the plan. Delegate all implementation work to xcode-build-fixer by reading its SKILL.md and applying its workflow.

  1. Read .build-benchmark/optimization-plan.md and identify the approved items from the approval checklist.
  2. Hand off to xcode-build-fixer with the approved plan. The fixer applies each approved change, verifies compilation, and re-benchmarks.
  3. Append verification results to the optimization plan: post-change medians, absolute and percentage deltas, and confidence notes.
  4. Report before and after results, plus any remaining follow-up opportunities.

Prioritization Rules

The goal is to reduce how long the developer waits for builds to finish.

  1. Identify the developer's primary pain (clean build, incremental build, or both) and the measured wall-clock median.
  2. Determine what is likely blocking wall-clock progress:
    • If the sum of all timing-summary category seconds is 2x+ the wall-clock median, most work is parallelized. Compile hotspot fixes are unlikely to reduce wait time.
    • If a single serial category (e.g. PhaseScriptExecution, CompileAssetCatalog, CodeSign) accounts for a large fraction of wall-clock, that is the real bottleneck.
    • If Planning Swift module or SwiftEmitModule dominates incremental builds, the cause is likely invalidation or module size, not individual file compile speed.
  3. Rank recommendations by likely wall-time savings, not cumulative task reduction.
  4. Source-level compile fixes should not outrank project/graph/configuration fixes unless evidence suggests they are on the critical path.

Prefer changes that are measurable, reversible, and low-risk.

Recommendation Impact Language

Every recommendation presented to the developer must include one of these impact statements:

  • "Expected to reduce your [clean/incremental] build by approximately X seconds."
  • "Reduces parallel compile work but is unlikely to reduce your build wait time because other tasks take equally long."
  • "Impact on wait time is uncertain -- re-benchmark after applying to confirm."
  • "No wait-time improvement expected. The benefit is [deterministic builds / faster branch switching / reduced CI cost]."
  • For COMPILATION_CACHE_ENABLE_CACHING specifically: "Measured 5-14% faster clean builds across tested projects. The benefit compounds in real workflows where the cache persists between builds -- branch switching, pulling changes, and CI with persistent DerivedData."

Never quote cumulative task-time savings as the headline impact. If a change reduces 5 seconds of parallel compile work but another equally long task still runs, the developer's wait time does not change.

Approval Gate

Before implementing anything, present a short approval list that includes:

  • recommendation name
  • expected wait-time impact (using the impact language above)
  • evidence summary
  • affected files or settings
  • whether the change is low, medium, or high risk

Wait for explicit developer approval.

Post-Approval Execution

After approval, delegate to xcode-build-fixer:

  • the fixer implements only the approved items
  • changes are applied atomically and kept scoped
  • any deviations from the original recommendation plan are noted
  • the fixer re-benchmarks with the same benchmark contract

Final Report

Lead with the wall-clock result in plain language, e.g.: "Your clean build now takes 82s (was 86s) -- 4s faster." Then include:

  • baseline clean and incremental wall-clock medians
  • post-change clean and incremental wall-clock medians
  • absolute and percentage wall-clock deltas
  • what changed
  • what was intentionally left unchanged
  • confidence notes if noise prevents a strong conclusion -- if benchmark variance is high (min-to-max spread exceeds 20% of median), say so explicitly rather than presenting noisy numbers as definitive improvements or regressions
  • if cumulative task metrics improved but wall-clock did not, say plainly: "Compiler workload decreased but build wait time did not improve. This is expected when Xcode runs these tasks in parallel with other equally long work."
  • a ready-to-paste community results row and a link to open a PR (see the report template)

Preferred Command Paths

Benchmark

python3 scripts/benchmark_builds.py \
  --project App.xcodeproj \
  --scheme MyApp \
  --configuration Debug \
  --destination "platform=iOS Simulator,name=iPhone 16" \
  --output-dir .build-benchmark

For macOS apps use --destination "platform=macOS". For watchOS use --destination "platform=watchOS Simulator,name=Apple Watch Series 10". For tvOS use --destination "platform=tvOS Simulator,name=Apple TV". Omit --destination to use the scheme's default.

To measure real incremental builds (file-touched rebuild) instead of zero-change builds, add --touch-file path/to/SomeFile.swift.

Compilation Diagnostics

python3 scripts/diagnose_compilation.py \
  --project App.xcodeproj \
  --scheme MyApp \
  --configuration Debug \
  --destination "platform=iOS Simulator,name=iPhone 16" \
  --threshold 100 \
  --output-dir .build-benchmark

Optimization Report

python3 scripts/generate_optimization_report.py \
  --benchmark .build-benchmark/<artifact>.json \
  --project-path App.xcodeproj \
  --diagnostics .build-benchmark/<diagnostics>.json \
  --output .build-benchmark/optimization-plan.md

Additional Resources

how to use xcode-build-orchestrator

How to use xcode-build-orchestrator on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add xcode-build-orchestrator
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

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

The skills CLI fetches xcode-build-orchestrator from GitHub repository avdlee/xcode-build-optimization-agent-skill and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/xcode-build-orchestrator

Reload or restart Cursor to activate xcode-build-orchestrator. Access the skill through slash commands (e.g., /xcode-build-orchestrator) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.735 reviews
  • Chaitanya Patil· Dec 28, 2024

    xcode-build-orchestrator fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Lucas Taylor· Dec 16, 2024

    xcode-build-orchestrator fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Ava Chawla· Dec 4, 2024

    Registry listing for xcode-build-orchestrator matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Ava Malhotra· Nov 23, 2024

    Useful defaults in xcode-build-orchestrator — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Piyush G· Nov 19, 2024

    xcode-build-orchestrator is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Anika Zhang· Nov 7, 2024

    xcode-build-orchestrator is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Anika Martinez· Oct 26, 2024

    Keeps context tight: xcode-build-orchestrator is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Kwame Tandon· Oct 14, 2024

    I recommend xcode-build-orchestrator for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Shikha Mishra· Oct 10, 2024

    Keeps context tight: xcode-build-orchestrator is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Meera Diallo· Sep 21, 2024

    Keeps context tight: xcode-build-orchestrator is the kind of skill you can hand to a new teammate without a long onboarding doc.

showing 1-10 of 35

1 / 4