ai-regression-testing
Regression testing strategies for AI-assisted development.
Skill by majiang213
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/majiang213-ai-regression-testing
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
ai-regression-testing- Description
- Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code.
- License
- MIT
- Instructions
- 381 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (1)
- SKILL.md
SKILL.md (first lines)
# AI Regression Testing
Testing patterns specifically designed for AI-assisted development, where the same model writes code and reviews it — creating systematic blind spots that only automated tests can catch.
## When to Activate
- AI agent (Claude Code, Cursor, Codex) has modified API routes or backend logic
- A bug was found and fixed — need to prevent re-introduction
- Project has a sandbox/mock mode that can be leveraged for DB-free testing
- Running `/bug-check` or similar review commands after code changes
- Multiple code paths exist (sandbox vs production, feature flags, etc.)
## The Core Problem
When an AI writes code and then reviews its own work, it carries the same assumptions into both steps. This creates a predictable failure pattern:
```
AI writes fix → AI reviews fix → AI says "looks correct" → Bug still exists
```
**Real-world example** (observed in production):
```
Fix 1: Added notification_settings to API response
→ Forgot to add it to the SELECT query
→ AI reviewed and missed it (same blind spot)
Fix 2: Added it to SELECT query
→ TypeScript build error (column not in generated types)
→ AI reviewed Fix 1 but didn't catch the SELECT issue
Fix 3: Changed to SELECT *
→ Fixed production path, forgot sandbox path
→ AI reviewed and missed it AGAIN (4th occurrence)
Fix 4: Test caught it instantly on first run PASS:
```
The pattern: **sandbox/production path inconsistency** is the #1 AI-introduced regression.
## Sandbox-Mode API Testing
Most projects with AI-friendly architecture have a sandbox/mock mode. This is the key to fast, DB-free API testing.
### Setup (Vitest + Next.js App Router)
```typescript
// vitest.config.ts
import { defineConfig } from "vitest/config";
import path from "path";
export default defineConfig({
test: {
environment: "node",
globals: true,
include: ["__tests__/**/*.test.ts"],
setupFiles: ["__tests__/setup.ts"],
},
resolve: {
alias: {
"@": path.resolve(__dirname, "."),
},
},
});
```
```typescript
// __tests__/setup.ts
// Force sandbox mode — no database needed
process.env.SANDBOX_MODE = "true";
process.env.NEXT_PUBLIC_SUPABASE_URL = "";
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY = "";
```
### Test Helper for Next.js API Routes
```typescript
// __tests__/helpers.ts
import { NextRequest } from "next/server";
export function createTestRequest(
url: string,
options?: {
method?: string;
body?: Record<string, unknown>;
headers?: Record<string, string>;
sandboxUserId?: string;
},
): NextRequest {
const { method = "GET", body, headers = {}, sandboxUserId } = options || {};
const fullUrl = url.startsWith("http") ? url : `http://localhost:3000${url}`;
const reqHeaders: Record<string, string> = { ...headers };
if (sandboxUserId) {
reqHeaders["x-sandbox-user-id"] = sandboxUserId;
}
const init: { method: string; headers: Record<string, string>; body?: string } = {
method,
headers: reqHeaders,
};
if (body) {
init.body = JSON.stringify(body);
reqHeaders["content-type"] = "application/json";
}
return new NextRequest(fullUrl, init);
}
export async function parseResponse(response: Response) {
const json = await response.json();
return { status: response.status, json };
}
```
### Writing Regression Tests
The key principle: **write tests for bugs that were found, not for code that works**.From majiang213/OpenClaw-MAS, MIT.
More from majiang213/OpenClaw-MAS
- 0.464score
agent-payment-x402
majiang213
Add x402 payment execution to AI agents — per-task budgets, spending controls, and non-custodial wallets via MCP tools.
SkillDFreshness: D★ 5Claude Code +9 - 0.463score
canary-watch
majiang213
Use this skill to monitor a deployed URL for regressions after deploys, merges, or dependency upgrades.
SkillDFreshness: D★ 5Claude Code +9 - 0.256score
backend-patterns
majiang213
Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes.
SkillDFreshness: D★ 5Claude Code +9
Signals
- Stars
- 5
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Apr 3, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/majiang213/OpenClaw-MAS
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.580score
ai-regression-testing
Jamkris
Regression testing strategies for AI-assisted development.
SkillCFreshness: C★ 91Claude Code +9 - 0.336score
ai-regression-testing
sakuradairong
Regression testing strategies for AI-assisted development.
SkillCFreshness: C★ 48Claude Code +9 - 0.325score
ai-regression-testing
S3YED
Regression testing strategies for AI-assisted development.
SkillCFreshness: C★ 12Claude Code +9 - 0.324score
ai-regression-testing
FridrichMethod
Regression testing strategies for AI-assisted development.
SkillCFreshness: C★ 15Claude Code +9 - 0.313score
ai-regression-testing
jpmsilva1
Regression testing strategies for AI-assisted development.
SkillBFreshness: BClaude Code +9 - 0.307score
ai-regression-testing
krataia
Regression testing strategies for AI-assisted development.
SkillBFreshness: BClaude Code +9 - 0.280score
ai-regression-testing
netsecdevio
Regression testing strategies for AI-assisted development.
SkillCFreshness: CClaude Code +9 - 0.280score
ai-regression-testing
omarabdo516
Regression testing strategies for AI-assisted development.
SkillCFreshness: CClaude Code +9 - 0.280score
ai-regression-testing
ddandanell
Regression testing strategies for AI-assisted development.
SkillCFreshness: CClaude Code +9 - 0.280score
ai-regression-testing
jaysonpantollana
Regression testing strategies for AI-assisted development.
SkillCFreshness: CClaude Code +9 - 0.280score
ai-regression-testing
vishal24p
Regression testing strategies for AI-assisted development.
SkillCFreshness: CClaude Code +9 - 0.261score
ai-regression-testing
aayushsoam
Regression testing strategies for AI-assisted development.
SkillDFreshness: D★ 2Claude Code +9
More from majiang213
- 0.464score
agent-payment-x402
majiang213
Add x402 payment execution to AI agents — per-task budgets, spending controls, and non-custodial wallets via MCP tools.
SkillDFreshness: D★ 5Claude Code +9 - 0.463score
canary-watch
majiang213
Use this skill to monitor a deployed URL for regressions after deploys, merges, or dependency upgrades.
SkillDFreshness: D★ 5Claude Code +9
Cite this page
ai-regression-testing skill. Agent Mart. https://agentmart.dev/skills/majiang213-ai-regression-testing (last updated 2026-10-24)