Skip to content
cccskills
FreePublished on GitHub

agent-regression-evals

Compare repeated agent evaluations before and after a change to distinguish performance drops from random variation. Scripts check tool calls, identify inconsistent cases, and provide a CI gate that blocks merging when specified regression conditions are met.

OriginalShow the original description

Use when an agent, prompt, model or tool change needs proof it did not make the agent worse — setting up a regression eval suite, deciding whether a pass-rate drop is real or noise, grading tool-call trajectories, finding flaky eval cases, or wiring an eval gate into CI that blocks the merge. Runs repeated trials, reports pass@k and pass^k, compares candidate to baseline with paired statistics, and refuses to pass a dropped case, a critical-case regression, or a forbidden tool call.

Run score Not tested

See how to install

Good for

  • Compare results before and after prompt or model changes
  • Identify evaluation cases with inconsistent results
  • Check required and forbidden tool calls
  • Block merges when regression checks fail

Files included (11)

  • SKILL.md5.5 KB
  • assets/ci_eval_gate.example.yml1.7 KB
  • assets/eval_case_spec.example.json669 B
  • assets/sample_baseline.jsonl3.7 KB
  • assets/sample_candidate.jsonl3.7 KB
  • references/eval_statistics.md4.8 KB
  • references/flaky_cases_and_quarantine.md4.8 KB
  • references/trajectory_grading.md4.1 KB
  • scripts/flake_detector.py9.8 KB
  • scripts/regression_gate.py12.2 KB
  • scripts/trajectory_checker.py10.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

a11y-audit

FreeSummary

Audit web applications for accessibility issues against WCAG 2.2 Level A and AA, the web accessibility standards. Get framework-specific code fixes, contrast checks, verification steps, and reports, with options for automated checks in development pipelines.

  • Audit a web application before release
  • Fix contrast and keyboard navigation issues
  • Prepare accessibility reports for stakeholders
alirezarezvani/claude-skills28.7KUpdated Oct 23, 2026

ab-test-setup

FreeSummary

Plan A/B tests that compare page variations, from headlines to pricing layouts. Define a hypothesis, choose success metrics, calculate sample size and duration, and prepare launch checks and results reports to support decisions.

  • Comparing landing page headlines
  • Testing signup button changes
  • Planning pricing page experiments
alirezarezvani/claude-skills28.7KUpdated Oct 23, 2026

ad-creative

FreeSummary

Create paid ad headlines and body copy tailored to each platform's character limits. Use existing performance data to develop variations, explore new messaging angles, and check copy for length, quality, and potential rejection risks.

  • Creating Google RSA headlines
  • Writing Meta and LinkedIn ad copy
  • Developing variations of successful ads
alirezarezvani/claude-skills28.7KUpdated Oct 23, 2026

Review code changes from three critical perspectives: production failures, maintainability, and security. Get a consolidated report that ranks findings by severity and provides merge guidance, helping examine assumptions that an ordinary self-review may overlook.

  • Reviewing a pull request before merging
  • Getting a second opinion on AI-written code
  • Checking authentication or data access code
alirezarezvani/claude-skills28.7KUpdated Oct 23, 2026

aeo

FreeSummary

Audit and improve content intended for citation in AI answers. Review evidence, author information, and structure, generate revised content and structured metadata, and keep a local record of observed citations across AI services.

  • Audit existing articles for evidence and credibility gaps
  • Revise article structure and references for AI answers
  • Record citations observed across AI services
alirezarezvani/claude-skills28.7KUpdated Oct 23, 2026

Create signed records for consequential agent actions such as deployments, deletions, and payments. Decide which actions need evidence, record the agent, action, target, and policy, then verify the resulting certificate offline to detect later changes.

  • Creating signed records for production deployments
  • Preserving evidence of deletions and payments
  • Recording access grants for later review
alirezarezvani/claude-skills28.7KUpdated Oct 23, 2026

See all skills by alirezarezvani

Report a problem with this skill