Agent skill

Branch Regression

by elodin-sys in elodin-sys/elodin

Compare two git branches (usually the current branch vs main) by running every example on each, capturing exit codes, logs, and editor screenshots, then diffing the results.

Apache-2.0Auto-check passedDevelopment

Install Branch Regression

skills CLI
$ npx skills add elodin-sys/elodin --skill branch-regression -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install elodin-sys/elodin branch-regression --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/elodin-sys/elodin.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/branch-regression .claude/skills/branch-regression && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
branch-regression
GitHub stars
547
Token cost
~1.6k tokens
SKILL.md length
668 words
Files
3
Skills in repo
14
Repo updated
First seen
Licence
Apache-2.0

At a glance

Compare two git branches (usually the current branch vs main) by running every example on each, capturing exit codes, logs, and editor screenshots, then diffing the results.

  • Works in 3 steps: Preflight → Compare → Report
  • The user asks to regression-test a branch
  • SKILL.md covers Workflow, Interpreting log diffs and Gotchas
  • Runs Shell and Python scripts from its folder; calls nix, git and just

What it does

Branch Regression is an agent skill from elodin-sys/elodin. Compare two git branches (usually the current branch vs main) by running every example on each, capturing exit codes, logs, and editor screenshots, then diffing the results. Use when the user asks to regression-test a branch, compare branches, check a branch for example breakage, or A/B the editor output before merging.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `capture_branch.sh` and `compare_runs.py`).

It sits in Development, covering Git workflow. The repository describes itself as: Elodin simulation and flight software monorepo. The licence is Apache-2.0.

When your agent uses it

  • The user asks to regression-test a branch
  • Compare branches
  • Check a branch for example breakage
  • A/B the editor output before merging

Example prompts

  • “/branch-regression”

Requirements

  • Python 3
  • A Bash shell

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Preflight
  2. Compare
  3. Report

What it can do on your machine

Read from SKILL.md and the folder at commit 784483e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Shell and Python), which the agent can run.

    Shell commands in SKILL.md call:

    • nix
    • git
    • just
    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Branch Regression loads about 1.6k tokens when it runs. Until then it costs about 85 tokens; SKILL.md has 668 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~85
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from elodin-sys/elodin at commit 784483e, republished under its Apache-2.0 licence (© elodin-sys). 668 words, ~1,607 tokens.

Download SKILL.mdSave it as .claude/skills/branch-regression/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
branch-regression
description
Compare two git branches (usually the current branch vs main) by running every example on each, capturing exit codes, logs, and editor screenshots, then diffing the results. Use when the user asks to regression-test a branch, compare branches, check a branch for example breakage, or A/B the editor output before merging.

Branch Regression

Runs the same example suite on a base branch (usually main) and the current branch, then compares run results, exit codes, new WARN/ERROR log lines, and screenshots. Screenshots are not expected to match 100% (sims are non-deterministic) — they should be close barring an issue.

Requires: Linux host with display + GPU (editor screenshots), nix develop, repo root as cwd.

Workflow

- [ ] 0. Preflight: clean tree, record current branch
- [ ] 1. Base pass: checkout base, build, capture
- [ ] 2. Head pass: checkout original branch, build, capture
- [ ] 3. Compare + visually inspect flagged screenshots
- [ ] 4. Report (and confirm you are back on the original branch)
0. Preflight
bash
git status --porcelain   # MUST be empty
HEAD_BRANCH=$(git branch --show-current)
BASE_BRANCH=main         # or the branch the user named
OUT=ai-context/branch-regression/$(date +%Y-%m-%d)-$BASE_BRANCH-vs-$HEAD_BRANCH
mkdir -p "$OUT"
if [ -f "$OUT/shell-id.txt" ]; then
  ELODIN_SHELL_ID=$(cat "$OUT/shell-id.txt")
else
  ELODIN_SHELL_ID="${ELODIN_SHELL_ID:-branch-regression-$(date +%Y%m%d-%H%M%S)}"
  printf '%s\n' "$ELODIN_SHELL_ID" > "$OUT/shell-id.txt"
fi
export ELODIN_SHELL_ID

If there is any staged or uncommitted work, STOP and ask the user to commit or stash it themselves. Never stash, commit, or discard on their behalf.

Use the same OUT and ELODIN_SHELL_ID when resuming an interrupted run. Never create a fresh shell ID for each branch or example. A caller may choose any path-safe name by exporting ELODIN_SHELL_ID before starting, for example:

bash
export ELODIN_SHELL_ID="branch-regression-$(date +%Y%m%d-%H%M%S)"

Named shell directories persist for later passes and resumed sessions. Shells that start without an explicit ID use a numeric process/session ID and contain target/shells/$ELODIN_SHELL_ID/garbage-collectable; the Nix shell may remove those after the process dies.

1 & 2. Capture each branch

