Agent skill · Testing & QA

coverage-analysis

Project-wide code coverage and CRAP (Change Risk Anti-Patterns) score analysis for .NET projects. Calculates CRAP scores per method and surfaces risk hotspots — complex code with low coverage that is dangerous to modify. Use to diagnose why coverage is stuck or plateaued, identify what methods block improvement, or get project-wide coverage analysis with risk ranking. USE FOR: coverage stuck, coverage plateau, can't increase coverage, what's blocking coverage, coverage gap, CRAP scores, risk hotspots, where to add tests, coverage analysis, coverage report. DO NOT USE FOR: targeted single-metho

dotnetgithub.com/dotnetGitHub ↗
claude-codeMIT
Install
npx skills add dotnet/skills --skill coverage-analysis --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 8
SKILL.md size: 15 KB
Bundled scripts: none
Path: plugins/dotnet-test/skills/coverage-analysis/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 4,927
Language: C#
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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 direct

What's inside
Steps it walks through
  1. Purpose
  2. When to Use
  3. When Not to Use
  4. Inputs
  5. Prerequisites
  6. Workflow
  7. Phase 1 — Setup (sequential)
  8. Phase 2 — Test execution (skip when Cobertura XML already exists)
  9. Phase 3 — Analysis (sequential)
  10. Phase 4 — User-facing summary (MANDATORY — your next assistant response)
  11. Phase 5 — Optional: ReportGenerator HTML/CSV reports (post-summary)
  12. Validation
  13. Common Pitfalls
Ships with 7 files
  • references/guidelines.md
  • references/output-format.md
  • references/report-generation.md
  • references/setup-discovery.md
  • references/test-execution.md
  • scripts/Compute-CrapScores.ps1
  • scripts/Extract-MethodCoverage.ps1
More from skills
All skills →
About this skill
What does the coverage-analysis skill do?

Project-wide code coverage and CRAP (Change Risk Anti-Patterns) score analysis for .NET projects. Calculates CRAP scores per method and surfaces risk hotspots — complex code with low coverage that is dangerous to modify. Use to diagnose why coverage is stuck or plateaued, identify what methods block improvement, or get project-wide coverage analysis with risk ranking. USE FOR: coverage stuck, coverage plateau, can't increase coverage, what's blocking coverage, coverage gap, CRAP scores, risk hotspots, where to add tests, coverage analysis, coverage report. DO NOT USE FOR: targeted single-metho

How do I install it?

Run `npx skills add dotnet/skills --skill coverage-analysis --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From dotnet/skills, a repository with 4,927 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going