Crap Analysis
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
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.runsettingstemplate with exclusions for test assemblies, generated code, and migrations, plus adotnet-tools.jsonReportGenerator 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 -yInstalls 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 Score | Risk Level | Action Required |
|---|---|---|
| < 5 | Low | Well-tested, maintainable code |
| 5-30 | Medium | Acceptable but watch complexity |
| > 30 | High | Needs 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- Playwright Blazor Testing582
- Dotnet Local Tools573
- Aspire Integration Testing545
- Mjml Email Templates535
- Aspire Service Defaults520
- Snapshot Testing509
- Aspire Configuration508
- Dotnet Devcert Trust480
- Skills Index Snippets478
- Playwright Ci Caching476
- Akka Net Best Practices472
- Mailpit Integration465
- Verify Email Snapshots458
- OpenTelemetry NET Instrumentation456
- Akka Hosting Actor Patterns455
- Akka Net Testing Patterns452
- Akka Net Management451
- Akka Net Aspire Configuration437
- Marketplace Publishing430
- Modern Csharp Coding Standards2.4K
- Csharp Concurrency Patterns1.7K
- Efcore Patterns1.6K
- Dependency Injection Patterns732
- Database Performance731
Similar to Crap Analysis
More Testing & QAcrap-scoreSkilldotnet/skills5K installsCalculates targeted CRAP scores for a named .NET method, class, or file from Cobertura coverage and complexity.
coverage-analysisSkilldotnet/skills5.1K installsInterpret .NET coverage reports and identify what blocks progress, with optional CRAP risk ranking when requested.
snapshot-testingSkillaaronontheweb/dotnet-skills509 installsSnapshot testing in .NET with Verify that approves outputs through human-reviewed baseline files.
handbook-dotnetPluginNikiforovAll/claude-code-rules143 stars.NET development skills: dotnet run file support, selective unit testing, coverage, API inspection, analyzers and Roslyn queries
coverageSkillalirezarezvani/claude-skills1.7K installsCoverage analysis that maps app surfaces against existing Playwright specs and ranks the gaps by business impact.