test-coverage

Analyze code test coverage to identify and prioritize high-risk untested code.

Updated Mar 9, 2026
One-click install
npx skills add https://github.com/bswrundquist/devtools --skill test-coverage-bswrundquist
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-coverage
Source: https://github.com/bswrundquist/devtools/tree/main/src/devtools/templates/claude/user/.claude/skills/test-coverage
Command: npx skills add https://github.com/bswrundquist/devtools --skill test-coverage-bswrundquist

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pytest, pytest-cov, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers identify and prioritize untested code, focusing testing efforts on the most critical areas of their codebase.

Core Features & Use Cases

  • Run Coverage: Executes tests with coverage measurement using pytest or coverage.py.
  • Parse Results: Identifies uncovered lines and files.
  • Risk Analysis: Categorizes uncovered code by risk level (e.g., authentication, payment logic).
  • Prioritization: Recommends which untested areas to focus on first.
  • Use Case: A developer wants to ensure critical authentication logic is well-tested. This Skill will highlight any uncovered lines within authentication-related files and flag them as high-risk.

Quick Start

Run pytest with coverage and show missing lines.

Frequently Asked Questions about test-coverage

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

FAQPage Schema
How do I identify high-risk untested code in my pytest suite?

Test coverage risk analysis identifies high-risk untested code sections by executing pytest with coverage measurement, parsing results to find uncovered lines, and categorizing them by risk level based on critical logic like authentication.

What is the best way to prioritize writing tests for untested Python code?

Risk-based test coverage prioritization recommends focusing on untested areas by risk level first. It analyzes coverage reports to flag critical untested logic, such as payment or authentication sections, helping you reduce technical debt effectively.

Do I need pytest-cov to analyze test coverage and missing lines?

Yes, you need pytest and pytest-cov installed to execute tests and generate coverage reports. The coverage analysis relies on these dependencies to run your test suite, measure coverage, and identify specific uncovered lines in your codebase.

Can I categorize uncovered code by risk level for software development workflows?

Yes, test coverage analysis categorizes uncovered code by risk level to improve test suite effectiveness. It evaluates untested files and lines, flagging high-risk areas like authentication or payment logic so developers can prioritize testing efforts.

How does test coverage analysis reduce technical debt in a codebase?

Test coverage analysis reduces technical debt by pinpointing exactly which untested lines pose the highest risk. By prioritizing critical untested areas for testing rather than chasing overall coverage percentages, it improves overall test suite effectiveness.