refine-tests

Installation
SKILL.md

Refine Tests

Audit an existing test suite with fresh eyes and make it strictly more powerful. The goal is not more tests for their own sake — it is tests that would actually fail if the code under them were broken.

Core Principle: The Mutant Question

For every test, ask the Mutant Question — the mutation-testing thought experiment:

If a competent junior developer introduced a subtle but serious bug in the code this test covers — flipped a comparison, dropped a branch, inverted a condition, hardcoded a return value, ignored an argument — would this test fail?

If no assertion would fail, the test is decorative. Coverage tools cannot see this: a test can execute every line and detect nothing. Reaching the code is not the same as checking an observable result that would reveal the defect.

The strongest form of the question: could the function under test be replaced with a constant (return ok: true, return [], a no-op) and the test still pass? Verified checkers, validators, filters, and guards deserve this exact question — a tamper-detection suite where every test asserts ok: true is passed by a checker that unconditionally returns ok: true.

Hard Rules: Strictly More Powerful

Installs
1
GitHub Stars
9
First Seen
Oct 11, 2026