For each branch (base first, then head):

bash
git switch "$BASE_BRANCH"            # then later: git switch "$HEAD_BRANCH"
nix develop --command bash -lc \
  'just install && bash .cursor/skills/branch-regression/capture_branch.sh "$1"' \
  _ "$OUT/base"
# head pass writes to "$OUT/head"

capture_branch.sh writes <example>.png, <example>.log, <example>.exit per example plus commit.txt. Default example set is the known-good editor gallery (ball, three-body, drone, rc-jet, apollo-lander, video-stream, sensor-camera, cube-sat, voyager, geo-frames); pass example names to override. Headless-only examples (frames, linalg, stablehlo, cube-sat-pysim) are run with elodin run for logs/exit only — add them explicitly if wanted.

Build and capture must run in the same nix develop invocation. Each Nix shell has its own virtual environment, so a separate capture shell cannot import the Python package installed by just install. Both branch passes must also inherit the same named ELODIN_SHELL_ID, which reuses the virtual environment and bin directory instead of creating a new session. Still run just install after switching branches so each pass tests binaries built from its own commit.

Rules baked into the script (do not work around them):

  • One live editor/sim at a time — everything binds TCP 2240. It waits for the port to free between examples and group-kills leftovers (s10 children respawn on a plain kill).
  • Stale DB cleanup for video-stream and voyager before each run.
  • ELODIN_SCREENSHOT_EXIT=1 + watchdog; a missing/empty PNG is a capture failure, not proof of a regression — retry once before flagging.

Always git switch back to $HEAD_BRANCH when done or on any error.

Show full SKILL.md (291 more words)Show less
3. Compare
bash
nix develop --command uv run python .cursor/skills/branch-regression/compare_runs.py \
  "$OUT/base" "$OUT/head" --rmse-threshold 0.05 --html "$OUT/report.html" \
  > "$OUT/report.md"

Prints a markdown table (exit codes, new WARN/ERROR count, screenshot RMSE, verdict), writes report.html, and exits 1 if anything is flagged. The HTML report must include base/head screenshot thumbnails for every example; each thumbnail links to the full-size image. Always generate both report formats.

Then, for every flagged example, Read both PNGs and judge visually:

  • Same scene composition (objects, trails, view cube, graph panels populated)?
  • Status bar healthy (RAM > 0, ticks advancing)?
  • Is the pixel delta explained by sim phase (a ball mid-bounce vs apex) or is content actually missing/broken?

RMSE above threshold with equivalent-looking scenes = note and pass. Missing geometry, blank viewport, dead graphs, or a new panic = regression.

4. Report

Summarize per example: base vs head exit code, new WARN/ERROR lines (quote them), RMSE, visual verdict. State the two commits compared (from commit.txt). Distinguish regressions (head worse than base) from pre-existing issues (present in both).

Interpreting log diffs

compare_runs.py only reports WARN/ERROR lines that are new in head (timestamps stripped, deduped) — noisy-but-stable warnings on both branches do not flag. Lines that differ only by a pointer/tick number may still slip through; use judgment.

Gotchas

  • Rebuilding between branches is mandatory; a stale target/release/elodin or Python wheel silently tests the wrong branch. commit.txt in each capture dir is the audit trail.
  • voyager needs SPICE kernels under examples/voyager/nasa_spice_data/; video-stream needs the GStreamer plugins from nix develop. If a prerequisite is missing on both branches, drop the example rather than flagging it.
  • Screenshot delay: script default 20 s (ELODIN_SCREENSHOT_DELAY); heavy examples may need 25 s. Same delay on both branches, or RMSE is meaningless.
  • Output lives under gitignored ai-context/; never commit captures.
  • When resuming after a crash, locate the existing output directory and restore ELODIN_SHELL_ID from shell-id.txt before entering nix develop.

© elodin-sys, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in .cursor/skills/branch-regression of elodin-sys/elodin.

  • SKILL.md
  • capture_branch.sh
  • compare_runs.py

Open the folder on GitHubat commit 784483e

Compare with similar skills

Branch Regression next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Branch Regression compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Branch Regression this skillelodin-sys/elodin547—~1.6kAutomated safety check: PassApache-2.0
Kedro Babysitkedro-org/kedro11k—~4kAutomated safety check: PassCustom licence
Fulfill Git Escrowinternet-court/internet-court-skill6.5k1 repos~1.2kAutomated safety check: NotesMIT
Git Upstream Syncwado-lang/wado117—~855Automated safety check: PassMIT
Qv SDK PR Statustetherto/qvac683—~638Automated safety check: PassApache-2.0
PR WorkflowChorus-AIDLC/Chorus1.2k—~938Automated safety check: NotesAGPL-3.0

