test-coverage
Generate comprehensive test coverage reports when reviewing code. Identifies untested code paths and low-coverage areas. Supports Python (pytest-cov), JavaScript (jest), Go (go test -cover), Java (JaCoCo). Use when reviewing tests or before approving code changes.
Security Assessment
About test-coverage
The test-coverage skill generates comprehensive test coverage reports for code, helping developers and tech leads assess the quality of tests before approving code changes or merging to the main branch. By running appropriate coverage tools based on the project’s language, this skill identifies untested paths and areas with low test coverage, which can be crucial for maintaining software quality. It supports multiple programming languages including Python (pytest-cov), JavaScript (jest), Go (go test -cover), and Java (JaCoCo), making it versatile for various tech stacks. This skill streamlines the review process by automating coverage analysis and providing detailed reports that help in decision-making regarding test completeness and code quality.
FAQ
When should I invoke the test-coverage skill?
Invoke this skill when reviewing test files, before approving pull requests, when a developer claims to have added tests, before merging code to the main branch, or to check if the coverage meets project standards.
What happens if no tests are found in the project?
If no tests are found, the skill will return a message stating 'No tests found in project. Cannot generate coverage report.'
Does the skill work on all operating systems?
Yes, the skill supports both Unix/macOS (using bash) and Windows (using PowerShell) environments. The appropriate script will be executed depending on the detected operating system.
What happens if the coverage tool is not installed?
The skill will attempt to auto-install the required coverage tool (e.g., pytest-cov, jest). If installation fails, it will fall back gracefully and provide a partial report with an error note.
Is there a limitation on the type of reports generated?
The skill focuses on line coverage as the primary metric, excluding test files, generated code, and configuration files from the coverage report.
Install test-coverage
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
mehdic/bazinga