Skip to content

AI Regression Testing

Write sandbox-mode API tests and bug-check workflows that catch bugs AI reviewers miss

Repository
affaan-m/ECC
Stars
295,127
Licence
MIT
Files
1 file

What it does

This skill teaches an AI coding agent to test its own work with automated tests instead of trusting its own review. It explains a common failure: when the same model writes a fix and then reviews it, it tends to repeat the same blind spots, such as forgetting a field in one code path. The skill provides patterns for database-free API tests using a sandbox or mock mode, a structured bug-check routine that runs tests and builds before AI review, and advice to add a regression test for each bug fixed.

Great for

  • Developers building web apps with AI coding agents such as Claude Code or Cursor
  • Teams whose projects already have a sandbox or mock mode for testing without a database
  • Projects using Vitest with Next.js App Router and Supabase or Prisma

Skip it if

  • Projects with no automated test suite or no sandbox mode, since much of the guidance depends on that setup
  • Non-developers, because the examples assume familiarity with TypeScript, Vitest and API routes
  • Teams using other stacks, where the code examples would need substantial rewriting

Try asking

  • “Check my recent API changes for sandbox and production mismatches and run the bug check”
  • “Write a regression test for the bug where notification_settings was missing from the profile response”
  • “Set up Vitest with a database-free sandbox mode for my Next.js API routes”
  • “Run /bug-check and propose regression tests for each fix”
Step-by-step guide: how to use AI Regression TestingInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    ai-regression-testing.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip ai-regression-testing.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip ai-regression-testing.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Start by writing a regression test for the specific bug you just fixed, then expand coverage over time.
  • Run the test and build commands before asking the AI to review code, so mechanical failures are caught first.
  • Keep sandbox and production response shapes in sync by testing the same required-field contract against both paths.

What's inside

  • SKILL.md

Redistributed unmodified from affaan-m/ECC under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.