coverage

Analyze test coverage to identify missed lines and partially covered branches.

23|16|Updated Jun 15, 2022
One-click install
npx skills add https://github.com/talmolab/sleap-io --skill coverage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coverage
Source: https://github.com/talmolab/sleap-io/tree/main/.claude/skills/coverage
Command: npx skills add https://github.com/talmolab/sleap-io --skill coverage

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Developers often struggle to ensure their code is thoroughly tested, leading to bugs and regressions. Manually identifying untested code paths, especially partially covered branches, is time-consuming and prone to oversight. This skill automates the detailed analysis of test coverage, making it easy to pinpoint exactly where tests are missing or incomplete.

Core Features & Use Cases

  • Automated Coverage Analysis: Automatically runs tests and generates comprehensive coverage reports, highlighting both completely missed lines and partially covered branches.
  • Targeted Test Identification: Pinpoints specific lines and branches that lack coverage, guiding you to write highly effective, focused tests.
  • PR-Centric Workflow: Can filter coverage results to only show gaps in lines changed within a Pull Request, accelerating code reviews and ensuring new code is well-tested.
  • Use Case: Before merging a Pull Request, you can ask the AI to "Check the test coverage for my PR changes." The skill will then report any uncovered lines in your new code, allowing you to quickly address them and ensure high code quality.

Quick Start

"Analyze the test coverage for the current project and tell me which lines are missed or partially covered." "I've made changes in my current branch. Can you check the test coverage specifically for the lines I've modified?"

Frequently Asked Questions about coverage

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

FAQPage Schema
How do I identify which lines of code aren't covered by tests?

Test coverage analysis automatically runs your test suite and generates reports highlighting completely missed lines and partially covered branches. This pinpoints exactly which code paths lack testing, letting you write targeted tests to close gaps.

Can I check test coverage for only the changes in my pull request?

Yes, coverage analysis can filter results to show gaps only in lines you've modified in your current branch. This accelerates code reviews and ensures new code is well-tested before merging.

What's the difference between line coverage and branch coverage?

Line coverage tracks whether individual lines execute; branch coverage tracks whether all conditional paths (if/else, loops) execute. Branch coverage is more thorough—a line can execute but miss certain branches, leaving gaps in test completeness.

How do I automate test coverage analysis in my workflow?

Coverage analysis runs pytest automatically with pytest-cov to generate comprehensive reports. You can integrate it into CI/CD or run it locally to identify missed coverage and receive actionable guidance on where tests are needed.

Can I use coverage analysis with existing pytest tests?

Yes, coverage analysis works with pytest and pytest-cov, integrating seamlessly into projects that already use pytest. It generates detailed metrics on topic completeness and gaps without requiring test rewrites.