Skip to content
Development
Skill

/compare-builds

Compares two Xcode build runs to identify duration regressions, cache changes, and new issues. Can be invoked with build IDs, dashboard URLs, or branch names (e.g. `tuist compare-builds --base main --head feature-branch`).

From plugin
tuist
5.9k13 skills46 agents

Claude Code

$ npx -y skills add tuist/tuist --skill compare-builds --agent claude-code

SKILL.md

compare-builds.SKILL.md
name: compare-builds
description: Compares two Xcode build runs to identify duration regressions, cache changes, and new issues. Can be invoked with build IDs, dashboard URLs, or branch names (e.g. `tuist compare-builds --base main --head feature-branch`).

Compare Builds

Quick Start

You'll typically receive two build identifiers (IDs, dashboard URLs, or branch names). Follow these steps:

1. Run `tuist build list --json` to find builds on each branch. 2. Run `tuist build show <build-id> --json` for both base and head builds. 3. Fetch sub-resource details: targets (`tuist build xcode target list <id> --json`), issues (`tuist build xcode issue list <id> --json`), and cache tasks (`tuist build xcode cache-task list <id> --json`). 4. Compare duration, status, cache hit rates, and other metrics. 5. Summarize regressions, improvements, and recommendations.

If only one identifier is provided, use the project's default branch as the baseline.

Step 1: Resolve Builds

If base/head are build IDs or dashboard URLs

Fetch each directly:

tuist build show <base-id> --json
tuist build show <head-id> --json

If base/head are branch names

List recent builds on each branch and pick the latest:

tuist build list --git-branch <base-branch> --json --page-size 1
tuist build list --git-branch <head-branch> --json --page-size 1

Then fetch full details with `tuist build show <id> --json`.

Defaults

  • If no base is provided, use the project's default branch (usually `main`).
  • If no head is provided, detect the current git branch with `git rev-parse --abbrev-ref HEAD`.

Step 2: Fetch Sub-Resource Details

After fetching both builds with `tuist build show <id> --json`, drill down into sub-resources for a deeper comparison.

Compare targets

tuist build xcode target list <base-id> --json
tuist build xcode target list <head-id> --json

Look for targets that changed status (e.g., success to failure) or had significant duration changes.

Compare issues

tuist build xcode issue list <base-id> --json
tuist build xcode issue list <head-id> --json

Look for new warnings or errors introduced in the head build.

Compare cache tasks

tuist build xcode cache-task list <base-id> --json
tuist build xcode cache-task list <head-id> --json

Identify which specific targets had cache misses or hits and whether that changed between builds.

Step 3: Compare Top-Level Metrics

After fetching both builds, compare:

| Metric | What to check | |---|---| | `duration` | Flag if head is >10% slower than base | | `status` | Flag if base succeeded but head failed | | `cacheable_tasks_count` | Note if task count changed | | `cacheable_task_local_hits_count` | Compare local hit counts | | `cacheable_task_remote_hits_count` | Compare remote hit counts | | Cache hit rate | `(local_hits + remote_hits) / cacheable_tasks_count * 100` | | `category` | Note if one is `clean` and the other `incremental` (makes duration comparison less meaningful) | | `scheme` / `configuration` | Ensure both builds used the same scheme and configuration for a fair comparison |

Compute the cache miss delta: `base_misses - head_misses`. Positive means head has fewer misses (improvement). Negative means regression.

Step 4: Investigate Duration Regressions

If the head build is significantly slower:

1. Check if the `category` differs (clean vs incremental builds are not directly comparable). 2. Check if cache hit rate dropped, which would explain longer builds. 3. If both are incremental with similar cache rates, the regression is likely in compilation time.

Step 5: Investigate Cache Changes

Compare cache statistics:

  • **Hit rate dropped**: Possible causes include dependency changes, build setting changes, or Xcode version updates.
  • **Hit rate improved**: Likely due to better cache warming or fewer source changes.
  • **Task count changed**: New targets added or removed.

Step 6: Check Build Context

Compare environment details:

  • `xcode_version` and `macos_version`: Different versions can affect build times and cache validity.
  • `is_ci`: CI vs local builds may have different performance characteristics.
  • `git_branch` and `git_commit_sha`: Verify the builds are from the expected commits.

Summary Format

Produce a summary with:

1. **Overall verdict**: Better, worse, or neutral compared to base. 2. **Duration**: Absolute and percentage change. 3. **Cache hit rate**: Change in hit rate with explanation. 4. **Status**: Any status changes (pass to fail or vice versa). 5. **Environment**: Note any environment differences that affect comparability. 6. **Recommendations**: Actionable next steps based on findings.

Example:

Build Comparison: base (abc123 on main) vs head (def456 on feature-x)

Duration: 45.2s -> 62.8s (+39%) -- REGRESSION
Cache hit rate: 85% -> 72% (-13%) -- 8 new cache misses
Status: success -> success

Root cause: Cache hit rate dropped due to 8 targets with invalidated caches.
The dependency hash changed for FeatureModule, cascading to 7 downstream targets.

Recommendations:
- Investigate why FeatureModule's cache was invalidated
- Consider splitting large targets to reduce cascade impact

Done Checklist

  • Resolved both base and head builds
  • Fetched sub-resource details (targets, issues, cache tasks)
  • Compared duration, cache, and status metrics
  • Identified root causes for any regressions
  • Provided actionable recommendations
Read more
@tuist
Ships withtuist

Tuist is a build platform for engineering teams and their coding agents. It works with Xcode, Gradle, Bazel, Elixir, and Rust builds. Features vary by toolchain: Rust compilation caching is experimental, and Once support is in canary.

5.9k13 skills46 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
5.9k
Star history of tuist/tuist on GitHub, a chart by star-history.com

Other skills on tuist.

verifying-work-with-tuist

verifying-work-with-tu…

Checks a change against the project's history in Tuist before calling it done, so that flaky tests, failures that already happen…

@tuist@tuistInstall Skill
analyze-selective-testing

analyze-selective-test…

Analyzes Xcode selective testing effectiveness for a test run, showing which test targets were skipped or ran, and diagnosing…

@tuist@tuistInstall Skill
compare-bundles

compare-bundles

Compares two app bundles to identify size changes, new or removed artifacts, and platform differences. Can be invoked with bundle…

@tuist@tuistInstall Skill
compare-cache-runs

compare-cache-runs

Compares two `tuist cache` runs to identify cache hit rate changes and root-cause analysis of cache invalidation. Can be invoked…

@tuist@tuistInstall Skill
compare-generations

compare-generations

Compares two `tuist generate` runs to identify cache hit rate changes and root-cause analysis of cache invalidation. Can be…

@tuist@tuistInstall Skill
compare-gradle-builds

compare-gradle-builds

Compares two Gradle build runs to identify duration regressions, cache changes, and task outcome differences. Can be invoked with…

@tuist@tuistInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react9d252k
@facebook@facebookInstall Skill

Questions about compare-builds.

Which coding agents can use compare-builds?
compare-builds installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.