crap-analysis

Calculate CRAP scores for .NET code using cyclomatic complexity and test coverage.

10|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/AGIBuild/Agibuild.Fulora --skill crap-analysis-agibuild
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: crap-analysis
Source: https://github.com/AGIBuild/Agibuild.Fulora/tree/main/.cursor/skills/crap-analysis
Command: npx skills add https://github.com/AGIBuild/Agibuild.Fulora --skill crap-analysis-agibuild

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers identify and mitigate code that is complex and poorly tested, which poses a high risk of introducing bugs during modifications.

Core Features & Use Cases

  • CRAP Score Calculation: Computes the Change Risk Anti-Patterns score by combining cyclomatic complexity and test coverage.
  • Risk Hotspot Identification: Pinpoints specific methods and functions with high CRAP scores, indicating areas needing refactoring or increased test coverage.
  • Coverage Setup: Guides users on configuring coverage.runsettings for OpenCover format to include complexity metrics.
  • Report Generation: Utilizes ReportGenerator to create detailed HTML reports, including Risk Hotspots, and summary reports for CI/CD integration.
  • Use Case: Before starting work on a critical module, run this Skill to identify the riskiest parts of the codebase, allowing you to prioritize testing and refactoring efforts effectively.

Quick Start

Run the crap-analysis skill to collect code coverage and generate a risk report for your .NET project.

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 score using cyclomatic complexity and test coverage in .NET?

To calculate the CRAP score in .NET, you combine cyclomatic complexity metrics with test coverage data. This Skill automates that computation by analyzing OpenCover format coverage files to quantify Change Risk Anti-Patterns across your codebase.

What is a CRAP score and how does it identify code risk hotspots?

A CRAP score is a Change Risk Anti-Patterns metric that flags code posing a high bug risk during modifications. It identifies risk hotspots by evaluating methods where high cyclomatic complexity intersects with low test coverage, pinpointing areas needing immediate refactoring.

How do I configure OpenCover coverage.runsettings to include cyclomatic complexity metrics?

Configuring coverage.runsettings for OpenCover format requires enabling complexity metrics within the file. This Skill guides you through the setup process to ensure your .NET coverage collection properly generates the complexity data needed for accurate CRAP score calculation.

Can I generate HTML risk hotspot reports and integrate CRAP analysis into CI/CD pipelines?

Yes, you can integrate CRAP analysis into CI/CD pipelines. This Skill utilizes ReportGenerator to produce detailed HTML risk hotspot reports and summary outputs, allowing automated code risk assessment during your continuous integration builds.

Does this code risk analysis tool work without OpenCover and ReportGenerator?

No, this code risk analysis tool requires both OpenCover and ReportGenerator. OpenCover format is necessary for collecting coverage data with complexity metrics, while ReportGenerator is used to create the detailed HTML and summary reports for identifying risk hotspots.