npx claudepluginhub nwave-ai/nwave --plugin nwThis skill uses the workspace's default tool permissions.
- **Problem**: test name does not reveal business scenario being tested
Detects 15 test antipatterns and code smells in PHP test suites (Logic in Test, Mock Overuse, Fragile Tests, Mystery Guest, etc.) with fix recommendations and refactoring patterns.
Guides L1-L6 progressive refactoring targeting 22 code smells, test smells via atomic transformations and Fowler catalog.
Refactors code safely using TDD workflows: detects code smells, applies SOLID principles and design patterns, optimizes performance while keeping all tests green.
Share bugs, ideas, or general feedback.
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()
# Before: if/else in test
# After:
@pytest.mark.parametrize("input,expected", [...])
def test_behavior(input, expected): ...
Before: UserServiceTests (31 tests)
After: UserAuthTests, UserProfileTests, UserNotificationTests
For production code refactoring techniques and mechanics, load the progressive-refactoring skill.