Crap Analysis

🌐Community
by aaronontheweb · vlatest · Repository

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.

1

Run in terminal (recommended)

terminal
claude mcp add crap-analysis npx -- -y @trustedskills/crap-analysis
2

Or manually add to ~/.claude/settings.json

~/.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.runsettings file 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.runsettings file 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 HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
aaronontheweb
Installs
58

🌐 Community

Passed automated security scans.