Claude Code code-test-quality skill: Find weak test assertions
Review tests for missing assertions, overly broad checks, flaky timing, and uncovered behavior. The skill reports concrete findings tied to the test files.
中文Install in Claude Code
Use local Claude Code in a shell with find available. Source inspection works on test files alone. Running the suite requires the project's test tooling.
- Download the repository snapshot at the linked commit. Copy the entire code-quality-plugin/skills/code-test-quality/ directory into .claude/skills/code-test-quality/ in your practice project.
- Confirm that SKILL.md is directly inside .claude/skills/code-test-quality/. Open Claude Code from the project root and enter /code-test-quality tests --focus smells.
Example task
In tests/cart.test.ts, write a test that checks total([3, 5]) only with toBeTruthy(). Run /code-test-quality tests --focus smells and ask which assertion should change.What to check
The report points to the truthiness assertion and recommends checking that the returned total is exactly 8.
Original SKILL.md on GitHub · Updated
Frequently asked question
Why use this skill if the test suite already passes?
A passing suite only confirms that its current assertions passed. This review checks whether those assertions would detect wrong results and missed edge cases.