Agent Regression Evals skill for Claude

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.

Agent Regression Evals SKILL.md

The full skill file from alirezarezvani/claude-skills (MIT).

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

  1. A statistically significant drop (CI upper bound below zero, or McNemar p < 0.05).
  2. A critical case that passed every baseline trial and failed any candidate trial.
  3. A baseline case missing from the candidate run. Dropping a case is the cheapest fake fix.
  4. A quarantine entry with no owner or expiry, or covering a critical case.
  5. 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

ScriptRoleExit codes
scripts/trajectory_checker.pyGrades tool-call paths: match modes, args modes, forbidden tools, call ceilings0 · 2 deviations · 3 bad input · 4 forbidden tool
scripts/flake_detector.pySTABLE_PASS / STABLE_FAIL / FLAKY per case, Wilson CI, pass@k, pass^k, quarantine stubs0 · 2 flaky · 3 · 4 too few trials
scripts/regression_gate.pyPaired CI, exact McNemar, critical cases, dropped cases, quarantine validity, cost0 PASS · 2 WARN · 3 · 4 BLOCK

All support --sample and --output json.

References and assets

How to install Agent Regression Evals

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit alirezarezvani/claude-skills/engineering/skills/agent-regression-evals#main ~/.claude/skills/agent-regression-evals

Codex

npx degit alirezarezvani/claude-skills/engineering/skills/agent-regression-evals#main ~/.codex/skills/agent-regression-evals

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+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.

+How do I install Agent Regression Evals in Claude Code?

Copy the skill folder into ~/.claude/skills/agent-regression-evals, for example with "npx degit alirezarezvani/claude-skills/engineering/skills/agent-regression-evals#main ~/.claude/skills/agent-regression-evals". Claude Code loads it automatically and uses it when a task matches.

+Does Agent Regression Evals work with ChatGPT or Codex?

Yes. Agent Regression Evals uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/agent-regression-evals. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Agent Regression Evals free?

Agent Regression Evals is published on GitHub by alirezarezvani under the MIT license, which allows free use.

Related data & analytics skills

  1. Analytics

    When the user wants to set up or audit analytics, or asks whether a metric or number is calculated right, what to track, or how to name…

    coreyhaines31/marketingskills★ 61k
  2. Statistical Analysis

    Guided statistical analysis for research data - test selection, assumption checking, effect sizes, power analysis, Bayesian alternatives,…

    K-Dense-AI/scientific-agent-skills★ 58k
  3. Dashboard Chat Best Practices

    Apply dashboard-grade chat UX patterns in the Eve chat template.

    thedotmack/claude-mem★ 118k
  4. Analytics Tracking

    Use for any GA4, Google Tag Manager, event-tracking or conversion-tracking setup, audit or broken-event debug, before touching tags.

    alirezarezvani/claude-skills★ 30k
  5. Campaign Analytics

    Analyze campaign performance on the user's numbers: ROAS, CPA, ROI, multi-touch attribution and funnel drop-off.

    alirezarezvani/claude-skills★ 30k
  6. Embedded Iot Mentor

    Use for any embedded or IoT hardware project (ESP32, STM32, Arduino, Pico, firmware, PCB, MQTT, Home Assistant, sensor dashboards), before…

    alirezarezvani/claude-skills★ 30k
  7. Helm Chart Builder

    Use for any Helm chart to create, review or harden (values.yaml, templates, subcharts, RBAC, pod security), before editing it.

    alirezarezvani/claude-skills★ 30k
  8. Jira Expert

    Jira setup and queries: JQL, workflows, custom fields, automation, dashboards.

    alirezarezvani/claude-skills★ 30k
  9. Product Analytics

    Use when defining product KPIs, building metric dashboards, running cohort or retention analysis, or interpreting feature adoption trends…

    alirezarezvani/claude-skills★ 30k

See all data & analytics skills →

More skills from alirezarezvani

  1. Agent Run Forensics

    Use when asked why an agent did something, what a past session or run changed, whether tests really passed, or to verify a session summary.

    alirezarezvani/claude-skills★ 30k
  2. Agent Workflow Designer

    Use when architecting a multi-step LLM or agent pipeline, choosing single vs multi-agent, or fixing context bloat and broken handoffs.

    alirezarezvani/claude-skills★ 30k
  3. Agenthub

    Run several agents on one task in parallel and keep the best result: faster code, copy variants, research angles.

    alirezarezvani/claude-skills★ 30k

All skills by alirezarezvani →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.