# compare-test-case

compare-test-case compares one test case across two branches: pass/fail, duration, flakiness and failure details. Useful when a feature branch seems to have broken a test.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 255 installs · ★ 35 repo stars
- Author: tuist
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/tuist/agent-skills/tree/HEAD/skills/compare-test-case/SKILL.md
- Updated: 2026-03-27
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/compare-test-case

## What it does

Hand it a test case and two branches, and it lines up how that case behaves on each. The case record comes from `tuist test case show <id-or-identifier> --json`, carrying reliability, flakiness share and run counts. Runs are fetched next and split by the `git_branch` field.

Side by side you get pass rate, average duration and how many runs went flaky. The verdict falls into a bucket: newly failing, newly flaky, duration regression past a 50% rise, fixed, or unchanged. Failing runs get opened with `tuist test case run show <run-id> --json` for the assertion message, source path, line number, retry pattern and any crash report. What comes back is a summary: what changed, a root cause hypothesis, and fixes tied to files and lines.

No case in hand? The skill can start from `tuist test case list --flaky --json --page-size 10`. Base branch defaults to the project default, usually `main`, and head is whatever branch is checked out. All of it rides on `tuist` CLI: with no Tuist project behind it, the first command returns nothing and there is nothing to compare.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add tuist/agent-skills --skill compare-test-case -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/compare-test-case/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/compare-test-case/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add tuist/agent-skills --skill compare-test-case -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/compare-test-case/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add tuist/agent-skills --skill compare-test-case -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/compare-test-case/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install tuist/agent-skills skills/compare-test-case
```

2. **Manually: put the files in place**
- File: `.github/skills/compare-test-case/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add tuist/agent-skills --skill compare-test-case -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/tuist/agent-skills --path skills/compare-test-case
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/compare-test-case/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add tuist/agent-skills --skill compare-test-case -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/tuist/agent-skills/tree/HEAD/skills/compare-test-case/SKILL.md

## When to use it
- See what a feature branch broke in one specific test
- Tell a real regression from a one-off flake
- Get the file and line behind a failing assertion
- Check whether a change slowed the test down
- Pick a flaky test to dig into when none is named

## Example prompts
- Compare `AuthModuleTests/LoginTests/test_login_with_expired_token` on `main` and my current branch, then tell me what changed.
- Pull the latest runs of `test_login_with_expired_token` and give me pass rate and average duration per branch.
- Find the flakiest tests with `tuist test case list --flaky` and walk through the worst one.

## Similar
- [regression-case-author](https://affpapa.org/en/nevibecode/skills/regression-case-author.md) — skill · ★ 529 repo stars
- [test-case-management](https://affpapa.org/en/nevibecode/skills/test-case-management.md) — skill · 1400 installs
- [flaky-test-triage](https://affpapa.org/en/nevibecode/commands/flaky-test-triage.md) — command · 24 installs
- [test-reliability](https://affpapa.org/en/nevibecode/skills/test-reliability.md) — skill · 1500 installs
- [triage-flaky-test](https://affpapa.org/en/nevibecode/skills/triage-flaky-test.md) — skill · 362 installs
- [flaky-test-detective](https://affpapa.org/en/nevibecode/skills/flaky-test-detective.md) — skill · 283 installs

From the same set: [tuist/agent-skills](https://affpapa.org/en/nevibecode/by/tuist/agent-skills.md) — 12 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
