skills/format-sweep/SKILL.md
Whole-solution formatting compliance pass. Use when: enforcing whole-solution formatting, running `dotnet format` equivalents, bulk-organizing usings, or performing an editorconfig compliance sweep. Optionally takes a project name or file glob to narrow scope.
npx skillsauth add darylmcd/Roslyn-Backed-MCP format-sweepInstall 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# formatting compliance specialist. Your job is to run a whole-solution formatting pass: discover every file that drifts from the loaded .editorconfig, present the rules in force, and apply formatting + using organization atomically with automatic rollback on any introduced compile errors.
$ARGUMENTS is an optional scope filter: a project name (e.g. MyProject) or a file glob (e.g. src/Services/**/*.cs). If omitted, the sweep runs across the entire loaded workspace.
If a workspace is not already loaded, ask the user for the solution path and load it first.
Use server_info, resource roslyn://server/catalog, or MCP prompt discover_capabilities (category formatting or all) for the live tool list and WorkflowHints (preview/apply, verify wrappers, editorconfig surface).
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.
Execute these steps in order. Use the Roslyn MCP tools — do not shell out for formatting.
workspace_load with the solution/project path (if not already loaded).workspaceId for all subsequent calls.workspace_status to confirm the workspace loaded cleanly and note any load-time warnings. Abort if status reports failure.get_editorconfig_options for the workspace (or narrowed scope from $ARGUMENTS).dotnet_diagnostic.* severities, and any category-level overrides.format_check with the optional scope filter. This is report-only — no edits are made.format_check reports zero violating files, stop and report success (see Refusal conditions).apply_with_verify will auto-rollback any individual file whose apply introduces a new compile error.For each violating file, in batches:
format_document_preview to generate the edit.apply_with_verify — the wrapper runs compile_check after each apply and auto-reverts the file if new errors appear.format_check), prefer format_range_preview → format_range_apply via apply_with_verify to minimize churn.For the same set of files that had formatting drift (and any file whose using block was flagged):
organize_usings_preview per file.organize_usings_apply, again wrapped in apply_with_verify for compile-safety.format_check again across the same scope — expect zero violating files.validate_workspace for the overall-status bundle (compile, diagnostics, format). Confirm green.compile_check once more to confirm the final state builds clean.Produce the Output Format block below.
*_apply call in this skill must be wrapped by apply_with_verify so that any file whose edit introduces a new compile error auto-reverts.*_apply tool without calling the corresponding *_preview first.Present a structured report:
## Format Sweep Report: {workspace-name}{optional-scope}
### Summary
- Files scanned: {count}
- Violations before: {count} files / {count} rule hits
- Violations after: {count} files (expect 0)
- Files touched: {count}
- Rollbacks (auto-reverted by verify): {count}
- Final `format_check` status: {pass/fail}
- `validate_workspace` status: {pass/fail}
### EditorConfig rules enforced
{condensed list: indent, newline, using-ordering, key dotnet_diagnostic severities}
### Files touched
{table: file path, rule IDs resolved, formatted (y/n), usings organized (y/n), rolled back (y/n)}
### Rollbacks (if any)
{per-file: file, rule attempted, compile error returned, action suggested}
### Next steps
{if any rollbacks: suggested follow-up (manual fix, narrower range, skill handoff). Otherwise: note that the sweep is clean and recommend committing.}
Stop and report (without writing) when any of these hold:
workspace_load or workspace_status reports failure — bail with the load-time error and a suggested reload path.format_check in Step 3 returns no files. Report success: "Solution is clean against the loaded .editorconfig — no sweep needed." Do not proceed to apply.server_info precheck fails (see Connectivity precheck above).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.