/code-quality-plugin:code-test-quality path to test directory or specific test filefrom code-quality-plugin
Analyzes test suites for quality issues: empty assertions, flaky patterns, coverage gaps, and test smells. Use when tests are unreliable or after major refactors.
Ships in code-quality-plugin. 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.
Analyze test suite for quality issues and reliability.
| Use this skill when... | Use something else when... |
|---|---|
| Test suite passes but bugs still ship | Setting up test framework → /configure:tests |
| Coverage numbers are high but quality feels low | Setting up coverage thresholds → /configure:coverage |
| Tests are flaky or timing-dependent | Looking for code anti-patterns → /code:antipatterns |
| After major refactor, need test health check | Running tests → /test:run |
find . -type f \( -name "*.test.*" -o -name "*.spec.*" -o -name "test_*.py" -o -name "*_test.py" -o -name "*_test.go" -o -name "*_test.rs" \) -not -path "*/node_modules/*"find . -maxdepth 2 \( -name "vitest.config.*" -o -name "jest.config.*" -o -name "pytest.ini" -o -name "pyproject.toml" -o -name "conftest.py" \) -type f$1: Path to analyze (defaults to current directory)--focus: Analysis focus — smells (default), coverage, flaky, or allExecute this test quality analysis:
Scan the target path for test files. Categorize by:
Scan test files for these anti-patterns:
Empty tests (Critical):
expect() or assert never calledWeak assertions (High):
expect(result).toBeTruthy() on objects (always passes)assert result without specific value checksassertEqual(len(result), len(result)) (tautologies)Test duplication (Medium):
Missing edge cases (Medium):
Flaky patterns (High):
setTimeout / sleep in testsOverly broad mocks (Medium):
If coverage data is available:
Print categorized results:
Test Quality Report
===================
Test files: N
Test-to-source ratio: N:1
Smells Found:
Critical: N (empty tests, no assertions)
High: N (weak assertions, flaky patterns)
Medium: N (duplication, missing edge cases)
Low: N (style issues)
Top Issues:
1. [file:line] Empty test - "should handle X" has no assertions
2. [file:line] Flaky - uses setTimeout(500) instead of async await
3. [file:line] Weak assertion - toBeTruthy on object (always passes)
Recommendations:
- Add assertions to N empty tests
- Replace N setTimeout calls with proper async patterns
- Add error path tests for N untested handlers
For each finding, provide specific fix guidance:
/configure:tests/configure:coverage| Context | Command |
|---|---|
| Find empty tests (JS) | grep -rn "it|test" --include="*.test.*" -l then check for assertions |
| Find sleeps in tests | grep -rn "setTimeout|sleep|time.sleep" --include="*.test.*" |
| Coverage report (Vitest) | npx vitest run --coverage --reporter=json |
| Coverage report (pytest) | pytest --cov --cov-report=json |
| Quick smell scan | Grep for assertion-free test bodies |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
test-quality, test-smells, flaky-tests, coverage-gaps, test-reliability
npx claudepluginhub laurigates/claude-plugins --plugin code-quality-plugin19 skills in this plugin
/ast-grep-searchFind and replace code patterns structurally with ast-grep. Use when matching code by AST structure, finding functions with specific signatures, or detecting anti-patterns regex cannot match./bulk-sweep-classifyClassify every regex match before a bulk find-replace/syntax-modernization sweep — four match categories, scoped transform, allowlist-aware verification. Use when bulk-renaming commands/tools/paths or migrating syntax across many files./code-antipatternsAnalyze a codebase for anti-patterns using ast-grep. Use when finding magic numbers, console.logs, var usage, excessive any, eval/innerHTML security issues, or deep nesting.Other plugins' skills for the same job