coverage-analysis

Analyzes code coverage reports to identify untested branches and prioritize testing effort.

1|Updated Jul 3, 2026
One-click install
npx skills add https://github.com/Nandansai08/skillz --skill coverage-analysis-nandansai08
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: coverage-analysis
Source: https://github.com/Nandansai08/skillz/tree/main/skills/testing-qa/coverage-analysis
Command: npx skills add https://github.com/Nandansai08/skillz --skill coverage-analysis-nandansai08

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Coverage percentages hide the gaps that matter: a repo at 87% line coverage can have fully untested error paths in billing code. This Skill turns raw coverage reports into a risk-ranked list of what actually needs testing, separating executed code from verified code. ## Core Features & Use Cases - Branch-over-line analysis: Reads branch coverage instead of line coverage so compound conditionals are scored honestly. - Risk-ranked gap review: Prioritizes uncovered error paths in money, auth, and data-writing code over cosmetic gaps. - Mutation spot-checks: Hand-mutates green high-risk code (or uses mutmut, pitest, Stryker) to catch executed-but-unasserted tests. - Diff-based gates: Replaces absolute thresholds with diff coverage on changed lines via diff-cover or Codecov patch status. - Use Case: A PR fails a coverage gate. Instead of padding assertion-light tests, you open the HTML report, find the red except branches in the refund module, delete 300 lines of dead code the report exposed, and add six targeted tests. ## Quick Start Analyze the coverage report for this repository and tell me which untested regions actually matter and what to do about each one.

Frequently Asked Questions about coverage-analysis

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

FAQPage Schema
How do I interpret a code coverage report?▼

Read branch coverage rather than line coverage, then open the HTML report and review red regions ranked by risk: uncovered error paths in money, auth, and data-writing code first, then complex conditionals, then whole uncovered files. The aggregate percentage hides exactly the gaps that matter.

Is 80% code coverage enough for a project?▼

A single percentage cannot answer that. A repo at 85% with untested billing error paths is worse tested than one at 70% with only cosmetic gaps. Set tiered targets instead: 90%+ branch coverage for core domain logic, 60-80% for adapters, best-effort for UI and scripts.

Branch coverage vs line coverage: which should I use?▼

Use branch coverage. One line like `if user.is_admin or order.total > limit` contains four meaningful paths, and line coverage reports 100% when only one path ran. Enable it with pytest --cov --cov-branch, go test -covermode=count, or equivalent settings in Istanbul and JaCoCo.

Why does my test suite pass even when I break the code?▼

Your tests execute code without asserting on its behavior, so mutations survive. Run a mutation spot-check: flip a comparison or remove a guard in high-risk code and rerun the suite. Tools like mutmut, pitest, or Stryker automate this on critical packages.

Should I write tests for all uncovered code?▼

Not before checking whether the code is reachable at all. Use git log and grep for callers; uncovered code is often dead code, and deleting it beats testing it. Only after confirming the code is live should you decide between testing and accepting the gap.