secondsky avatar

Test Quality Analysis

This analyzes your test suite for common problems like overmocking, flaky tests, and weak assertions. It checks whether you're testing behavior instead of implementation details, flags tests with too many mocks (more than 3-4 is a smell), and helps you spot fragile selectors or race conditions. Works with Vitest, pytest, and Playwright. The coverage analysis goes beyond just percentage to look at whether critical paths and error cases are actually tested. Use it during code review or when tests keep breaking for no clear reason. The FIRST principles checklist and anti-pattern examples are genuinely helpful for spotting tests that look fine but won't catch real bugs.

skills.sh installs
469
GitHub stars
248
last updated
Aug 21, 2026

Install

$ npx -y skills add secondsky/claude-skills --skill test-quality-analysis --agent claude-code

Installs into .claude/skills of the current project.

Files

Test Quality Analysis

Expert knowledge for analyzing and improving test quality - detecting test smells, overmocking, insufficient coverage, and testing anti-patterns.

Core Dimensions

  • Correctness: Tests verify the right behavior
  • Reliability: Tests are deterministic, not flaky
  • Maintainability: Tests are easy to understand
  • Performance: Tests run quickly
  • Coverage: Tests cover critical code paths
  • Isolation: Tests don't depend on external state

Test Smells

Overmocking

Problem: Mocking too many dependencies makes tests fragile.

// ❌ BAD: Overmocked
test('calculate total', () => {
  const mockAdd = vi.fn(() => 10)
  const mockMultiply = vi.fn(() => 20)
  // Testing implementation, not behavior
})

// ✅ GOOD: Mock only external dependencies
test('calculate order total', () => {
  const mockPricingAPI = vi.fn(() => ({ tax: 0.1 }))
  const total = calculateTotal(order, mockPricingAPI)
  expect(total).toBe(38)
})

Detection: More than 3-4 mocks, mocking pure functions, complex mock setup.

Fix: Mock only I/O boundaries (APIs, databases, filesystem).

Fragile Tests

Sponsors

Details

Repository
github.com/secondsky/claude-skills
Categories
Testing & QA, Code Review & Quality
First seen
Jun 3, 2026

More from secondsky/claude-skills

All 146
1laurigates avatarpython-testinglaurigates/claude-pluginsPython testing with pytest, coverage, fixtures, and mocking. Use when the user mentions pytest, unit tests, coverage, fixtures, mocking, or writing Python tests463skills.sh installs
2aj-geddes avatarcontinuous-testingaj-geddes/useful-ai-promptsIntegrate automated testing into CI/CD pipelines for continuous quality feedback. Use for continuous testing, CI testing, automated testing pipelines, test orch441skills.sh installs
3incept5 avatareve-web-ui-testing-agent-browserincept5/eve-skillpacksWeb UI testing and browser automation. Use Vercel agent-browser for general apps, or the repo-pinned Playwright wrapper inside Eve Horizon. Use when tasks requi436skills.sh installs
4levnikolaevich avatarln-782-test-runnerlevnikolaevich/claude-code-skillsExecutes all test suites and reports results with coverage. Use when verifying that test infrastructure works after bootstrap.412skills.sh installs
5umbraco avatarumbraco-msw-testingumbraco/umbraco-cms-backoffice-skillsMSW (Mock Service Worker) patterns for testing Umbraco backoffice extensions with mocked APIs379skills.sh installs
6bobmatnyc avatartest-quality-inspectorbobmatnyc/claude-mpm-skillsTest quality inspection framework for reviewing test coverage, identifying gaps, and ensuring comprehensive validation376skills.sh installs