baseline-diff

baseline-diff is a skill for Claude Code, Codex from chipi/agentic-ai-homelab. It costs 108 tokens per session (1,026 once invoked), scanned A, original, MIT.

A comparison tool that runs the same checks on a branch and on the exact trunk commit where the branch began. A detached worktree is a separate checkout used without changing the current branch.

In plain words
What is it for?
It helps compare tests, type checks, and other build targets, report errors found only on the branch, and keep the two checkouts' source paths separate.
Why use it?
When a branch check fails, it shows whether the failure already existed in the starting code. It avoids misleading comparisons caused by stashes or shared installed code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths.

Good fit It helps compare tests, type checks, and other build targets, report errors found only on the branch, and keep the two checkouts' source paths separate.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chipi/agentic-ai-homelab/baseline-diff
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add chipi/agentic-ai-homelab --skill baseline-diff
Clone the repo
git clone --depth 1 https://github.com/chipi/agentic-ai-homelab

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for baseline-diff

README.md
[![agentmods](https://agentmods.dev/badge/skills/chipi/agentic-ai-homelab/baseline-diff/github.svg)](https://agentmods.dev/skills/chipi/agentic-ai-homelab/baseline-diff)
Your own site
<a href="https://agentmods.dev/skills/chipi/agentic-ai-homelab/baseline-diff"><img src="https://agentmods.dev/badge/skills/chipi/agentic-ai-homelab/baseline-diff/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for baseline-diff

Your own site · 80×15
<a href="https://agentmods.dev/skills/chipi/agentic-ai-homelab/baseline-diff"><img src="https://agentmods.dev/badge/skills/chipi/agentic-ai-homelab/baseline-diff.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,026 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00108 $0.01026
Opus 5.5 $0.00043 $0.00410
Sonnet 5.5 $0.00022 $0.00205
Haiku 4.5 $0.00011 $0.00103

Measured 17d ago against content hash a99b81b7bfde, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

baseline-diff scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 17d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/baseline_diff.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

workstation/claude/skills/baseline-diff/SKILL.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

baseline-diff

A red gate on a branch is the branch's until shown otherwise. The proof is the same targets run on what the branch started from. That proof was hand-rolled each round of the podcast_scraper infra split (2026-10-14 to 10-17) as cifast.sh, cifast_rest.sh and mypy_both.sh, plus a by-eye comparison of 1.5 MB logs. Two traps it kept hitting:

  • A stash is not a baseline. It leaves the session's committed work in the tree (the 2026-08-03 incident). The base here is merge-base(--base, HEAD) checked out on its own.
  • Worktrees share one editable install. Without PYTHONPATH=<tree>/src, both trees import whichever checkout the venv was installed from, and the comparison compares nothing.

Run it

cd <branch worktree>
python3 ~/.claude/skills/baseline-diff/scripts/baseline_diff.py --base origin/main type test-unit lint
python3 ~/.claude/skills/baseline-diff/scripts/baseline_diff.py --remove     # when done
  • Targets run in order, base then branch, every one even after a failure. Each finished run prints one done line, so it can be watched with the Monitor tool. A tail -f path is printed for each log.
  • The base worktree is $TMPDIR/baseline-diff-<repo>. It is reused while the merge base is unchanged. If the branch has a .venv and the base has none, the base gets a symlink to the same one. Nothing is installed.
  • --env K=V passes extra env to both trees. --logs DIR keeps logs somewhere specific.

Reading the verdict

verdict meaning
PASS both trees pass
FAIL BRANCH ONLY the base passes: the branch caused it. Fix it.
FAIL BOTH + NEW ON BRANCH already red on base, and the branch adds error lines base does not have
FAIL BOTH the same error lines in both trees: not added by the branch, and still not a pass
FIXED ON BRANCH base fails, the branch passes

Exit 1 when any target is FAIL BRANCH ONLY or FAIL BOTH + NEW ON BRANCH, else 0. Error lines are compared with numbers masked: counts, timings and line numbers differ between trees for reasons that are not new errors. The original line is what gets printed.

Read the full file on GitHub · 71 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 17d ago First seen · 71 lines · 108 tokens per session scan A a99b81b7bfde

Subscribe to this mod's changes

baseline-diff is a skill published in the GitHub repository chipi/agentic-ai-homelab (3 stars, last pushed today), licensed MIT. It adds 108 tokens to every session and 1,026 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-18.