crap-score Skill
Calculates targeted CRAP (Change Risk Anti-Patterns) scores for a named .NET method, class, or single source file. Use when the user explicitly asks to compute CRAP scores or assess risky untested code for a specific target, combining Cobertura coverage data with cyclomatic complexity analysis. DO NOT USE FOR: project- Published by microsoft in testfx.
What is crap-score Skill?
Calculates targeted CRAP (Change Risk Anti-Patterns) scores for a named .NET method, class, or single source file. Use when the user explicitly asks to compute CRAP scores or assess risky untested code for a specific target, combining Cobertura coverage data with cyclomatic complexity analysis. DO NOT USE FOR: project- Published by microsoft in testfx. This profile combines repository metadata with install, compatibility, and usage signals so developers can quickly decide whether it fits their agent workflow before opening the source repository.
Automated repository signals based on public metadata such as recency, license, installation evidence, and adoption. These are not a security audit or endorsement.
Key capabilities
- Includes SKILL.md support
- Reusable instructions support
- Data analysis
- Data analysis use cases
Technical details
- Install or run with Copy skill directory
When to use crap-score Skill
- Use it for data analysis.
Built with
Editorial notes
Source
- Creator: microsoft
- Repository: microsoft/testfx
- Skill file: .agents/skills/crap-score/SKILL.md
What it does
Calculates targeted CRAP (Change Risk Anti-Patterns) scores for a named .NET method, class, or single source file. Use when the user explicitly asks to compute CRAP scores or assess risky untested code for a specific target, combining Cobertura coverage data with cyclomatic complexity analysis. DO NOT USE FOR: project-
Skill instructions
CRAP Score Analysis Calculate CRAP (Change Risk Anti-Patterns) scores for .NET methods to identify code that is both complex and undertested. Background The CRAP score combines cyclomatic complexity and code coverage into a single metric: $$\text{CRAP}(m) = \text{comp}(m)^2 \times (1 - \text{cov}(m))^3 + \text{comp}(m)$$ Where: - $\text{comp}(m)$ = cyclomatic complexity of method $m$ - $\text{cov}(m)$ = code coverage ratio (0.0 to 1.0) of method $m$ | CRAP Score | Risk Level | Interpretation | |------------|------------|----------------| | < 5 | Low | Simple and well-tested | | 5-15 | Moderate | Acceptable for most code | | 15-30 | High | Needs more tests or simplification | | 30 | Critical | Refactor and add coverage urgently | A method with 100% coverage has CRAP = complexity (the minimum). A method with 0% coverage has CRAP = complexity^2 + complexity. When to Use - User wants to assess which methods are risky due to low coverage and high complexity - User asks for CRAP score of spe
Explore related resources
Frequently asked questions
What is crap-score?
crap-score is a open-source AI agent skill with Copy skill directory. Calculates targeted CRAP (Change Risk Anti-Patterns) scores for a named .NET method, class, or single source file.
Who is crap-score best for?
crap-score is best for reusing agent instructions, scripts, and references, data analysis workflows.
How do I install crap-score?
Install or run crap-score using Copy skill directory. Check crap-score for the latest setup command.
Is crap-score actively maintained?
crap-score may need a closer maintenance check before production use.
Auto-fetched from GitHub.