bundles/dev-workflow/skills/ai-regression-testing/SKILL.md
Design regression tests for AI-assisted development by targeting model blind spots such as sandbox versus production path drift, response-shape mismatches, untested bug fixes, and same-model review failures. Use after AI-generated code changes, bug fixes, API edits, or feature-flag/sandbox changes.
npx skillsauth add shipshitdev/library ai-regression-testingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Add tests that catch the failures AI agents commonly miss when the same model writes code and reviews its own assumptions.
Inputs:
Outputs:
Creates/Modifies:
External Side Effects:
Confirmation Required:
Delegates To:
testing-expert for general testing strategyreact-testing-library for React component testsplaywright-e2e-init or e2e-testing for browser workflowsdebug when the root cause is still unknownTest the contract that failed, not the implementation the agent wrote. Assume the reviewing model shares the same blind spot as the writing model.
Common AI blind spots:
SELECT, serializer, DTO, fixture, and frontend type drift apartState the behavior as a user or caller contract:
Create a required-field or required-state list when useful.
Trace every path that should satisfy the contract:
The first test should fail on the unfixed bug or on a representative broken fixture. If the bug is already fixed, make the test specific enough that the previous bug would have failed.
Prefer deterministic checks:
For API and data contracts, compare path shapes:
production fields == sandbox fields == mock fixture fields
frontend type accepts exactly the returned shape
empty/error states still include documented envelope fields
Use fixtures with realistic nulls, missing optional values, and date formats.
Run the narrow test first, then the relevant suite:
bun test path/to/regression.test.ts
bun test
bun run typecheck
Use the repo's actual package manager and test commands. Do not invent new tooling when the project already has a pattern.
200 OK?Regression target: `GET /api/profile` must include `notification_settings` in production and sandbox responses.
Tests added:
- `tests/api/profile.test.ts`: response-shape contract
- `tests/api/profile.test.ts`: sandbox/production field parity
Verification:
- `bun test tests/api/profile.test.ts` passed
- `bun run typecheck` passed
Residual risk:
- No E2E coverage for the settings page rendering this field.
development
TypeScript refactoring and modernization guidelines from a principal specialist perspective. This skill should be used when refactoring, reviewing, or modernizing TypeScript code to ensure type safety, compiler performance, and idiomatic patterns. Triggers on tasks involving TypeScript type architecture, narrowing, generics, error handling, or migration to modern TypeScript features.
tools
Resolves TypeScript and JavaScript problems across type-level programming, performance, monorepo management, migration, and modern tooling. Invoke when diagnosing "type instantiation excessively deep" errors, migrating JS to TS, configuring strict tsconfig, debugging module resolution, or choosing between Biome/ESLint/Turborepo/Nx.
tools
Turborepo monorepo build system guidance. Triggers on: `turbo.json`, task pipelines, `dependsOn`, caching, remote cache, the `turbo` CLI, `--filter`, `--affected`, CI optimization, environment variables, internal packages, monorepo structure, and package boundaries. Use when the user configures tasks or workflows, creates packages, sets up a monorepo, shares code between apps, runs changed packages, debugs cache behavior, or works in an `apps/` plus `packages/` workspace.
tools
Provides Tailwind CSS v4 performance optimization and best practices guidelines. Triggers when writing, reviewing, or refactoring Tailwind CSS v4 code; when working with Tailwind configuration, @theme directive, utility classes, responsive design, dark mode, container queries, or CSS generation optimization.