/dotnet-test:coverage-analysisfrom dotnet-test
Interprets .NET coverage reports (Cobertura, line/branch/condition metrics) to identify gaps, plateaus, and project-wide CRAP. Analyzes supplied evidence without rerunning tests.
Ships in dotnet-test. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Explain what .NET coverage evidence proves, reconcile target arithmetic, and identify the code blocking progress. Add complexity/CRAP ranking only when the user explicitly asks for risk hotspots, CRAP, priorities by risk, or refactoring safety.
Use this skill for interpreting supplied .NET line/branch/condition evidence, coverage gaps and plateaus, target arithmetic, or explicit project-wide coverage-backed risk analysis.
crap-score skill insteadfind-untested-sourcestest-gap-analysistest-taggingrun-tests; use native tooling for non-.NET coverage collection or analysis. Interpreting .NET line/branch gaps remains in scope here| Input | Required | Default | Description |
|---|---|---|---|
| Project/solution path | No | Current directory | Path to the .NET solution or project |
| Line coverage threshold | No | 80% | Minimum acceptable line coverage |
| Branch coverage threshold | No | 70% | Minimum acceptable branch coverage |
| Existing Cobertura path | No | Discover only if not supplied | Preferred input; never rerun tests when usable |
| CRAP threshold | No | 30 | Used only for explicit risk/CRAP requests |
| Hotspot count | No | 3 | Explicit risk requests only; cap at 10 unless the user asks for more |
Discover optional inputs from the workspace. Do not ask for a project path when the current directory or a supplied report is sufficient.
| User intent | Required work | Do not do |
|---|---|---|
| Explain a supplied excerpt, condition, or summary | Answer directly from the supplied evidence | Tools, CRAP, discovery, report files |
| Interpret a supplied Cobertura path or diagnose a plateau | Read that report, reconcile totals, name all material gaps, answer directly | Rerun tests, install tools, compute CRAP, or generate files unless explicitly requested |
| Rank risk hotspots, compute project-wide CRAP, or assess refactoring safety | Use the supplied/existing report, read references/guidelines.md, and compute CRAP before ranking | Coverage-only ranking or a full report template unless requested |
| Analyze coverage when no report exists | Invoke run-tests to collect coverage with the repository-compatible runner, then analyze the generated report | Choose or execute a test command independently; CRAP unless risk was requested |
| Produce a full markdown/HTML/CSV report | First deliver the direct answer; then read references/output-format.md or references/report-generation.md | Report generation before the answer |
Words such as analyze coverage, what is blocking coverage, or why is coverage stuck do not by themselves request CRAP. Explicit signals include risk hotspot, CRAP, complexity-weighted priority, safe to refactor, or an equivalent request to combine complexity with coverage.
When the user supplies a coverage excerpt, summary, or valid Cobertura path:
dotnet test, install ReportGenerator, add a coverage package, or
read references/setup-discovery.md or references/report-generation.md.coverage-analysis.md or create a report directory unless the user
requested a saved/full report.references/guidelines.md.A failed read/view operation is not proof that a named path does not exist. Classify the failure, then make one targeted existence probe and use a normalized path or alternate reader only for confirmed tool availability, transport, or path-normalization failures and only after verifying the canonical path remains inside the workspace. Stop on content-exclusion, permission/policy, workspace-boundary, or unknown failures. Report a missing path only when the independent probe also fails; do not broaden the search or substitute another artifact.
Use this path only when no usable coverage evidence exists and the user asked for analysis that requires it.
references/setup-discovery.md.run-tests for repository overlay, platform, runner,
and command selection, and have it collect Cobertura once per entry point.When the workspace contains the project/test manifests needed by this path,
perform discovery directly and delegate collection to run-tests. Do not ask
the user to attach files or pre-run coverage that the current workspace lets
you inspect and generate.
Do not modify production code. Any incidental test-project change needed for
collection is owned by run-tests; include that change and its revert command
in the final analysis.
The automatic collection path is for SDK-style projects. For classic non-SDK or
packages.config projects, use only a repository-owned coverage command. If none
exists, stop and request Cobertura XML. Never migrate the project, inject an
SDK-style provider, create a wrapper project, or report substitute coverage from
another assembly.
condition-coverage="50% (1/2)" proves one reported outcome ran, but not which
one. Recommend forcing the opposite outcome. Without source, never invent likely
predicates or claim whether true or false is missing. State that compound
predicates need independently exercised operands and short-circuit combinations
when applicable; do not infer the exact combinations without source or fuller XML.T, required covered lines are ceiling(valid lines × T).(current covered lines + newly covered distinct lines) / valid lines. State assumptions such as fully covering a method.Answer the user's question in the first 2–4 sentences.
references/output-format.md. Save the
report only then.Report only artifacts that exist. Do not announce inaccessible output paths or failed optional file writes when no file was requested.
HTML/CSV/markdown files are not part of normal analysis. Generate them only when the user explicitly requests report files or a CI artifact.
references/output-format.md and save it.references/report-generation.md. Do not install
ReportGenerator before the direct answer, and do not retry a failed install.references/guidelines.md.references/guidelines.md (opens in a new tab)references/output-format.md (opens in a new tab)references/report-generation.md (opens in a new tab)references/setup-discovery.md (opens in a new tab)scripts/Compute-CrapScores.ps1 (opens in a new tab)scripts/CoverageData.ps1 (opens in a new tab)scripts/Extract-MethodCoverage.ps1 (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub dotnet/skills --plugin dotnet-test24 skills in this plugin
/assertion-qualityAnalyze assertion quality, depth, variety, and false confidence in existing tests. ALWAYS USE when asked about weak, shallow, trivial, always-true, self-referential, assertion-free, presence/truthiness-only, or insufficiently diverse assertions, including MSTest, Jest, pytest, and Go. DO NOT USE for direct fixes: writing-mstest-tests owns supplied MSTest assertions; code-testing owns new cases. Use test-gap-analysis when asked whether tests would catch a production change, and test-anti-patterns for general severity-ranked audits./code-testingALWAYS USE for test work that requires changes: write, add, generate, repair, or strengthen tests for existing code in xUnit, MSTest, NUnit, pytest, Vitest/Jest, Go, or another framework. Includes regression cases, failing or flaky tests, coverage-driven additions, and audit-then-fix requests. Focused work stays direct; broad or multi-stage work invokes test-engineer. DO NOT USE for only running tests, analysis-only audits, framework/platform migrations, a test blocked on a missing production seam (testability-obstacle), or MSTest API/configuration corrections that do not design new cases (writing-mstest-tests). Within an active test-engineer pipeline, reuse supplied guidance and do not re-enter this skill.2 plugins ship this exact skill · first indexed Oct 14, 2026
Other plugins' skills for the same job