
coverage
Check test coverage for unstaged changes. Use when user asks to "check coverage", "/coverage", or wants to see which unstaged changes lack test coverage. Don't use for projects without lcov coverage output, running the full test suite without coverage, or checking coverage of already-committed changes.
- Installs
- 41
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/helderberto/agent-skills --skill coverage- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads coverage automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Coverage Check
Context
Run in parallel:
git diff --name-only- get unstaged filesgit diff -U0 --no-color- get changed line numbers
Commands
Sequential:
npm run test:ci- vitest with coveragenpm run coverage:report- generate lcov/text reports
Workflow
- Get unstaged files and line ranges (parallel):
git diff --name-onlygit diff -U0 --no-color
- Run coverage:
npm run test:cinpm run coverage:report
- Save diff to a temp file, then run:
git diff -U0 --no-color > /tmp/changes.diff python3 scripts/parse-lcov.py --lcov coverage/lcov.info --diff /tmp/changes.diff - Report uncovered lines from stdout:
file.ts:42 - Summary from stderr: X/Y changed lines covered
LCOV Format
Parse coverage/lcov.info:
SF:src/utils/helper.ts
DA:10,1 # line 10, covered (hit 1 time)
DA:11,0 # line 11, NOT covered
DA:12,5 # line 12, covered (hit 5 times)
end_of_record
Key fields:
SF:-- source file pathDA:line,hits--0= uncovered,>0= coveredend_of_record-- end of file section
Match SF: paths to git diff files. For each changed line, check DA: entry. If hits is 0, report as uncovered.
Anti-Rationalization
| Excuse | Rebuttal |
|---|---|
| "Coverage doesn't guarantee quality" | True, but uncovered code guarantees zero automated verification. |
| "It's just a config change" | Config changes break production too. If there's logic, check coverage. |
| "100% is overkill" | Nobody asked for 100%. Check that changed lines are covered. |
| "The test suite is already green" | Green suite with uncovered changes = false confidence. |
Rules
- Only analyze unstaged changes (
git diff) - Use sequential commands:
test:cithencoverage:report - Use
scripts/parse-lcov.pyto parse lcov data and map to changed lines - Report uncovered lines:
file.ts:42 - Ignore files without coverage data (non-code files)
Error Handling
npm run test:cifails -- report test failures and stopcoverage/lcov.infonot found -- verifycoverage.reporterincludeslcovin test runner configgit diffreturns no changes -- report no unstaged changes to check
FAQ
What does the coverage skill do?
Check test coverage for unstaged changes. Use when user asks to "check coverage", "/coverage", or wants to see which unstaged changes lack test coverage. Don't use for projects without lcov coverage output, running the full test suite without coverage, or checking coverage of already-committed changes.
How do I install coverage?
Run npx skills add https://github.com/helderberto/agent-skills --skill coverage in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/coverage/ (personal) or .claude/skills/coverage/ (project).
Which AI agents can use coverage?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is coverage safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains coverage?
It is published by helderberto in helderberto/agent-skills. It has 41 recorded installs.
More from helderberto/agent-skills
code-review
helderberto/agent-skills
Correctness lens for a PR or diff, used by build and review — bugs, security, performance, and code quality. Use when asked to review a PR or give pull request feedback, even when the diff is pasted inline. Don't use for local uncommitted changes, creating PRs, or merging.
explain-code
helderberto/agent-skills
Explains code with visual diagrams and analogies. Use when explaining how code works, walking through a codebase area, or when the user asks "how does this work?" Don't use for modifying code, fixing bugs, generating new implementations, or multi-session concept learning (use /teach).
commit
helderberto/agent-skills
Group unstaged changes into atomic commits by concern, matching repository style. Use when asked to "commit", "create a commit", or "commit changes". Don't use for pushing or pull requests (/to-pr).
lint
helderberto/agent-skills
Open the skill to read its SKILL.md instructions.
refactor-plan
helderberto/agent-skills
Open the skill to read its SKILL.md instructions.
Popular testing & qa skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
grilling
mattpocock/skills
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
migrate-to-shoehorn
mattpocock/skills
Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.
run-train
lllllllama/rigorpilot-skills
Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.
test-driven-development
obra/superpowers
Use when implementing any feature or bugfix, before writing implementation code
finishing-a-development-branch
obra/superpowers
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work