test-first-change

Reduce regressions by discovering tests, running them, then editing code

⭐5stars🔀1forks📁View on GitHub🕐Updated Jan 11, 2026

When & Why to Use This Skill

The Test-First Change skill automates a rigorous Test-Driven Development (TDD) workflow for Claude, ensuring code integrity by discovering and executing tests before any modifications are made. By establishing a baseline and verifying changes post-implementation, it effectively eliminates regressions and maintains high software quality standards.

Use Cases

  • Safe Refactoring: Use the skill to modify legacy codebases with confidence by automatically verifying that existing functionality remains intact throughout the refactoring process.
  • Regression Prevention: Ensure that new feature additions or bug fixes do not inadvertently break existing modules by enforcing a strict 'test-before-edit' protocol.
  • Automated Quality Gates: Integrate into development workflows to maintain high code coverage and stability, requiring successful test execution as a prerequisite for any AI-driven code updates.
nametest-first-change
descriptionReduce regressions by discovering tests, running them, then editing code
version1.0.0
tags[testing, tdd, quality, regression]

Test-First Change Skill

Purpose

Ensure code changes don't introduce regressions by forcing test discovery and execution before modifications.

Process

  1. Discover existing tests for target code
  2. Run tests to establish baseline
  3. Make code changes
  4. Re-run tests to verify
  5. Log changes to memory

Scripts

  • run_tests.sh: Execute test suite with coverage
  • diff_summary.py: Generate change summary for memory

Safety

  • Never edit code before running tests
  • Quarantine flaky tests
  • Require 80%+ coverage on changes

Test-First Change v1.0.0