ai-regression-testing

Write sandbox-mode Vitest regression tests that catch AI-introduced API bugs.

Updated Jun 13, 2026
One-click install
npx skills add https://github.com/malinovskiy-makar/qls --skill ai-regression-testing-malinovskiy-makar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-regression-testing
Source: https://github.com/malinovskiy-makar/qls/tree/main/.claude/skills/ai-regression-testing
Command: npx skills add https://github.com/malinovskiy-makar/qls --skill ai-regression-testing-malinovskiy-makar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When the same AI model writes code and reviews its own work, it carries identical assumptions into both steps, creating systematic blind spots where bugs survive review. This Skill replaces unreliable AI self-review with automated regression tests that mechanically catch recurring bugs like sandbox/production path mismatches and missing SELECT columns. ## Core Features & Use Cases - Sandbox-Mode API Testing: Configure Vitest with Next.js App Router to test API routes without a database by forcing sandbox/mock mode via environment variables. - Bug-Driven Test Strategy: Write tests only for bugs that were actually found, naming them after the bug (e.g., "BUG-R1 regression") so the same defect can never reoccur. - Bug-Check Workflow Integration: Define a custom command that runs tests and builds before any AI code review, then proposes a regression test for every fix. - Use Case: After an AI agent fixes a missing notification_settings field in a profile API for the fourth time, write a contract test asserting all required response fields exist in sandbox mode, then run it as the mandatory first step of every bug-check. ## Quick Start Ask the AI to set up sandbox-mode Vitest regression tests for the API route where a bug was just fixed, and integrate them into the bug-check workflow.

Frequently Asked Questions about ai-regression-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test Next.js API routes without a database?

Use sandbox mode by setting environment variables like SANDBOX_MODE=true in a Vitest setup file, then call route handlers directly with NextRequest objects. This lets tests run against mock data in under a second with no database dependency.

How to catch bugs when AI writes and reviews the same code?

Write automated regression tests for every bug found, since AI self-review repeats the same assumptions and misses the same defects. Run tests and builds as the mandatory first step of any review workflow before trusting AI judgment.

What is sandbox/production path mismatch in API testing?

It is the most common AI-introduced regression, where a fix updates the production code path but forgets the sandbox mock path, or vice versa. Catch it by asserting both paths return the same response shape with all required fields.

Should I aim for high test coverage with AI-generated code?

No, write tests only where bugs were actually found rather than chasing coverage percentages. AI tends to repeat the same category of mistake, so bug-driven tests grow organically and prevent exact regressions without wasted effort.

Why does my Supabase query return undefined for new columns?

The new column was added to the response mapping but not to the SELECT clause, so it is always undefined. Use SELECT * or explicitly include new columns, and add a regression test asserting the field exists in the response.