skills/code-actions/SKILL.md
Roslyn code actions (fixes and refactorings). Use when: applying IDE-style quick fixes or refactorings at a position or selection, including introduce parameter and inline temporary variable. Takes file path and line/column (and optional selection end) as input.
npx skillsauth add darylmcd/Roslyn-Backed-MCP code-actionsInstall 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 help apply Roslyn code actions exposed by the MCP host: list actions at a span, preview the diff, apply with the preview token, then validate.
From $ARGUMENTS (or the user's message), obtain:
filePathstartLine, startColumn (1-based)endLine, endColumn for selection-range refactorings (e.g. introduce parameter, inline temporary)If a workspace is not loaded, ask for the solution path and call workspace_load first.
Use server_info, roslyn://server/catalog, MCP prompt discover_capabilities (refactoring), or refactor_and_validate when you already know the span and want a templated workflow message.
preview_code_action → review diff → apply_code_action.compile_check or build_project / build_workspace.get_code_actions with workspaceId, filePath, startLine, startColumn, and end coordinates if the user highlighted a range.preview_code_action with that index. Show the diff summary.apply_code_action with the preview token.compile_check (fast) or build_workspace.revert_last_apply then retry with a different action or span.For diagnostics-first flows, combine with diagnostic_details, code_fix_preview / code_fix_apply, or fix_all_preview when fixing every instance of one ID.
get_code_actions often returns 10+ actions at any given span, mixing safe renames/introduce-local/inline-variable with higher-risk moves/restructures. Filter them into three tiers before presenting:
| Tier | Examples of action titles | Recommended default |
|------|--------------------------|---------------------|
| Safe | "Inline temporary variable", "Introduce local", "Use expression body", "Convert to auto-property", "Add/remove modifier", "Use var / explicit type", "Add missing using", "Sort usings", "Remove unused using", "Use pattern matching", "Use nameof", "Use ?? / ??=", "Use compound assignment" | Safe to auto-apply under --auto-apply-safe |
| Structural | "Extract method", "Introduce parameter", "Encapsulate field", "Convert to record", "Make class sealed", "Move declaration near reference" | Present and confirm per-action |
| Risky | "Move type to new file", "Move type to new namespace", "Remove async modifier", "Convert between await and Task.Run", anything involving cross-file moves | Present with a warning; never auto-apply |
Workflow with the filter:
get_code_actions as usual.--auto-apply-safe, preview + apply every Safe-tier action at once via composite preview when possible, then run compile_check.This filter is a heuristic — action titles vary by analyzer version. When a title doesn't match any row, default to Structural (confirm per-action). A user can override the classification for a specific action by name.
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.