coverage-analysis

Featured

Automated, project-wide code coverage and CRAP (Change Risk Anti-Patterns) score analysis for .NET projects with existing unit tests. Auto-detects solution structure, runs coverage collection via `dotnet test` (supports both Microsoft.Testing.Extensions.CodeCoverage and Coverlet), generates reports via ReportGenerator, calculates CRAP scores per method, and surfaces risk hotspots — complex code with low test coverage that is dangerous to modify. Use when the user wants project-wide coverage analysis with risk prioritization, coverage gap identification, CRAP score computation across an entire solution, or to diagnose why coverage is stuck or plateaued and identify what methods are blocking improvement. DO NOT USE FOR: targeted single-method CRAP analysis (use crap-score skill), writing tests, general test execution unrelated to coverage/CRAP analysis, or coverage reporting without CRAP context.

Testing & QA 6,272 stars 499 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Coverage Analysis ## Purpose Raw coverage percentages answer "what code was executed?" — they don't answer what you actually need to know: - **What tests should I write next?** — ranked by risk and impact - **Which uncovered code is risky vs. trivial?** — CRAP scores separate the two - **Why has coverage plateaued?** — identify the files blocking further gains - **Is this code safe to refactor?** — complex + uncovered = dangerous to change This skill bridges that gap: from a bare .NET solution to a prioritized risk hotspot list, with no manual tool configuration required. ## When to Use Use this skill when the user mentions test coverage, coverage gaps, code risk, CRAP scores, where to add tests, why coverage plateaued, or wants to know which code is safest to refactor — even if they don't explicitly say "coverage analysis". ## When Not to Use - **Targeted single-method CRAP analysis** — use the `crap-score` skill instead - **Writing or generating tests** — this skill identifies where tests are needed, not write them - **General test execution** unrelated to coverage or CRAP analysis - **Coverage reporting without CRAP context** — use `dotnet test` with coverage collection directly ## Inputs | Input | Required | Default | Description | |-------|----------|---------|-------------| | Project/solution path | No | Current directory | Path to the .NET solution or project | | Line coverage threshold | No | 80% | Minimum acceptable line coverage | | Branch coverage thres...

Details

Author
dotnet
Repository
dotnet/skills
Created
9 months ago
Last Updated
today
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category