cover

Measures test coverage and adds tests for low-coverage code paths.

17|1|Updated Dec 29, 2019
One-click install
npx skills add https://github.com/LumaKernel/dotfiles --skill cover-lumakernel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cover
Source: https://github.com/LumaKernel/dotfiles/tree/main/common/claude/skills/cover
Command: npx skills add https://github.com/LumaKernel/dotfiles --skill cover-lumakernel

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Projects often lack visibility into which code paths are untested, and manually identifying coverage gaps and writing meaningful tests is time-consuming. This Skill automates coverage measurement, gap analysis, and targeted test authoring. ## Core Features & Use Cases - Multi-language coverage measurement: Runs coverage commands for TypeScript/JavaScript (Jest, Vitest), Python (pytest), Go, and Rust (cargo llvm-cov), preferring lcov format output. - Prioritized gap analysis: Parses lcov reports to identify the lowest-coverage files, functions, and uncovered branches such as error handling and edge cases. - Behavior-focused test authoring: Adds tests following existing project patterns, prioritizing edge cases and user-perspective test documentation rather than meaningless coverage-padding tests. - Use Case: After adding a new feature, run this Skill to measure coverage, find that your error-handling branches in a core module are at 0%, and automatically add tests until the target coverage threshold is met. ## Quick Start Measure the test coverage of this project and add tests to the lowest-coverage files until coverage reaches 80%.

Frequently Asked Questions about cover

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

FAQPage Schema
How do I measure test coverage and find untested code?▼

Run your framework's coverage command, such as npx jest --coverage or pytest --cov, then parse the lcov report to find files and functions with the lowest hit rates. Prioritize business logic and branch-heavy functions first.

How to generate lcov coverage reports for Jest or Vitest?▼

For Jest, run npx jest --coverage --coverageReporters=lcov. For Vitest, run npx vitest run --coverage --coverage.reporter=lcov. Both write an lcov.info file with line-level hit counts that is easy to parse.

Does this coverage workflow support Python, Go, and Rust?▼

Yes. Python uses pytest --cov with lcov output, Go uses go test -coverprofile with go tool cover, and Rust uses cargo llvm-cov with lcov export. Each produces reports suitable for gap analysis.

What makes a good test when improving code coverage?▼

Good tests verify actual behavior rather than padding coverage numbers. Follow existing test patterns, prioritize edge cases like boundary values and error paths, minimize mocks, and document scenarios from the user's perspective.

When should I not add tests just to raise coverage?▼

Avoid writing meaningless tests that execute code without asserting behavior. Coverage is a means to confidence, not a goal itself; focus on uncovered branches and error handling where bugs are most likely to hide.