skills/test-coverage/SKILL.md
Test coverage analysis. Use when: checking test coverage, finding untested code, identifying gaps in test suites, scaffolding new tests, or auditing which public APIs have tests. Optionally takes a project name.
npx skillsauth add darylmcd/Roslyn-Backed-MCP test-coverageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a C# testing specialist. Your job is to analyze test coverage, identify untested code, and help scaffold tests for gaps.
$ARGUMENTS is an optional project or test project name. If omitted, analyze the entire loaded workspace. If no workspace is loaded, ask for a solution path.
Use discover_capabilities (testing / all) or MCP prompt review_test_coverage. For red CI focused on failing tests first, skill test-triage is a lighter entry point.
Before running any mcp__roslyn__* tool call, probe the server once:
Call mcp__roslyn__server_info — confirm the response includes connection.state: "ready".
If the call fails OR connection.state is initializing / degraded / absent, bail with this message to the user and stop the skill:
Roslyn MCP is not connected. This skill requires an active Roslyn MCP server. Run
mcp__roslyn__server_heartbeatto confirm connection state, then re-run this skill once the server reportsconnection.state: "ready". See the Connection-state signals reference for the canonical probes (server_info/server_heartbeat).
If connection.state is "ready", proceed with the rest of the workflow. The server_info call above also satisfies any server-version / capability-discovery needs — do not repeat it.
test_discover to find all test cases in the solution.test_coverage with the optional project filter.coverlet.collector is not installed, note this and fall back to test_run for pass/fail only.document_symbols on key source files (non-test) to list declared symbols.test_related to find associated tests.For the top untested types:
symbol_info to understand the type's purpose.callers_callees to see how it's used.Rank the untested public APIs from Steps 3-4 using this priority rubric:
| Tier | Signal | Weight | |------|--------|--------| | P0 — critical gap | public method with cyclomatic complexity >= 10 AND zero related tests | 100 | | P1 — broadly used | public method called by >= 3 other methods AND zero related tests | 50 | | P2 — orphan type | public type with no related tests whose enclosing project has other tests | 25 | | P3 — remaining | other untested public APIs | 5 |
Present the top 5-10 as a ranked list with tier label, type/method name, file:line, and the signal that landed it there.
Then prompt the user: "Scaffold tests for the top N?" (default N=5 if the user says yes without a number). If the user agrees OR the user invoked this skill with --scaffold-top=N:
scaffold_test_preview with:
testProjectName: the appropriate test projecttargetTypeName: the type to testtargetMethodName: optionally a specific methodreferenceTestFile: a sibling test file when the pattern is inferable (v1.22+)scaffold_test_batch_preview is available and N > 1, prefer batch mode for a single preview token.scaffold_test_apply for each token.compile_check to verify the scaffolded tests compile.If the user provides changed files:
test_related_files with the file paths.test_run with the filter to validate changes.## Test Coverage Report: {solution-name}
### Summary
- Test Projects: {count}
- Total Tests: {count}
- Overall Line Coverage: {percent}%
- Overall Branch Coverage: {percent}%
### Coverage by Module
{table: project, line%, branch%, uncovered lines}
### Coverage by Class (lowest coverage)
{table: class, file, line%, branch%, key untested methods}
### Untested Public APIs
{table: type/method, file:line, complexity, suggestion}
### Test Scaffolding Opportunities
{list of types where scaffold_test_preview can generate stubs}
### Recommendations
1. {highest-impact coverage gap}
2. {next priority}
...
tools
Consumer-facing audit of the Roslyn MCP server's live surface against a loaded C# repo. Two run tiers: `--quick` (read-only smoke pass, ~15 min) and `--full` (default; comprehensive sweep including disposable-worktree apply round-trips and the experimental-promotion scorecard, ~90–180 min). Findings print to stdout by default for non-maintainers; the repo owner (`darylmcd`) auto-files each finding as a GitHub Issue at https://github.com/darylmcd/Roslyn-Backed-MCP. Pass `--auto-file` to force-enable or `--no-auto-file` to force-disable. Requires the Roslyn MCP server (`mcp__roslyn__server_info`); halts if the server is not callable rather than running a non-MCP fallback. Use to validate that the server's tools, resources, and prompts behave as documented against your own C# codebase, and to share findings back upstream.
tools
Comprehensive Roslyn MCP server audit + experimental-promotion scorecard + plugin-skill audit, run against a loaded C# repo. Three modes — `full`, `promotion-only`, `read-only`. Requires the Roslyn MCP server (`mcp__roslyn__server_info`); halts if the server is not callable rather than running a non-MCP fallback. Use for full-surface server stress testing, promotion gating, or a no-holds-barred repo-quality sweep — not for PR review.
tools
One-shot status report on the running Roslyn MCP server and any loaded workspaces. Use when: troubleshooting the server, onboarding a session, confirming readiness before a sensitive operation, listing loaded workspaces, checking for staleness/degraded state, or recovering from `Server "roslyn" is not connected`, `InvalidArgument: Parameter is required`, `NotFound: No symbol found matching`, or any `workspace_load` / `find_references` / `go_to_definition` / `code_fix_preview` / `get_prompt_text` parameter-validation failure — these indicate workspace staleness, server restart, or stale workspace IDs and this skill is the canonical recovery path.
development
Multi-project version bump across a .NET solution. Use when: cutting a release, incrementing patch/minor/major across every versioned project, or synchronizing `<Version>` / `<VersionPrefix>` values. Takes a bump type (patch, minor, or major) as input. Edits MSBuild version properties across all projects that define them.