Use before shipping any agent, prompt, model or tool change, or when a pass-rate drop needs a verdict. Runs repeated trials, gates candidate vs baseline with paired statistics in regression_gate.py, checks tool-call trajectories and finds flaky cases.
Capabilities
The gate blocks on
It warns, and a human decides, on an underpowered drop above --tolerance or a
Scripts
All support --sample and --output json
Getting started
Full instructionsExample command
Workflow
python scripts/trajectory_checker.py --spec cases.json --results candidate.jsonlInstructions: SKILL.mdv1.0.2
Agent Regression Evals — prove the change did not make it worse
Portability: 3 stdlib scripts, no APIs, no LLM calls. You run the agent; these grade, count and gate.
"Pass rate went from 82% to 79%" is not a finding until you know whether three
points is outside the noise. Agents are non-deterministic, so one trial per
case cannot tell a regression from a coin flip, and a final answer can be right
while the path to it called a tool it never should have.
Workflow
# 0 - Run every case k times (k >= 3) on baseline and candidate, from a clean
# environment per trial. Write one JSONL row per trial:
# {"case_id": "refund-lookup", "trial": 1, "passed": true, "critical": true,
# "cost_usd": 0.012, "trajectory": [{"tool": "get_order", "args": {...}}]}
# 1 - Grade the path where the path matters (safety, required lookups).
python scripts/trajectory_checker.py --spec cases.json --results candidate.jsonl
# 2 - Separate flaky cases from stable ones before trusting any comparison.
python scripts/flake_detector.py --results candidate.jsonl --k 3 --quarantine-out q.json
# 3 - Gate: paired per-case comparison against baseline. Exit 4 blocks the merge.
python scripts/regression_gate.py --baseline baseline.jsonl --candidate candidate.jsonl --quarantine q.json
Step 1 uses match modes strict | unordered | subset | superset. Default to
superset (required steps present, harmless exploration allowed); grade the
outcome, not the path, unless order is the requirement. forbidden tools block
in every mode.
Step 2 reports pass@k (succeeds at least once in k) and pass^k (succeeds
all k times). A user meets every trial, so pass^k is the reliability number.
Cases marked critical are never quarantine candidates.
Step 3 averages trials within each case first (trials of one case are
correlated), then tests paired per-case differences with a t-based 95% CI and a
one-sided exact McNemar test. When the drop is real but the sample is too small
to show it, the gate says how many cases it would take.
The gate blocks on
- A statistically significant drop (CI upper bound below zero, or McNemar p < 0.05).
- A critical case that passed every baseline trial and failed any candidate trial.
- A baseline case missing from the candidate run. Dropping a case is the cheapest fake fix.
- A quarantine entry with no owner or expiry, or covering a critical case.
- A forbidden tool call (trajectory checker, exit 4).
It warns, and a human decides, on an underpowered drop above --tolerance or a
cost rise above --max-cost-increase.
Hard rules
- Never compare single trials. Under 3 trials per case the flake detector refuses (exit 4).
- Never pool trials as independent samples. Average per case, then compare cases.
- Never quarantine without owner and expiry. An expired entry re-enters the gate automatically.
- Never delete a failing case to go green. The gate counts what is missing.
- Never call "no significant drop" a pass on 8 cases. Report the power note with the verdict.
- Start the suite from real failures (20-50 cases), balanced between "should do" and "should not do".
Scripts
| Script | Role | Exit codes |
|---|---|---|
scripts/trajectory_checker.py |
Grades tool-call paths: match modes, args modes, forbidden tools, call ceilings | 0 · 2 deviations · 3 bad input · 4 forbidden tool |
scripts/flake_detector.py |
STABLE_PASS / STABLE_FAIL / FLAKY per case, Wilson CI, pass@k, pass^k, quarantine stubs | 0 · 2 flaky · 3 · 4 too few trials |
scripts/regression_gate.py |
Paired CI, exact McNemar, critical cases, dropped cases, quarantine validity, cost | 0 PASS · 2 WARN · 3 · 4 BLOCK |
All support --sample and --output json.
References and assets
references/eval_statistics.md— pass@k vs pass^k, per-case averaging, paired CI, McNemar, power (7 sources)references/trajectory_grading.md— outcome vs path, match modes, grader types (6 sources)references/flaky_cases_and_quarantine.md— flake causes, quarantine with expiry, clean trials (6 sources)assets/eval_case_spec.example.json— trajectory spec for step 1assets/sample_baseline.jsonl,assets/sample_candidate.jsonl— results formatassets/ci_eval_gate.example.yml— CI job that runs the gate and fails on exit 4
Explore more skills
Browse all- Senior ArchitectSystem architecture decisions with a written rationale: monolith vs microservices, database choice, scaling limits,…
- SEO AuditFind why a site is not ranking: technical SEO, on-page issues, meta tags, site health. Use whenever the user asks why a…
- Code ReviewerUse for any code review: a pull request, a diff, a commit, or a pasted function, handler or file in TypeScript,…
- Grill MeInterview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of…
- Code to PRDUse when asked to write a PRD or product spec from an existing codebase (reverse-engineer requirements, document pages,…
- Senior QAWrite and improve tests for React or Next.js apps: Jest, React Testing Library, MSW mocks, Playwright E2E, coverage…
Security
Signing
Verified copySLSA L1- Signed by
- skills-hub.ai verified copy of https://github.com/alirezarezvani/claude-skills
- Method
- Verified copy of the source repoPublished by a community repo, not by skills-hub.ai. We signed this exact version to vouch that its content matches what the repo published. Check it with `npx @skills-hub-ai/cli verify`.
- Key
- skills-hub-ed25519-2026-11
- Signed
Reviews (0)
More from Multi-Domain Skills
View source →Frequently asked questions about agent-regression-evals
What does the agent-regression-evals skill do?
Use before shipping any agent, prompt, model or tool change, or when a pass-rate drop needs a verdict. Runs repeated trials, gates candidate vs baseline with paired statistics in regression_gate.py, checks tool-call trajectories and finds flaky cases. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the agent-regression-evals skill?
Run `npx @skills-hub-ai/cli install alirezarezvani-agent-regression-evals` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/alirezarezvani-agent-regression-evals/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does agent-regression-evals work with?
agent-regression-evals runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the agent-regression-evals skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use agent-regression-evals after installing it?
In Claude Code, type `/alirezarezvani-agent-regression-evals` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the agent-regression-evals skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.
Badge for your README
Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.
[](https://skills-hub.ai/skills/alirezarezvani-agent-regression-evals)<a href="https://skills-hub.ai/skills/alirezarezvani-agent-regression-evals"><img src="https://skills-hub.ai/api/badges/skill/alirezarezvani-agent-regression-evals" alt="Install on Skills Hub"></a>More options in the badge docs.