Similar skills

  • Kedro Babysit

    kedro-org/kedro

    Run Kedro's local lint / format / type-check / tests on changed files (uses the project's pre-commit hooks, ruff, mypy, pytest, lint-imports, detect-secrets, Make targets — in the right venv), or…

    11k GitHub stars~4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Fulfill Git Escrow

    internet-court/internet-court-skill

    Fulfill a git escrow bounty by writing a solution or submitting an existing one.

    6.5k GitHub starsUsed in 1 repo~1.2k tokens
    DevelopmentAuto-check: notes
  • Git Upstream Sync

    wado-lang/wado

    The only way to merge origin/main into a branch, conflicts or not.

    117 GitHub stars~855 tokensUpdated today
    DevelopmentAuto-check passed
  • Qv SDK PR Status

    tetherto/qvac

    Team-wide PR dashboard for the SDK pod. An agent skill from tetherto/qvac.

    683 GitHub stars~638 tokensUpdated today
    DevelopmentAuto-check passed
  • PR Workflow

    Chorus-AIDLC/Chorus

    Complete workflow for submitting code changes — create branch, commit, open PR, check CI, fix failures, and merge.

    1.2k GitHub stars~938 tokensUpdated today
    DevelopmentAuto-check: notes
  • PR Feedback Quality Gate

    nexu-io/open-design

    Safely track pull request feedback, resolve review comments or merge conflicts, validate fixes, and use a read-only cross-review before committing or pushing follow-up changes.

    100k GitHub stars~572 tokensUpdated today
    DevelopmentAuto-check passed

More from elodin-sys/elodin

All 14 skills in this repo
  • Elodin Cranelift

    elodin-sys/elodin

    Work with the Cranelift JIT MLIR backend. An agent skill from elodin-sys/elodin.

    547 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Elodin DB

    elodin-sys/elodin

    Work with Elodin-DB, the time-series telemetry database. An agent skill from elodin-sys/elodin.

    547 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Elodin Dev

    elodin-sys/elodin

    Develop and contribute to the Elodin codebase. An agent skill from elodin-sys/elodin.

    547 GitHub stars~896 tokensUpdated today
    Auto-check passed
  • Elodin Editor Dev

    elodin-sys/elodin

    Contribute to the Elodin Editor, the 3D viewer and graphing tool.

    547 GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Elodin Headless Capture

    elodin-sys/elodin

    Run the Elodin Editor without a physical display in Gamescope, take screenshots, and record video through PipeWire and GStreamer.

    547 GitHub stars~2.2k tokensUpdated today
    Auto-check: notes
  • Elodin Monte Carlo

    elodin-sys/elodin

    Develop and calibrate simulations against experimental truth data using elodin monte-carlo.

    547 GitHub stars~2.9k tokensUpdated today
    Auto-check passed

Questions about Branch Regression

What does Branch Regression do?

Compare two git branches (usually the current branch vs main) by running every example on each, capturing exit codes, logs, and editor screenshots, then diffing the results. Branch Regression is an agent skill from elodin-sys/elodin. Compare two git branches (usually the current branch vs main) by running every example on each, capturing exit codes, logs, and editor screenshots, then diffing the results.

When should I use Branch Regression?

Branch Regression fits situations like: the user asks to regression-test a branch; compare branches; check a branch for example breakage; A/B the editor output before merging.

How do I install Branch Regression in Claude Code?

Run `npx skills add elodin-sys/elodin --skill branch-regression -a claude-code`. Or copy the skill folder (.cursor/skills/branch-regression in elodin-sys/elodin) into .claude/skills/branch-regression in your project. Claude Code loads it when a task matches its description.

How do I install Branch Regression in Codex?

Run `npx skills add elodin-sys/elodin --skill branch-regression -a codex`. Or copy the skill folder (.cursor/skills/branch-regression in elodin-sys/elodin) into .agents/skills/branch-regression in your project. Codex loads it when a task matches its description.

Can I use Branch Regression in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add elodin-sys/elodin --skill branch-regression -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/branch-regression, .gemini/skills/branch-regression, .github/skills/branch-regression and .opencode/skills/branch-regression in your project.

What does Branch Regression need to run?

Going by SKILL.md and its folder, Branch Regression needs a shell and Python for the scripts in its folder and the command-line tools its instructions call (nix, git, just and bash). Our summary lists: Python 3; A Bash shell.

Does Branch Regression access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Branch Regression safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Branch Regression use?

Branch Regression is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Branch Regression use?

About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Branch Regression?

Skills that share tags, products or a category with Branch Regression: Kedro Babysit (kedro-org/kedro, 11k stars), Fulfill Git Escrow (internet-court/internet-court-skill, 6.5k stars), Git Upstream Sync (wado-lang/wado, 117 stars) and Qv SDK PR Status (tetherto/qvac, 683 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Branch Regression?

elodin-sys (a GitHub organization) maintains it in elodin-sys/elodin, which has 547 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 9, 2026.

Source: elodin-sys/elodin on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.