Crap Analysis
Quickly identifies nonsensical or illogical statements in text, flagging potential errors or misleading information.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add crap-analysis npx -- -y @trustedskills/crap-analysis
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"crap-analysis": {
"command": "npx",
"args": [
"-y",
"@trustedskills/crap-analysis"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill, Crap Analysis, calculates a CRAP (Change Risk Anti-Patterns) score for code to identify potentially risky areas needing refactoring or testing. The CRAP score combines cyclomatic complexity (a measure of code intricacy) with test coverage data. A higher CRAP score indicates greater risk associated with modifying the code. This helps prioritize testing and development efforts.
When to use it
- Evaluating code quality before making changes.
- Identifying high-risk code that requires refactoring or additional testing.
- Setting up automated test coverage collection for .NET projects.
- Prioritizing which parts of the codebase need the most attention during testing.
- Establishing thresholds for continuous integration/continuous delivery (CI/CD) pipelines based on code risk.
Key capabilities
- Calculates a CRAP score using cyclomatic complexity and test coverage.
- Provides a risk level assessment (Low, Medium, High) based on the calculated CRAP score.
- Requires a
coverage.runsettingsfile in the repository root for OpenCover format data collection. - Supports excluding specific files and attributes from coverage analysis.
Example prompts
- "Calculate the CRAP score for this code."
- "What is the risk level of this method?"
- "Show me the methods with a CRAP score greater than 30."
Tips & gotchas
- Requires an OpenCover-formatted
coverage.runsettingsfile to be present in the repository root for accurate calculation. - The skill focuses on .NET projects and relies on cyclomatic complexity metrics included in the OpenCover format.
- A high CRAP score doesn't always mean code is bad, but it does indicate a need for closer inspection and potential improvement.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.