crap-analysis

Calculate CRAP scores from cyclomatic complexity and test coverage for .NET projects.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/tientt010/Dotnet-JiraLite-Microservices --skill crap-analysis-tientt010
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: crap-analysis
Source: https://github.com/tientt010/Dotnet-JiraLite-Microservices/tree/main/.github/skills/crap-analysis
Command: npx skills add https://github.com/tientt010/Dotnet-JiraLite-Microservices --skill crap-analysis-tientt010

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

CRAP score analysis helps teams locate risky code by combining cyclomatic complexity with test coverage to prioritize refactoring and testing.

Core Features & Use Cases

  • Analyze files to identify hotspots based on CRAP thresholds.
  • Integrate with OpenCover reports and ReportGenerator to surface risk hotspots in CI pipelines.
  • Use-case: before a refactor, scan a module to find high CRAP scores and low coverage to target tests.

Quick Start

Run unit tests with coverage collection and review the generated risk hotspots.

Frequently Asked Questions about crap-analysis

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

FAQPage Schema
How do I calculate CRAP scores to identify high-risk code in .NET projects?

CRAP scores identify high-risk code by calculating cyclomatic complexity and test coverage. This process aggregates OpenCover data into actionable risk hotspots and sets thresholds for CI/CD integration.

What is a CRAP score and when do I need it for code quality analysis?

A CRAP score combines cyclomatic complexity and test coverage to locate risky code. You need it to prioritize refactoring and target testing efforts before modifying complex modules.

How do I integrate OpenCover and ReportGenerator to map code risks to remediation actions?

Integrating OpenCover with ReportGenerator maps code risks to remediation actions by aggregating coverage data into risk hotspots. Run unit tests with coverage collection to review generated thresholds.

Can I use CRAP score analysis to find refactoring targets in my CI pipelines?

Yes, CRAP score analysis finds refactoring targets in CI pipelines by surfacing risk hotspots from OpenCover reports. It identifies modules with high complexity and low coverage for targeted testing.

Does CRAP score analysis work without OpenCover reports for .NET projects?

No, CRAP score analysis requires OpenCover reports to calculate test coverage for .NET projects. The aggregation of this coverage data is essential for mapping risks and generating accurate hotspots.

What is the best way to scan a module for high CRAP scores and low coverage before a refactor?

The best way to scan a module before a refactor is to run unit tests with coverage collection. Reviewing the generated risk hotspots highlights high CRAP scores and low coverage for targeted remediation.