/polymath-qa:test-smellfrom polymath-qa
Detect test smells/anti-patterns — over-mocking, fragile assertions, slow setup, flaky timing; flag each with its layer and a refactor. Reviews existing tests, not authoring them (unit-tests).
Ships in polymath-qa. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Read an existing test suite the way a reviewer would — find the tests that will rot, mislead, or flake, and say how to fix each.
Mode: analytical — judgment inside a fixed frame. Keep the output shape; every verdict cites its evidence; unknowns are marked [TBD] or [VERIFY], never filled in.
polymath-qa:test-smell.This scans existing tests. It does not write tests (polymath-qa:unit-tests), find untested behavior (polymath-qa:coverage-gap), or judge assertion strength specifically (polymath-qa:assertion-quality).
sleep, wall-clock, ordering, shared mutable state across tests.Findings ranked by blast radius (flake-causing > brittle > slow > cosmetic), then file order:
Test smells: tests/ (38 tests, 5 findings)
1. FLAKY TIMING tests/test_worker.py::test_job_retries (line 22: time.sleep(2))
layer: unit (correct)
fix: inject a fake clock; assert on the scheduled retry time, not wall time
2. INTERDEPENDENCE tests/test_cart.py::test_checkout (reads the cart created by test_add_item)
fix: create the cart in this test's own fixture
3. OVER-MOCKING tests/test_refunds.py::test_refund (mocks RefundRepository, an internal collaborator)
layer: should be integration (real repository on a test DB)
fix: replace the mock with the repository on testcontainers postgres
4. FRAGILE tests/test_report.py::test_render (asserts the whole 2 KB HTML string)
fix: assert the three totals and the title only
5. SLOW SETUP tests/conftest.py::db (migrates a fresh DB per test, ~1.4 s each)
fix: session-scoped migration + per-test transaction rollback
No smell: 33 tests.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mohammadbafkar/polymath --plugin polymath-qa6 skills in this plugin
/assertion-qualityReview test assertions — assert behavior not implementation; kill snapshot/tautological checks; one reason-to-fail per test; improves existing tests, not authoring them (unit-tests)./coverage-gapReview a diff for missing test coverage; pairs every changed behavior with an existing test or a flagged gap plus a recommended layer; finds gaps, not authoring (unit-tests)./integration-contractDesign integration/contract tests for a service boundary — consumer-driven contracts, stub-vs-hit, fixtures, failure modes. Boundary tests, not unit tests (unit-tests) or the plan (test-strategy).Other plugins' skills for the same job