test-gaps

Detect missing test coverage and generate test suggestions for untested code.

70.1k|8.4k|Updated Jun 2, 2025
One-click install
npx skills add https://github.com/ruvnet/claude-flow --skill test-gaps
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-gaps
Source: https://github.com/ruvnet/claude-flow/tree/main/plugins/ruflo-testgen/skills/test-gaps
Command: npx skills add https://github.com/ruvnet/claude-flow --skill test-gaps

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @claude-flow/cli.

What problem does it solve?

It identifies gaps in test coverage so developers know which parts of the codebase lack tests and what tests to write next, especially after adding new features.

Core Features & Use Cases

  • Coverage Gap Detection: Run CLI commands to list untested code paths in a formatted table with configurable limits.
  • Test Suggestions: Generate targeted test recommendations for a specific path or task, such as routing coverage work for a new feature.
  • Worker Dispatch: Trigger the testgaps worker via MCP for automated analysis, or run continuous detection with the loop-worker skill.
  • Use Case: After shipping an authentication feature, run the coverage-gap report to see which modules still lack tests and get suggestions for what to write next.

Quick Start

Ask the assistant to find test coverage gaps in the src directory and suggest which tests to write next.

Frequently Asked Questions about test-gaps

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

FAQPage Schema
How do I find test coverage gaps in my codebase?

Run the coverage-gaps hook via the claude-flow CLI with a table format and result limit to list untested code paths. You can also scope suggestions to a specific directory using the coverage-suggest command with a path argument.

How to get test suggestions after adding a new feature?

Use the coverage-route command with a task description, such as "add auth tests", to route coverage work for the new feature. The coverage-suggest command can also target the feature's source path directly.

Can I run coverage gap detection continuously?

Yes, continuous detection is supported by combining the /loop command with the loop-worker skill targeting the testgaps worker. This repeatedly checks for new coverage gaps as code changes.

Does test gap detection require the claude-flow CLI?

Yes, the detection commands run through npx @claude-flow/cli hooks. Alternatively, the testgaps worker can be dispatched through the ruflo MCP server without invoking the CLI directly.

What are the limitations of automated coverage gap analysis?

Coverage gap detection identifies untested code paths but does not write or execute the tests itself. Suggestions still require developer review to ensure they match intended behavior and edge cases.