test-quality

Audit and refactor existing test suites to improve readability and reduce brittleness.

2|Updated Jul 11, 2024
One-click install
npx skills add https://github.com/nicograef/handbook --skill test-quality-nicograef
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-quality
Source: https://github.com/nicograef/handbook/tree/main/.claude/skills/test-quality
Command: npx skills add https://github.com/nicograef/handbook --skill test-quality-nicograef

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses noisy, brittle, or bloated test suites by identifying anti-patterns and guiding the systematic removal or refactoring of low-value tests.

Core Features & Use Cases

  • Test Audit: Evaluates test files against established anti-patterns like testing internal implementation details or redundant happy-path scenarios.
  • Refactoring Workflow: Provides a structured, step-by-step process to merge, refactor, or delete tests while ensuring coverage is maintained through public interfaces.
  • Use Case: Use this when your test suite has grown too slow or fragile, and you need to clean up tests that verify HOW code works rather than WHAT it does.

Quick Start

Invoke the test-quality skill to audit the test suite in the current directory and generate a summary report of recommended changes.

Frequently Asked Questions about test-quality

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor a brittle test suite to improve reliability?

To refactor a brittle test suite, audit existing tests against anti-patterns like testing internal implementation details, then systematically merge, refactor, or delete low-value tests while maintaining coverage through public interfaces.

What are common test suite anti-patterns that cause test bloat?

Common test suite anti-patterns include testing internal implementation details rather than public behavior, and maintaining redundant happy-path scenarios, both of which cause noisy, bloated, and fragile test suites.

How do I clean up tests that verify implementation details instead of behavior?

Clean up implementation-focused tests by applying a structured refactoring workflow that shifts verification to public interfaces, ensuring tests validate what the code does rather than how it works internally.

Can I audit my test suite for redundant happy-path scenarios automatically?

Yes, you can audit your test suite by invoking an automated review process that evaluates test files against established anti-patterns, generating a summary report of recommended changes to remove redundant scenarios.

What is the best way to maintain code coverage when deleting low-value unit tests?

The best way to maintain coverage when deleting low-value unit tests is to enforce public-interface testing, ensuring that behavioral verification is shifted from internal mechanics to outward-facing code contracts.

When should I not use a test suite refactoring workflow?

Avoid a test suite refactoring workflow if your project lacks established public interfaces or requires strict verification of internal implementation details, as the process focuses on behavioral verification and public-facing contracts.