Skip to content

Analyzes coverage and CRAP scores with ReportGenerator to surface untested, high-complexity Risk Hotspots in .NET code.

CCM score
67 of 100
skills.sh installs
605
GitHub stars
1.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers CRAP score calculation, OpenCover-based coverage collection, and interpreting the Risk Hotspots section of HTML reports
  • Includes a coverage.runsettings template with exclusions for test assemblies, generated code, and migrations, plus a dotnet-tools.json ReportGenerator setup
  • Defines CRAP thresholds of under 5 low, 5 to 30 medium, and over 30 high, with coverage targets of 80% line and 60% branch
  • Designed for .NET teams setting coverage gates in pull request pipelines such as GitHub Actions

Install

$ npx -y skills add aaronontheweb/dotnet-skills --skill crap-analysis -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

CRAP Score Analysis

When to Use This Skill

Use this skill when:

  • Evaluating code quality and test coverage before changes
  • Identifying high-risk code that needs refactoring or testing
  • Setting up coverage collection for a .NET project
  • Prioritizing which code to test based on risk
  • Establishing coverage thresholds for CI/CD pipelines

What is CRAP?

CRAP Score = Complexity x (1 - Coverage)^2

The CRAP (Change Risk Anti-Patterns) score combines cyclomatic complexity with test coverage to identify risky code.

CRAP ScoreRisk LevelAction Required
< 5LowWell-tested, maintainable code
5-30MediumAcceptable but watch complexity
> 30HighNeeds tests or refactoring

Why CRAP Matters

  • High complexity + low coverage = danger: Code that's hard to understand AND untested is risky to modify
  • Complexity alone isn't enough: A complex method with 100% coverage is safer than a simple method with 0%
  • Focuses effort: Prioritize testing on complex code, not simple getters/setters

CRAP Score Examples

Details

Repository
github.com/aaronontheweb/dotnet-skills
Categories
Testing & QA, .NET & C#
First seen
Jun 3, 2026

Questions

What does the crap-analysis skill do?

The crap-analysis skill analyzes code coverage and CRAP (Change Risk Anti-Patterns) scores to find high-risk .NET code. It combines cyclomatic complexity with test coverage using the OpenCover format and ReportGenerator, producing a Risk Hotspots report.

How do I install the crap-analysis skill?

Run npx -y skills add aaronontheweb/dotnet-skills --skill crap-analysis -y in your project. Once installed, the agent can set up coverage collection, generate reports, and help you prioritize which complex code needs tests or refactoring.

Where does crap-analysis stand in the Testing & QA category?

The crap-analysis skill is listed in the Testing & QA category on Claude Marketplaces, alongside tdd, test-driven-development, webapp-testing and break-ui. It focuses specifically on CRAP scores and coverage reports for .NET projects rather than general test writing.

More from aaronontheweb/dotnet-skills

All 34

Similar to Crap Analysis

More Testing & QA