Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Detailed refactoring mechanics with step-by-step procedures, and test code smell catalog with detection patterns and before/after examples
.claude/skills/nwave-ai-nw-test-refactoring-catalog/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 7% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 28% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 10% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 18% | 0% |
| case-17 | ✗→✓ | ▲ Improved | -5% | 0% |
Before: public void Test1() { /* ... */ }
After: public void ProcessOrder_PremiumCustomer_AppliesCorrectDiscount() { /* ... */ }Before: Assert.Equal(850, result.Total); // What discount?
After: const decimal EXPECTED_TOTAL = 1000 * (1 - 0.15m);
Assert.Equal(EXPECTED_TOTAL, result.Total);Before: ProcessOrderTest() { /* tests discount AND shipping AND tax */ }
After: ProcessOrder_AppliesDiscount()
ProcessOrder_CalculatesShipping()
ProcessOrder_CalculatesTax()Prefer parameterized tests for variations of the same behavior.
Extract: CreatePremiumCustomer(), CreateHighValueOrder()python# Before: if/else in test # After: @pytest.mark.parametrize("input,expected", [...]) def test_behavior(input, expected): ...
Before: UserServiceTests (31 tests)
After: UserAuthTests, UserProfileTests, UserNotificationTestsFor production code refactoring techniques and mechanics, load the progressive-refactoring skill.
Other measured skills in the registry, with their headline benchmark lift.