coverage-analysis

Automate .NET code coverage and CRAP score analysis with Cobertura XML.

Updated May 28, 2026
One-click install
npx skills add https://github.com/ojrojas/AgentsInstructions --skill coverage-analysis-ojrojas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coverage-analysis
Source: https://github.com/ojrojas/AgentsInstructions/tree/main/.claude/skills/dotnet-test/skills/coverage-analysis
Command: npx skills add https://github.com/ojrojas/AgentsInstructions --skill coverage-analysis-ojrojas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires dotnet, coverlet.collector, Microsoft.Testing.Extensions.CodeCoverage, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers diagnose and analyze code coverage and CRAP scores in .NET projects, enabling them to identify and address risks in their codebase.

Core Features & Use Cases

  • Coverage Analysis: Calculate project-wide code coverage and CRAP (Change Risk Anti-Patterns) scores.
  • Risk Identification: Identify complex code with low coverage, highlighting potential hotspots for refactoring.
  • Use Case: When a developer wants to understand the code coverage of their project and identify areas that are risky to modify due to low coverage.

Quick Start

Run the coverage-analysis skill with the path to your .NET solution or project and specify any additional parameters like line coverage threshold.

Frequently Asked Questions about coverage-analysis

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

FAQPage Schema
How do I calculate code coverage and CRAP scores for a .NET project?

You can calculate code coverage and CRAP scores for a .NET project by automating test execution and coverage collection using PowerShell scripts and Cobertura XML. This process analyzes project-wide risk and provides refactoring recommendations.

What is a CRAP score and how does it identify risk in a .NET codebase?

A CRAP score, or Change Risk Anti-Patterns score, identifies risk in a .NET codebase by highlighting complex code with low test coverage. Analyzing these scores helps pinpoint hotspots that are risky to modify.

How do I find complex code with low coverage in .NET for refactoring?

To find complex code with low coverage in .NET, you can run an automated analysis that collects coverage metrics and calculates CRAP scores. This identifies specific areas in your codebase that are high-risk and need refactoring.

Do I need the .NET SDK and specific coverage providers to analyze code coverage?

Yes, you need the .NET SDK and specific coverage providers like coverlet.collector and Microsoft.Testing.Extensions.CodeCoverage to execute tests and collect the coverage data required for the analysis.

Can I specify line coverage thresholds when running a .NET coverage analysis?

Yes, you can specify line coverage thresholds when running a .NET coverage analysis by passing additional parameters to the skill. This allows you to enforce minimum coverage requirements for your project.

What are the limitations of using Cobertura XML for .NET code coverage analysis?

Using Cobertura XML for .NET code coverage analysis requires specific dependencies like coverlet.collector and Microsoft.Testing.Extensions.CodeCoverage, meaning it is limited to .NET environments that can support these providers.