Audits and refactors existing test files for quality — removes brittle assertions, fixes implementation coupling (mocking internals), improves test names, eliminates duplication, and enforces behavior-over-implementation testing. Does NOT write new tests (use /tdd for that). Use when asked to "clean up the tests", "improve test quality", "fix brittle tests", "refactor the test suite", "tests keep breaking on refactor", "tests are a mess", or "make the tests better".
Installation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Audits and refactors existing test files for quality — removes brittle assertions, fixes implementation coupling (mocking internals), improves test names, eliminates duplication, and enforces behavior-over-implementation testing. Does NOT write new tests (use /tdd for that). Use when asked to "clean up the tests", "improve test quality", "fix brittle tests", "refactor the test suite", "tests keep breaking on refactor", "tests are a mess", or "make the tests better".
clean-tests
Audits and refactors existing tests without removing coverage.
What Gets Fixed
Issue
Symptom
Fix
Implementation coupling
Mocking internal modules, testing private methods, asserting on internal state