coverage-analysis

Analyze Cobertura XML to compute CRAP scores and identify high-risk methods.

1|Updated May 21, 2026
One-click install
npx skills add https://github.com/1k-off/umbraco-observability-playground --skill coverage-analysis-1k-off
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coverage-analysis
Source: https://github.com/1k-off/umbraco-observability-playground/tree/main/.agents/skills/coverage-analysis
Command: npx skills add https://github.com/1k-off/umbraco-observability-playground --skill coverage-analysis-1k-off

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

It turns raw code coverage percentages into actionable risk intelligence by identifying complex, poorly covered .NET methods that are dangerous to change.

Core Features & Use Cases

  • CRAP-based risk hotspot ranking: Calculates CRAP scores per method so you can prioritize what to test next, not just what is uncovered.
  • Coverage-gap surfacing: Extracts per-method line and branch coverage below your thresholds to show exactly where coverage is missing.
  • Coverage plateau diagnostics: Helps explain why coverage is stuck by pinpointing the specific outlier methods and files blocking improvement.

Quick Start

Run coverage-analysis for your .NET solution to get a risk-ranked CRAP hotspot table and the method-level coverage gaps below your thresholds.

Frequently Asked Questions about coverage-analysis

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

FAQPage Schema
How do I identify high-risk code areas using CRAP score and code coverage data?

To identify high-risk code, CRAP score analysis ranks risky .NET methods by combining cyclomatic complexity and low code coverage. This pinpoints complex, poorly tested methods that are dangerous to refactor.

Why does my .NET code coverage plateau and stop improving?

Code coverage plateaus when a few outlier methods block overall improvement. Coverage plateau diagnostics pinpoint specific high-complexity, low-coverage .NET files and methods causing the stagnation.

How do I extract method-level coverage gaps from Cobertura XML in a .NET solution?

Extract method-level coverage gaps by parsing Cobertura XML to surface per-method line and branch coverage below configurable thresholds. This identifies exactly where missing coverage occurs.

Can I use this to decide where to add unit tests for refactoring safety?

Yes, computing CRAP scores and coverage gaps determines refactoring safety by highlighting high-risk .NET methods. This directs unit testing efforts toward complex, poorly covered code.

What is a CRAP score and how does it help prioritize unit testing?

A CRAP score measures risk by combining code complexity and coverage. Ranking methods by CRAP score helps prioritize unit testing on code that is both highly complex and poorly tested.

Does this coverage analysis tool work without external dependencies?

Yes, the coverage analysis tool operates independently without external dependencies. It processes Cobertura XML outputs natively to produce risk hotspot rankings and coverage gap reports.