test-lens
Installation
SKILL.md
Test Lens: Valuable Unit Testing
Khorikov's framework (Unit Testing: Principles, Practices, and Patterns) for one question: is this test worth its maintenance cost, and does it test the right thing the right way? A suite exists for sustainable growth: adding features and refactoring without fear. Test code is a liability, so a few valuable tests beat many mediocre ones. Set a high bar and delete what falls below it.
The four pillars
Score each test 0–1 on the four pillars. Its value is their product, so a zero on any pillar makes the test worthless.
- Regression protection: how much code it exercises, weighted by complexity and domain significance.
- Resistance to refactoring: how few false positives it raises when behavior is intact. This one is non-negotiable.
- Fast feedback: how quickly it runs.
- Maintainability: how easy it is to read and to run.
The first three trade against each other. Resistance must stay high, so the real trade is protection ⇄ speed. Each failure mode zeroes one pillar: