crap-score SKILL.md skillA
crap-score from dotnet/skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add dotnet/skills/crap-score@git:20261008.a51399bPins git:20261008.a51399b in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- dotnet/skills
- Path
plugins/dotnet-test/skills/crap-score/SKILL.md- Versions recorded
- 7
- Latest version
- git:20261008.a51399b, committed Oct 8, 2026
- First version recorded
- May 15, 2026
- Size
- 13,462 bytes
- Repository stars
- 5,836
- License
- MIT
Calculates CRAP (Change Risk Anti-Patterns) for a named .NET method, class, or file. USE FOR: explicit CRAP calculation or coverage-and-complexity risk within that named target, including which tests to prioritize. DO NOT USE FOR: project-wide coverage/CRAP, plateaus, or project-wide blockers/priorities (coverage-analysis); behavioral/pseudo-mutation gaps (test-gap-analysis); writing tests; test runs without CRAP context.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 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 to < 15 | Moderate | Acceptable for most code |
| 15 to 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 specific methods, classes, or files
…Read the whole file at its exact version.
How to install
mdr add dotnet/skills/crap-score@sha256:dd5a49f1a9a3a10eThe line at the top of this page pins the label git:20261008.a51399b, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_hc7fsk6uo7paiyar)
4 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 7 versions of this file, between May 15, 2026 and Oct 8, 2026, about one every 24 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261008.a51399b latest | 2026-10-08 | a51399b | 13,462 B | A | view · diff |
| git:20260925.a824bbb | 2026-09-25 | a824bbb | 13,468 B | A | view · diff |
| git:20260903.7caacad | 2026-09-03 | 7caacad | 12,399 B | A | view · diff |
| git:20260826.3cd1337 | 2026-08-26 | 3cd1337 | 10,184 B | A | view · diff |
| git:20260812.5a06b20 | 2026-08-12 | 5a06b20 | 10,136 B | A | view · diff |
| git:20260729.f2eb897 | 2026-07-29 | f2eb897 | 9,582 B | A | view · diff |
| git:20260515.b0c2336 | 2026-05-15 | b0c2336 | 7,708 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (13462 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
dotnet/skills · 5,836 stars · license MIT · pushed 2026-11-06 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_hc7fsk6uo7paiyar GET https://markdownregistry.com/api/v1/resolve?ref=dotnet/skills/crap-score GET https://markdownregistry.com/api/v1/blob/dd5a49f1a9a3a10e3d41a4e9552573c5d0a076120bcd00dd8225d1013b2f6fba
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.