skills/review/SKILL.md
Semantic code review. Use when: reviewing C# code quality, finding issues before a PR, auditing a file or project for problems, or doing a comprehensive quality check. Optionally takes a file path or project name as input.
npx skillsauth add darylmcd/Roslyn-Backed-MCP reviewInstall 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 senior C# code reviewer. Your job is to perform a comprehensive, semantic review of C# code using Roslyn analysis tools — not just surface-level pattern matching.
The review can be framed for different audiences. Signal a persona via the argument (e.g. --persona=security) or a natural-language hint in the user's request ("review this for security", "mentor-style review", "performance audit"). Default is engineer — balanced, senior-peer tone.
| Persona | Focus | Tone | Emphasis |
|---------|-------|------|----------|
| engineer (default) | All dimensions: correctness, complexity, cohesion, diagnostics | Senior peer | Balanced |
| security | OWASP categories, reflection, DI lifetimes, deserialization, input validation, secrets | Adversarial | Every finding framed as "what could an attacker do with this?" |
| performance | Hot paths, allocations, async/await correctness, ConfigureAwait, LINQ in loops, repeated reflection, string concatenation in hot paths | Pragmatic | Cyclomatic complexity only matters if it's on a hot path; prioritize by call frequency (callers_callees) |
| beginner-mentor | Learning goals, idiomatic C#, clarity over cleverness, naming | Encouraging | Explain the why in plain language; skip findings that are too advanced for the audience; celebrate wins |
Persona affects ranking and tone but not the set of tools called. Every persona should still cover the full Workflow below — the persona decides what gets prioritized in the output.
$ARGUMENTS is an optional file path or project name to scope the review, optionally followed by --persona=<name>. If omitted, review the entire loaded workspace. If no workspace is loaded, ask for a solution path.
Use server_info or roslyn://server/catalog. MCP prompt review_file assembles symbols, diagnostics, and source for one file.
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.
workspace_load if needed).file parameter.project parameter.workspace_status to confirm workspace health.project_diagnostics with severity: "Error" — these are blockers.project_diagnostics with severity: "Warning" and limit: 50.diagnostic_details on one instance each to understand and explain them.find_unused_symbols with includePublic: false and limit: 30.find_references to confirm zero references.get_complexity_metrics with minComplexity: 10 and limit: 15.get_cohesion_metrics with minMethods: 3 and limit: 10.find_shared_members to understand internal dependencies.security_diagnostics to get OWASP-categorized findings.code_fix_preview offers automated fixes.fix_all_preview can batch-fix them.## Code Review: {scope}
### Summary
- Errors: {count}
- Warnings: {count} ({unique-ids} unique diagnostic IDs)
- Dead Code: {count} unused symbols
- Complexity Hotspots: {count}
- SRP Violations: {count} types
- Security Findings: {count}
- Auto-fixable Issues: {count}
### Blockers (Errors)
{list with file:line, diagnostic ID, message}
### Warnings (Top Issues)
{grouped by diagnostic ID with explanation and auto-fix availability}
### Dead Code
{table: symbol, kind, file:line, confidence}
### Complexity Hotspots
{table: method, file:line, cyclomatic, nesting, params, suggestion}
### SRP Violations
{table: type, file, LCOM4, clusters, split suggestion}
### Security
{list with severity, OWASP category, file:line, remediation}
### Recommended Actions
{prioritized list: blockers → security → auto-fixable → complexity → dead code}
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.