Skills

Compare Generations

Compares two `tuist generate` runs to identify cache hit rate changes and root-cause...

Install

npx skills add tuist/tuist --skill compare-generations -g -a claude-code -y
Repository
tuist/tuist5.9k
Category
Engineering
Updated
3d ago
License
See repository
Context cost
Lightabout 1,238 tokens
Runs scripts
No, instructions only

What it does

Compares two `tuist generate` runs to identify cache hit rate changes and root-cause analysis of cache invalidation. Can be invoked with generation IDs, dashboard URLs, or branch names.

Compare Generations

Quick Start

You'll typically receive two generation identifiers. Follow these steps:

  1. Run tuist generate list --json to find generations on each branch.
  2. Run tuist generate show <id> --json for both base and head generations.
  3. Compare duration, status, and cache hit rates.
  4. Summarize cache changes with root cause analysis.

Step 1: Resolve Generations

If base/head are generation IDs or dashboard URLs

Fetch each directly:

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

If base/head are branch names

List recent generations on each branch:

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

Then fetch full details with tuist generate 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.

Step 2: Compare Top-Level Metrics

After fetching both generations, compare:

MetricWhat to check
durationFlag if head is >10% slower
statusFlag if base succeeded but head failed
cacheable_targetsNote if target count changed
local_cache_target_hitsCompare local hit counts
remote_cache_target_hitsCompare remote hit counts
is_ciNote if one is CI and the other local

Compute cache hit rates:

  • Base: (local_hits + remote_hits) / cacheable_targets * 100
  • Head: same formula
  • Delta: head_rate - base_rate

Step 3: Analyze Cache Invalidation

If cache hit rate dropped, the key question is: which target(s) caused the invalidation cascade?

Read the whole SKILL.md on GitHub

More in Engineering