Minimax DOCX
poco-ai/poco-claw
Professional DOCX document creation, editing, and formatting using OpenXML SDK (.NET).
Calculates CRAP (Change Risk Anti-Patterns) for a named .NET method, class, or file.
$ npx skills add dotnet/skills --skill crap-score -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install dotnet/skills crap-score --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/dotnet-test/skills/crap-score .claude/skills/crap-score && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "crap-score" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet-test/skills/crap-score into .claude/skills/crap-score/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "crap-score", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/dotnet/skills/tree/main/plugins/dotnet-test/skills/crap-scoreType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add dotnet/skills --skill crap-score -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install dotnet/skills crap-score --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/dotnet-test/skills/crap-score .agents/skills/crap-score && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "crap-score" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet-test/skills/crap-score into .agents/skills/crap-score/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "crap-score", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add dotnet/skills --skill crap-score -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install dotnet/skills crap-score --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/dotnet-test/skills/crap-score .cursor/skills/crap-score && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "crap-score" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet-test/skills/crap-score into .cursor/skills/crap-score/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "crap-score", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/dotnet/skills.git --path plugins/dotnet-test/skills/crap-score--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add dotnet/skills --skill crap-score -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install dotnet/skills crap-score --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/dotnet-test/skills/crap-score .gemini/skills/crap-score && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "crap-score" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet-test/skills/crap-score into .gemini/skills/crap-score/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "crap-score", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install dotnet/skills crap-scoreInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add dotnet/skills --skill crap-score -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/dotnet-test/skills/crap-score .github/skills/crap-score && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "crap-score" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet-test/skills/crap-score into .github/skills/crap-score/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "crap-score", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add dotnet/skills --skill crap-score -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install dotnet/skills crap-score --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dotnet/skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/dotnet-test/skills/crap-score .opencode/skills/crap-score && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "crap-score" agent skill from https://github.com/dotnet/skills/tree/main/plugins/dotnet-test/skills/crap-score into .opencode/skills/crap-score/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "crap-score", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
crap-scoreCalculates CRAP (Change Risk Anti-Patterns) for a named .NET method, class, or file.
Crap Score is an agent skill from dotnet/skills, published by the product's own GitHub organization. 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.
Its SKILL.md is about 3.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It works with .NET. The repository describes itself as: Repository for skills to assist AI coding agents with .NET and C. The licence is MIT.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 8d670fa. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
dotnetFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Crap Score loads about 3.4k tokens when it runs. Until then it costs about 109 tokens; SKILL.md has 1,698 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from dotnet/skills at commit 8d670fa, republished under its MIT licence (© dotnet). 1,698 words, ~3,366 tokens.
.claude/skills/crap-score/SKILL.md (or your agent's skills folder).Calculate CRAP (Change Risk Anti-Patterns) scores for .NET methods to identify code that is both complex and undertested.
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:
| 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.
run-tests skill)code-testing-agent)coverage-analysis)| Input | Required | Description |
|---|---|---|
| Target scope | Yes | Method name, class name, or file path to analyze |
| Test project path | No | Path to the test project. Defaults to discovering test projects in the solution. |
| Source project path | No | Path to the source project under analysis |
If the user supplies a valid Cobertura report that contains the requested
target, use it directly and do not rerun tests. If the supplied report is
malformed, empty, internally contradictory, or missing the target, treat it as
failed input: regenerate it with a repository-compatible command when possible,
or request a valid report when collection is unavailable. Otherwise invoke
run-tests to classify the repository's test platform and confirm the
compatible command shape, then require a command that emits Cobertura:
| Coverage provider | Cobertura command |
|---|---|
coverlet.collector with VSTest | dotnet test <test.csproj> --collect:"XPlat Code Coverage" --results-directory <results-dir> |
Microsoft.Testing.Extensions.CodeCoverage with .NET 9 bridged MTP | dotnet test <test.csproj> -- --coverage --coverage-output-format cobertura --coverage-output <output-path> |
Microsoft.Testing.Extensions.CodeCoverage with .NET 10+ native MTP | dotnet test --project <test.csproj> --coverage --coverage-output-format cobertura --coverage-output <output-path> |
Use an equivalent repository-owned command when the project defines one. Search
the results directory recursively when the collector creates a GUID subfolder.
Do not substitute a generic binary .coverage command when no converter is
available.
Do not stop at the first restore, compilation, test, or collector failure. Classify the failing layer, inspect every report the command emitted, and exhaust non-persistent retries before asking for input. Safe retries include command-line MSBuild properties that leave source and manifests unchanged and an already-installed or repository-provided alternative collector. A trivial source error is a collection blocker, not the final analysis, when a reversible command-line setting can compile the same source. Never call an empty Cobertura file a successful fallback.
For classic non-SDK projects (ToolsVersion, explicit compile items, or
packages.config), use only a repository-provided coverage command that emits
Cobertura. If none exists, request Cobertura XML and stop; do not migrate the
project or inject an SDK-style provider. CRAP scores always require real
coverage data.
Guessed coverage produces wrong CRAP scores, which is worse than no answer. For a classic project with no repository coverage command or existing report, stop here and request Cobertura.
Do not add coverage packages, change project manifests, or install global tools
unless the user explicitly authorized dependency/tooling changes. If the
repository lacks a usable provider or converter, report that exact prerequisite
and the compatible command shape identified through run-tests, then stop. If
an existing binary .coverage report is present, convert it only with an
already-installed or repository-provided converter; otherwise request
authorization or a Cobertura export. If tests execute with failures but still
emit valid coverage, continue with that data and note the failures. Report
complexity on its own if useful, but never publish a CRAP number derived from
assumed coverage.
Before using a report, verify that it parses, contains at least one class and method, and contains the requested target. An empty report or a report that omits the target is failed collection or filtering, not 0% coverage. Regenerate coverage when possible; otherwise stop without publishing a CRAP score.
If the user supplies an existing report, state that it was not regenerated. Do not describe its data as current unless its provenance is established by running the repository's coverage command in this analysis.
Prefer a machine-produced per-method complexity from a repository-provided code
metrics report or from the Cobertura method's complexity attribute when that
report maps to the current source. Microsoft.CodeAnalysis.Metrics can generate
method-level CyclomaticComplexity data through msbuild /t:Metrics, but do
not add the package or modify the project without user approval.
If no machine-produced metric exists, analyze the current target source and label the result as a manual complexity count. Count the following decision points (each adds 1 to the base complexity of 1):
| Construct | Example |
|---|---|
if | if (x > 0) |
else if | else if (y < 0) |
case (each) | case 1: |
for | for (int i = 0; ...) |
foreach | foreach (var item in list) |
while | while (running) |
do...while | do { } while (cond) |
catch (each) | catch (Exception ex) |
&& | if (a && b) |
|| (OR) | if (a || b) |
?? | value ?? fallback |
?. | obj?.Method() |
? : (ternary) | x > 0 ? a : b |
| Pattern match arm | x is > 0 and < 10 |
Base complexity is 1 for every method. Each decision point adds 1.
When counting manually, read the source file, report the construct-by-construct
breakdown, and do not use a source comment as evidence. Count every occurrence,
including operators nested inside arguments or return expressions; before
declaring a conflict, rescan specifically for &&, ||, ??, ?., ternaries,
and switch/pattern arms. If a supplied report maps to the current method and a
careful recount agrees, use its metric decisively. If a genuine disagreement
remains, label both sources; when the user explicitly asked to use that report,
calculate the primary CRAP result from its machine-produced metric and present
the manual count as a caveat rather than withholding the requested result.
Parse the Cobertura XML to find each method's line-rate attribute under the target <class> element. If line-rate is not available at method level, compute it from the <lines> elements:
$$\text{cov}(m) = \frac{\text{lines with hits} > 0}{\text{total lines}}$$
Method names in Cobertura may differ from source (async methods, lambdas). Match by line ranges when names don't align.
When both line-rate and <lines> exist, recompute the hit ratio and compare
them. Allow only normal report rounding (one percentage point); if they differ
more, the report contradicts itself. Regenerate it or report the conflict and
stop without calculating CRAP. Never silently choose whichever value produces
the expected score.
For each method in scope, apply the formula:
$$\text{CRAP}(m) = \text{comp}(m)^2 \times (1 - \text{cov}(m))^3 + \text{comp}(m)$$
Use a calculator or script for the arithmetic and show the substituted complexity and coverage. Do not calculate the formula mentally. Answer a named method directly; analyze unrelated methods only when the requested scope is a class or file. Once the requested result is established, do not append hypothetical refactor scores or coverage targets unless the user asked for them. Any numeric example must also come from the calculator or script.
Present a sorted table (highest CRAP first):
| Method | Complexity | Coverage | CRAP Score | Risk |
|---------------------------------|------------|----------|------------|----------|
| OrderService.ProcessOrder | 10 | 45% | 26.6 | High |
| OrderService.ValidateItems | 8 | 90% | 8.1 | Moderate |
| OrderService.CalculateTotal | 3 | 100% | 3.0 | Low |Include:
For high-CRAP methods, suggest one or both:
Calculate the coverage needed to bring a method below a CRAP threshold of 15:
$$\text{cov}_{\text{needed}} = 1 - \left(\frac{15 - \text{comp}}{\text{comp}^2}\right)^{1/3}$$
This formula only applies when comp < 15. When comp >= 15, the minimum possible CRAP score (at 100% coverage) is comp itself, which already meets or exceeds the threshold. In that case, coverage alone cannot bring the CRAP score below the threshold -- the method must be refactored to reduce its cyclomatic complexity first.
Report this as: "To bring ProcessOrder (complexity 10) below CRAP 15, increase coverage from 45% to more than 63.2% (at least 64% when reporting whole percentages)." For methods where complexity alone exceeds the threshold, report: "ComplexMethod (complexity 18) cannot reach CRAP < 15 through testing alone -- reduce complexity by extracting sub-methods."
line-rate against its line-hit ratio when both existrun-tests, then report the blocker instead.line-rate with the line-hit ratio and stop if they disagree beyond rounding.// complexity: 7 comment left by a previous author is not evidence.*.Designer.cs, *.g.cs) from analysis unless explicitly requested.© dotnet, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in plugins/dotnet-test/skills/crap-score of dotnet/skills.
Open the folder on GitHubat commit 8d670fa
We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in dotnet/skills, which our catalogue first saw on October 7, 2026.
Crap Score next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Crap Score this skilldotnet/skills | 5.6k | 1 repos | ~3.4k | Automated safety check: Pass | MIT | |
| Minimax DOCXpoco-ai/poco-claw | 1.4k | 7 repos | ~3.9k | Automated safety check: Pass | MIT | |
| Microsoft Skill CreatorMicrosoftDocs/mcp | 1.9k | 3 repos | ~2.1k | Automated safety check: Pass | CC-BY-4.0 | |
| Speckit ConstitutionWeihanLi/WeihanLi.Common | 242 | 11 repos | ~2.1k | Automated safety check: Pass | Apache-2.0 | |
| Copilot Session Failure Analysisdotnet/maui | 23k | — | ~3.4k | Automated safety check: Pass | MIT | |
| Microsoft Code ReferenceMicrosoftDocs/mcp | 1.9k | 4 repos | ~1.1k | Automated safety check: Pass | CC-BY-4.0 |
poco-ai/poco-claw
Professional DOCX document creation, editing, and formatting using OpenXML SDK (.NET).
MicrosoftDocs/mcp
Create agent skills for Microsoft technologies using official documentation.
WeihanLi/WeihanLi.Common
Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
dotnet/maui
Mines local Copilot CLI session logs for dotnet/maui to rank costly or failing runs, tag recurring failure modes, propose repo edits and emit guard evals.
MicrosoftDocs/mcp
Find working code samples, verify API signatures, and fix Microsoft SDK errors using official docs.
dotnet/core
Audits and updates os-packages.json files listing the Linux packages each .NET release needs per distro, then regenerates the Markdown from the JSON.
dotnet/skills
Resolves .NET runtime frames in Apple .ips crash logs to function names, source files and line numbers using dSYM symbols, atos and the Microsoft symbol server.
dotnet/skills
Resolves native crash frames from .NET Android tombstones to function names, source files and line numbers using BuildIds, Microsoft's symbol server and llvm-symbolizer.
dotnet/skills
Scans C# and .NET code for about 50 performance anti-patterns and reports prioritized findings with concrete fixes, at a scan depth you choose.
dotnet/skills
Statically pairs source files with test files to list code that no test references, using Roslyn for C# or tree-sitter for many languages, with no build.
dotnet/skills
Activate this skill when BenchmarkDotNet (BDN) is involved in the task — creating, running, configuring, or reviewing BDN benchmarks.
dotnet/skills
Makes .NET projects compatible with Native AOT and trimming by resolving IL trim and AOT analyzer warnings through annotations rather than suppressions.
Works with
Calculates CRAP (Change Risk Anti-Patterns) for a named .NET method, class, or file. Crap Score is an agent skill from dotnet/skills, published by the product's own GitHub organization.NET method, class, or file.
Crap Score fits situations like: : explicit CRAP calculation; coverage-and-complexity risk within that named target; including which tests to prioritize; : project-wide coverage/CRAP.
Run `npx skills add dotnet/skills --skill crap-score -a claude-code`. Or copy the skill folder (plugins/dotnet-test/skills/crap-score in dotnet/skills) into .claude/skills/crap-score in your project. Claude Code loads it when a task matches its description.
Run `npx skills add dotnet/skills --skill crap-score -a codex`. Or copy the skill folder (plugins/dotnet-test/skills/crap-score in dotnet/skills) into .agents/skills/crap-score in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dotnet/skills --skill crap-score -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/crap-score, .gemini/skills/crap-score, .github/skills/crap-score and .opencode/skills/crap-score in your project.
Going by SKILL.md and its folder, Crap Score needs the command-line tools its instructions call (dotnet).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Crap Score is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.4k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Crap Score: Minimax DOCX (poco-ai/poco-claw, 1.4k stars), Microsoft Skill Creator (MicrosoftDocs/mcp, 1.9k stars), Speckit Constitution (WeihanLi/WeihanLi.Common, 242 stars) and Copilot Session Failure Analysis (dotnet/maui, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
dotnet (a GitHub organization, an official publisher) maintains it in dotnet/skills, which has 5,568 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on October 7, 2026.
Source: dotnet/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.