coverage-enforcer

Parse cross-format coverage reports to enforce branch and diff thresholds and gate merges.

3|2|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/robotijn/ctoc --skill coverage-enforcer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coverage-enforcer
Source: https://github.com/robotijn/ctoc/tree/main/skills/testing/coverage-enforcer
Command: npx skills add https://github.com/robotijn/ctoc --skill coverage-enforcer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the risk of low-quality, incomplete test coverage (including line-only metrics, missing branch coverage, and assertion-free tests) slipping into production, which commonly leads to undetected bugs in high-stakes code paths like payment processing, authentication, and data validation.

Core Features & Use Cases

  • Cross-format coverage parsing: Supports 10+ coverage report formats (LCOV, Cobertura, Istanbul JSON, JaCoCo, Go coverage, etc.) across all major programming languages.
  • Multi-metric threshold enforcement: Enforces branch, diff (patch), and critical-path coverage thresholds (not just line coverage) tailored to project type (greenfield, mature, legacy, library, etc.).
  • Merge gating and quality validation: Blocks merges when coverage thresholds are missed, pairs coverage data with mutation testing results to validate test assertion quality, and produces cited evidence for all uncovered critical paths. Use cases include PR review for SaaS products, enforcing test standards for AI-generated code, and auditing legacy codebases for coverage blind spots.

Quick Start

Use the coverage-enforcer skill to analyze your project's latest coverage report, enforce branch and diff coverage thresholds for new code, and generate a merge approval or block decision with specific evidence for any uncovered critical paths.

Frequently Asked Questions about coverage-enforcer

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

FAQPage Schema
How do I enforce branch coverage thresholds to gate merges in a CI/CD pipeline?

Coverage enforcement blocks merges by parsing cross-format coverage reports like LCOV or Cobertura, validating branch and diff coverage thresholds, and generating a merge block decision with cited evidence for uncovered critical code paths.

What is critical path testing and how does it prevent assertion-free tests from passing?

Critical path testing validates essential code paths like payment processing by pairing coverage metrics with mutation testing, preventing assertion-free tests from passing merge gates by ensuring test assertions actually catch injected code mutations.

Can I use coverage enforcement with legacy codebases and multiple coverage report formats?

Yes, coverage enforcement supports legacy codebase audits by parsing over 10 coverage report formats including JaCoCo, Istanbul JSON, and Go coverage across major programming languages to identify coverage blind spots.

Does merge gating work for enforcing test standards on AI-generated code?

Yes, merge gating works for AI-generated code by applying multi-metric threshold enforcement to new diffs, ensuring AI-generated patches meet branch and critical-path coverage requirements before merging into production.

Why should I use mutation testing alongside branch coverage instead of just line coverage?

You should pair mutation testing with branch coverage because line coverage alone misses untested branches and assertion-free tests, while mutation testing validates that existing assertions actually fail when code is mutated, ensuring true test quality.

What are the limitations of using diff coverage thresholds for greenfield versus mature projects?

Diff coverage limitations vary by project type; greenfield projects require strict branch and critical-path enforcement across all code, while mature or legacy projects apply patch coverage thresholds to new changes to avoid blocking merges over historical blind spots.