test-coverage-gate

Enforce minimum test coverage thresholds before shipping code.

31|3|Updated Dec 12, 2025
One-click install
npx skills add https://github.com/JeremyDev87/codingbuddy --skill test-coverage-gate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-coverage-gate
Source: https://github.com/JeremyDev87/codingbuddy/tree/main/packages/rules/.ai-rules/skills/test-coverage-gate
Command: npx skills add https://github.com/JeremyDev87/codingbuddy --skill test-coverage-gate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Use before shipping, creating PRs, or merging to enforce minimum test coverage thresholds. Covers line, branch, and function coverage. Supports vitest, jest, c8, and istanbul. Blocks shipping when coverage falls below configurable thresholds (default 80%).

Core Features & Use Cases

  • Auto-detects coverage tool and runs the appropriate coverage analysis.
  • Enforces configurable thresholds for lines, branches, and functions with sensible defaults.
  • Blocks shipping workflows (PR creation, merges, or releases) when coverage criteria are not met.

Quick Start

Run the coverage gate to verify your project's test coverage against configured thresholds.

Frequently Asked Questions about test-coverage-gate

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

FAQPage Schema
How do I enforce minimum test coverage thresholds before merging a pull request?

Enforce minimum test coverage thresholds before shipping by running a coverage gate on PRs, merges, and releases. The gate blocks shipping workflows when line, branch, or function coverage falls below configured thresholds.

Can I use test coverage gates with both Vitest and Jest?

Yes, test coverage gates work with Vitest, Jest, c8, and Istanbul. The gate auto-detects the active coverage tool in your project and runs the appropriate coverage analysis to evaluate against configured thresholds.

What is a coverage gate and how does it prevent shipping untested code?

A coverage gate is a pre-ship check that enforces minimum test coverage thresholds before code is shipped. It blocks PR creation, merges, or releases when line, branch, or function coverage drops below the configured limits.

How do I configure test coverage thresholds for lines, branches, and functions?

Configure test coverage thresholds by setting custom values for lines, branches, and functions. The coverage gate applies sensible default values, such as an 80% minimum, and blocks shipping when code coverage falls below your defined thresholds.

Why should I block releases when test coverage falls below a certain percentage?

Blocking releases when test coverage falls below a certain percentage prevents untested code from reaching production. The coverage gate enforces minimum thresholds across lines, branches, and functions to maintain quality assurance before shipping.

What are the limitations of using a coverage gate for quality assurance?

Coverage gates enforce minimum thresholds for lines, branches, and functions but do not validate test logic or assert application behavior. They block shipping workflows based on coverage metrics alone, requiring existing test suites to generate the coverage data.