ai-regression-testing

Detect AI-introduced regressions in API routes and sandbox paths.

1|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/xxih/ai-harness-zh --skill ai-regression-testing-xxih
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-regression-testing
Source: https://github.com/xxih/ai-harness-zh/tree/main/references/translations/everything-claude-code/docs/zh-CN/skills/ai-regression-testing
Command: npx skills add https://github.com/xxih/ai-harness-zh --skill ai-regression-testing-xxih

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

AI-assisted code changes often introduce repeatable regressions because the same model writes and reviews fixes, causing blind spots such as mismatched sandbox and production paths, missing SELECT fields, and incorrect error-state handling. This Skill provides focused strategies and test patterns to detect and prevent those regressions early in the development workflow.

Core Features & Use Cases

  • Sandbox-first API Tests: Guidance to force sandbox mode and run lightweight API tests without a database to validate response shapes.
  • Regression-by-Example: Emphasizes writing tests for observed bugs (not hypothetical cases) so each fixed issue gains a targeted test that prevents recurrence.
  • Workflow Integration: Defines a bug-check sequence combining automated tests, build/type checks, and AI-assisted review to ensure fixes include regression tests.
  • Use Case: When a new API field is added by an AI patch, run sandbox tests and a bug-check to ensure the field appears in sandbox and production responses and is included in DB selects.

Quick Start

Run the test suite and build checks, then invoke the bug-check workflow to have the system run sandbox API tests, report failures, and propose regression tests for any confirmed bugs.

Frequently Asked Questions about ai-regression-testing

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

FAQPage Schema
How do I catch regressions introduced by AI code generation in my API routes?

To catch AI-introduced API regressions, you can automate detection by running sandbox-first tests that validate response schemas and specific fields without a database, ensuring fixes include targeted regression tests for confirmed bugs.

What is regression-by-example testing for AI-assisted development?

Regression-by-example testing emphasizes writing tests for observed bugs rather than hypothetical cases, ensuring each fixed issue like a missing SELECT field gains a targeted test to prevent recurrence when models write and review code.

How do I run API tests in sandbox mode without a database connection?

You can run sandbox API tests without a database by forcing sandbox mode in a sandboxable test environment to validate response shapes and verify that newly added API fields appear correctly in both sandbox and production paths.

Do I need vitest to automate bug regression checks for application APIs?

You need a sandboxable test environment with fast unit tests and build or type checks to automate bug regression checks for application APIs, and vitest can be used to run the lightweight test suite verifying response schemas.

What's the best way to prevent mismatched sandbox and production paths when AI reviews code?

The best way to prevent mismatched sandbox and production paths is integrating a bug-check sequence combining automated tests, build or type checks, and AI-assisted review to ensure new fields are included in DB selects and responses.