add-regression-test

Generate regression tests that fail pre-fix and pass post-fix.

121|2|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/AgentSystemLabs/core --skill add-regression-test-agentsystemlabs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-regression-test
Source: https://github.com/AgentSystemLabs/core/tree/main/plugins/agentsystem-core/skills/add-regression-test
Command: npx skills add https://github.com/AgentSystemLabs/core --skill add-regression-test-agentsystemlabs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents fixed bugs from silently returning by generating a regression test that fails on the pre-fix code path and passes on the post-fix behavior.

Core Features & Use Cases

  • Two-state verification: Reproduces the failing behavior before the fix, then restores the fix and confirms the test is green.
  • Pre-fix failure gate: Forces the agent to prove the test would have failed previously using git stashing, reverts, or temporary worktrees.
  • User-relevant test assertions: Ensures the test asserts externally observable outcomes (responses, DB state, emitted events, rendered DOM) rather than internal implementation details.

Use Case

After you merge a bug fix (or you’ve staged it for review), use this Skill to add a regression test that captures the symptom and verifies it against both the pre-fix and post-fix code states.

Quick Start

Ask the agent to add a regression test for your recent bug fix, using the fix’s git state to verify the test fails before the change and passes after it.

Frequently Asked Questions about add-regression-test

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

FAQPage Schema
How do I add a regression test that proves a bug fix actually works?

A regression test verifies a bug fix by forcing a failing pre-fix run and a passing post-fix run. It reproduces the failing behavior using git stashing or reverts, then restores the fix and confirms the test passes against the corrected behavior.

What is two-state verification for regression testing?

Two-state verification reproduces the failing behavior before the fix, then restores the fix and confirms the test passes. It uses git stashing, reverts, or temporary worktrees to prove the test would have failed on the pre-fix code path.

How do I write regression tests for staged or committed git changes?

Regression tests can be generated for staged, committed, or working-tree bug fixes. The process uses the fix's git state to verify the test fails before the change and passes after it across common test harnesses and project conventions.

Do I need a specific test runner to generate regression tests?

No specific test runner is required. The process selects a compatible test runner based on your project conventions, such as colocated test files or test folders, to wire the test with symptom-based naming.

What should regression test assertions target to prevent bugs from returning?

Regression test assertions should target externally observable outcomes like responses, DB state, emitted events, or rendered DOM. This prevents tests from breaking on internal implementation details and ensures they capture the actual bug symptom.

Why does my regression test pass both before and after the code fix?

If a regression test passes before the fix, it likely asserts internal implementation details rather than the bug symptom. The test must reproduce the failure deterministically by targeting externally observable outcomes to force a pre-fix failure.