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 hot
SkillScore59Maintained
Automatic
◆QA & Test Engineering pack
Last verified 8/19/2026
What it changes
Passed 9 of 16 test cases with the skill, and 7 of 16 without it.
Without skill45%
With skill59%
Checks it passed that the model alone missed
Surfaces the top 10 risk hotspots by default in the analysis table.
Identifies the cause of the NullReferenceException in the unit test code.
Highlights in the summary report that test failures occurred while presenting partial coverage results.
and 2 more in the full report
5 fixed8 passed either way7 still failing2 broke
Pass-rate lift
+14 pp
Tokens
+439%
Agent turns
0%
Response time
-49%
Model gemini-3.6-flashMeasured 8/19/2026v113 of 22 cases passed with skill · 16 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 5
Prompt
When generating the Risk Hotspots table for a C# codebase without specifying a custom count limit, how many top risk hotspots should be surfaced in the report by default?
What was checked, without and with the skill
Checked
Without skill
With skill
Surfaces the top 10 risk hotspots by default in the analysis table.
Missed
Passed
case-21 · gemini-3.6-flash · 8/19/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md515 lines5 filesincludes scripts
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 threshold
No
70%
Minimum acceptable branch coverage
CRAP threshold
No
30
Maximum acceptable CRAP score before flagging
Top N hotspots
No
10
Number of risk hotspots to surface
Prerequisites
.NET SDK installed (dotnet on PATH)
At least one test project referencing the production code (xUnit, NUnit, or MSTest) — only required for the from-scratch path; not needed when the user supplies an existing Cobertura XML
Optional, only for the from-scratch path: internet/NuGet access for dotnet add package coverlet.collector (or Microsoft.Testing.Extensions.CodeCoverage) when a test project has no coverage provider yet. Skip when the user supplies an existing Cobertura XML.
Optional, only for Phase 5: internet access for dotnet tool install (ReportGenerator). Core CRAP/coverage analysis works from Cobertura XML alone — ReportGenerator only adds HTML/CSV reports as an optional post-summary extra.
Use the open-source free `CSharpier` formatter for C# and XML. Use when a .NET repo intentionally wants one opinionated formatter instead of a highly configurable `dotnet format`-driven style model. USE FOR: the repo uses or wants CSharpier; the team prefers an opinionated formatter over many configurable style knobs. DO NOT USE FOR: repos that already standardized on dotnet format as the only formatter. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test,