analyze-test-coverage

Analyzes code diffs to report introduced tests, change coverage, and uncovered code.

11|1|Updated Jul 25, 2025
Ready to run
npx skills add https://github.com/tomzx/agents --skill analyze-test-coverage-tomzx
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: analyze-test-coverage
Source: https://github.com/tomzx/agents/tree/main/skills/analyze-test-coverage
Command: npx skills add https://github.com/tomzx/agents --skill analyze-test-coverage-tomzx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code changes merged without corresponding tests create silent regression risks that surface only after future refactors break behavior. This Skill inspects a diff or worktree and produces a structured report showing exactly which behavior changes lack test coverage. ## Core Features & Use Cases - Three-Part Coverage Report: Produces tables for introduced tests, change coverage (is each behavior change tested?), and uncovered code (is any code reached by tests at all?). - Severity-Ranked Findings: Flags uncovered changes as MUST, SHOULD, or MAY findings based on risk to public APIs, error paths, and business logic. - PR Review Integration: Runs standalone via review-pr-full with commit-marker tracking and optional GitHub PR comment posting, or embeds results into review-pr, verify-pr, and review-implementation reports. - Use Case: Before merging a pull request, run the analysis on the branch diff to discover that five behavior changes were made but no tests were added, then list each gap with its regression risk. ## Quick Start Ask the agent to analyze test coverage for the current branch against main using the diff ref origin/main..HEAD.

Frequently Asked Questions about analyze-test-coverage

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

FAQPage Schema
How do I check if my code changes have test coverage?▼

Run the analysis on a diff ref such as origin/main..HEAD in your repository. It separates test files from source files, maps each behavior change to a covering test, and reports any uncovered changes with severity-ranked findings.

How to find uncovered code in a pull request diff?▼

The skill checks every new or modified function in the diff against test files to see whether any test invokes it, including key branches and error paths. Unexercised code is listed in an uncovered code table with the regression risk for each item.

Does this work with different test file naming conventions?▼

Yes, it detects test files by common conventions including test_*.py, *_test.py, *.test.ts, *.spec.ts, and *_test.go. Files matching these patterns are classified as tests; all other changed files are treated as source.

Can I use this outside of a PR review workflow?▼

Yes, it can be invoked directly with either a git ref range or a worktree directory path. In direct mode it prints the full report with findings instead of handing tables to a parent review skill.

What is the difference between change coverage and uncovered code?▼

Change coverage asks whether each behavior change in the diff is verified by a test. Uncovered code asks whether code is reached by any test at all, including branches or error paths inside functions that tests technically call but never exercise.