/test-coverage-intelligence:test-coverage-intelligencefrom Test Coverage Intelligence: Risk-Ranked Coverage Gaps
Ranks untested code by risk using coverage reports and git churn data. Helps write tests that matter instead of chasing coverage percentages.
Ships in Test Coverage Intelligence: Risk-Ranked Coverage Gaps. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Scripts: ${CLAUDE_SKILL_DIR} is the folder that contains this file. If your agent does not define it, use the folder where this SKILL.md is located.
Find the untested code that matters most and write tests for it, instead of chasing a coverage percentage.
Use the project's existing test command with coverage. Common ones:
| Stack | Command | Report |
|---|---|---|
| Jest | npx jest --coverage --coverageReporters=lcov | coverage/lcov.info |
| Vitest | npx vitest run --coverage --coverage.reporter=lcov | coverage/lcov.info |
| Node test runner | node --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info | lcov.info |
| pytest | pytest --cov --cov-branch --cov-report=xml | coverage.xml |
| Go | go test ./... -coverprofile=cover.out | cover.out |
| JVM | JaCoCo report task | build/reports/jacoco/test/jacocoTestReport.xml |
| .NET | dotnet test --collect:"XPlat Code Coverage" | coverage.cobertura.xml |
npx here runs the project's own installed binaries. If the coverage provider is missing (@vitest/coverage-v8, pytest-cov), ask before installing it.
git log --since="90 days ago" --name-only --format= > /tmp/churn.txt
python3 ${CLAUDE_SKILL_DIR}/scripts/coverage_gaps.py coverage/lcov.info --churn /tmp/churn.txt
It prints total line and branch coverage, then files ranked by risk: uncovered lines weighted by how often the file changed. It also lists files with no coverage at all, and often-changed source files that are missing from the report entirely (no test imports them). Test files, mocks, stories and migrations are excluded.
Then look at one file in detail:
python3 ${CLAUDE_SKILL_DIR}/scripts/coverage_gaps.py coverage/lcov.info --file src/billing/charge.ts
It prints the uncovered line ranges and the functions no test calls.
Rank by consequence, not by line count. Look first at code that handles money, auth and permissions, data deletion or migration, input validation and parsing, error handling paths (catch, fallback branches), and date, time zone and rounding logic. Skip generated code, trivial getters, and framework glue that integration tests already cover.
When a test reveals a bug, stop and report it instead of writing the test to match the wrong behaviour.
Coverage shows which lines ran, not whether tests would catch a bug. If the project uses or wants mutation testing, use the standard tool for the stack (StrykerJS, mutmut, cosmic-ray, PIT, go-mutesting) on the critical files only, since full runs are slow. Surviving mutants show assertions that are missing. Ask before installing a mutation tool.
python3 ${CLAUDE_SKILL_DIR}/scripts/coverage_gaps.py coverage/lcov.info --save .coverage-snapshot.json
python3 ${CLAUDE_SKILL_DIR}/scripts/coverage_gaps.py coverage/lcov.info --compare .coverage-snapshot.json
--compare shows the total change and the files whose coverage dropped by more than 2 points.
List the top risks with file, coverage, changes and why they matter, the tests written for each, and the coverage before and after.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
coverage-gaps, mutation-testing, test-prioritization, lcov, cobertura
npx claudepluginhub petrovicistefan/claude-code-plugins --plugin test-coverage-intelligenceOther plugins' skills for the same job