Build Refactoring Test Suite
Build a sufficient automated test suite before refactoring existing code by applying a 6-step sequential construction workflow (test class → fixture → normal behavior → boundary conditions → expected errors → green-suite gate) and a bug-fix variant (write failing test first → reproduce → fix → verify green). Use this skill when you are about to refactor a class or module that lacks tests, when a bug report arrives and you need to pin it down before fixing it, when you want to establish the compile-and-test gate that makes every subsequent refactoring step safe to revert, or when you need to assess whether an existing test suite is adequate to protect a planned refactoring.
Install
1. Add marketplace
› /plugin marketplace add bookforge-ai/bookforge-skills
2. Install plugin
› /plugin install refactoring@bookforge-skills
3. Use the skill
› /build-refactoring-test-suite
CC-BY-SA · Open sourceGitHub
What You'll Need
ReadWriteBash
Source Book

Refactoring: Improving the Design of Existing Code
Martin Fowler
View on ClawhHub