agentsclimarketplace

Ai regression testing

Skill yeaight7/agent-powerups/skills/ai-regression-testing

Use when an agent has modified logic, API routes, or data-transformation code, a bug was just fixed and must not be reintroduced, or behavior must stay identical across execution paths such as sandbox versus production.From its SKILL.md

Install
npx -y skills add yeaight7/agent-powerups --skill ai-regression-testing

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
  • runs commandsInstructs the agent to run 2 commands, including `npm test` and 1 more.

SKILL.md

4.1 KB, 860 tokens by cl100k_base, as published. Nobody here has run it

AI Regression Testing

When an agent writes code and then reviews it, it carries the same assumptions into both steps. Automated tests break this cycle.

When to Use

  • An agent has modified logic, API routes, or data transformation code
  • A bug was found — need to prevent re-introduction
  • Running /bug-check after a change session
  • Multiple execution paths exist (feature flags, sandbox vs production, env variants)

The Core Problem

Agent writes fix → Agent reviews fix → Agent says "looks correct" → Bug still present

The most common blind spot: an agent fixes the production path but leaves the sandbox/mock path unchanged, or vice versa.

Workflow

Run in order. Do not skip to agent review if automated steps fail.

Step 1 — Run Tests (mandatory)

npm test      # or: pytest, cargo test, go test ./...
npm run build # TypeScript build / type check
  • Test fail → highest priority; fix before anything else
  • Build fail → report type errors as highest priority
  • Both pass → continue to Step 2

Step 2 — Agent Code Review

With tests passing, do a focused review for patterns agents commonly miss:

  1. Execution path parity: Do all code paths (sandbox, production, feature-flag on/off) return the same response shape?
  2. Query completeness: Are all fields used in the response present in the query or selection?
  3. Error state cleanup: On error, is stale state cleared before the error is surfaced?
  4. Optimistic update rollback: If an API call fails, is the optimistic UI change reverted?

Step 3 — Write a Regression Test for Each Bug Fixed

For every bug found and fixed, add a test immediately:

Bug: <description>
File: <path>
Regression test: <test name and what it asserts>

If you cannot write a test, document why:

Bug: <description>
Regression test: DEFERRED — <reason> (e.g., requires E2E harness not yet in place)

Do not silently skip. Every real bug should either have a test or an explicit deferral note.

Writing Effective Regression Tests

Test the contract, not the implementation:

// Test what the consumer receives, not how it's computed
const REQUIRED_RESPONSE_FIELDS = ["id", "email", "settings", "created_at"];

it("profile endpoint returns all required fields", async () => {
  const res = await GET(createRequest("/api/user/profile"));
  const json = await res.json();
  for (const field of REQUIRED_RESPONSE_FIELDS) {
    expect(json.data).toHaveProperty(field);
  }
});

Name tests after the bug category, not the fix:

it("sandbox path returns same field set as production path (BUG-CLASS: path-parity)")
it("notification_settings is not undefined after SELECT * removal (regression)")

Common AI Regression Patterns

PatternCheckPriority
Execution path paritySame response shape across all pathsHigh
Query field omissionAll response fields present in DB queryHigh
Error state leakageState cleared before error is returnedMedium
Missing rollbackPrevious state restored on API failureMedium

Strategy

Do not aim for coverage percentage. Write tests only for bugs that were found. Bug clusters naturally: if three bugs appeared in /api/user/profile, that endpoint needs tests. An endpoint that has never had a bug does not need tests yet.

Tests added this way grow organically with the bug history and cannot be gamed by coverage metrics.

Verification

  • Test suite and build/type check were run and pass — before any agent review started
  • The four review checks were applied: path parity, query completeness, error-state cleanup, optimistic-update rollback
  • Every bug fixed has a regression test, or an explicit DEFERRED note with the reason
  • New tests assert the contract (response shape, required fields), not the implementation

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 0 of the 12 instructions most test skills give in 860 tokens

Counted across 1,201 of the 2,096 authors here whose files we hold, read 2026-09-06

  • Write a failing test before writing codein 43 of 1201, across 36 files
  • Run the full test suitein 36 of 1201, across 35 files
  • Test only one variable per experimentin 34 of 1201, across 17 files
  • Read product marketing context before asking questionsin 34 of 1201, across 14 files
  • Mock external dependenciesin 34 of 1201, across 30 files
  • Define primary, secondary, and guardrail metricsin 33 of 1201, across 16 files
  • Pre-determine sample size before startingin 31 of 1201, across 14 files
  • Test behavior rather than implementationin 31 of 1201, across 29 files
  • Formulate a hypothesis before designing a testin 30 of 1201, across 13 files
  • Document every test hypothesis, variant, and resultin 29 of 1201, across 11 files
  • Use descriptive test function namesin 25 of 1201, across 21 files
  • Commit to the methodology without stopping earlyin 24 of 1201, across 8 files

Said here and by no other author read

  • Run test suite and build before agent review
  • Verify parity across all execution paths
  • Check for query field completeness
  • Clear state before surfacing errors
  • Roll back optimistic updates on API failure
  • Document reason if a regression test is deferred

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.