Skip to content
secondsky avatar

Test Quality Analysis

Practical review guide that flags test smells such as overmocking, fragile selectors, flaky async code, and weak assertions.

CCM score
50 of 100
skills.sh installs
480
GitHub stars
257
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the main test quality dimensions: correctness, reliability, maintainability, performance, coverage, and isolation
  • Includes before-and-after examples for overmocking, fragile tests, flaky tests, poor assertions, and implementation-detail testing
  • Sets concrete limits such as 3 to 4 mocks per test and 80% line coverage for business logic, with 100% for auth and payment paths
  • Provides code review checklists and coverage commands for Vitest (bun test --coverage) and pytest-cov (uv run pytest --cov)

Install

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

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

Details

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

Questions

What does the test-quality-analysis skill do?

It detects test smells, overmocking, flaky tests and coverage issues in your test suite. It also analyzes test effectiveness, maintainability and reliability when you review tests or work on improving test quality.

How do I install the test-quality-analysis skill?

Run npx -y skills add secondsky/claude-skills --skill test-quality-analysis -y in your project. Once installed, the agent can review your tests for smells such as overmocking and fragile selectors, and suggest fixes.

Where does test-quality-analysis stand in the Testing & QA category?

It sits in the Testing & QA category on Claude Marketplaces, alongside tdd, migrate-to-shoehorn, test-driven-development, webapp-testing and break-ui. It focuses on judging the quality of existing tests rather than writing new ones.

Which kinds of test problems does this skill flag?

The skill flags overmocking where too many dependencies are mocked, fragile tests that depend on implementation details, and flaky tests with race conditions. It also points out weak assertions and missing coverage of error paths and boundary conditions.

More from secondsky/claude-skills

All 116

Similar to Test Quality Analysis

More Testing & QA