skills/migrate-package/SKILL.md
NuGet package migration. Use when: replacing one NuGet package with another across a solution, upgrading packages, or migrating from deprecated packages. Takes old package name, new package name, and new version as input.
npx skillsauth add darylmcd/Roslyn-Backed-MCP migrate-packageInstall 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 .NET dependency management specialist. Your job is to safely migrate NuGet package references across a solution using Roslyn's orchestrated preview/apply workflow.
$ARGUMENTS should contain three values: <old-package> <new-package> <new-version>
Examples:
Newtonsoft.Json System.Text.Json 9.0.0Microsoft.Extensions.Logging.Abstractions Microsoft.Extensions.Logging.Abstractions 10.0.0Moq NSubstitute 5.0.0If the user provides incomplete arguments, ask for the missing values.
Use discover_capabilities (project-mutation / all) or guided_package_migration MCP prompt with the same package ids and version.
get_nuget_dependencies to list all package references.nuget_vulnerability_scan to check if either package has known CVEs.migrate_package_preview with:
oldPackageId: the package to replacenewPackageId: the replacement packagenewVersion: the target version.csprojAfter user confirmation:
apply_composite_preview with the preview token.compile_check to verify the solution still compiles.project_diagnostics to identify breaking changes.compile_check for a final verification.test_run to verify behavior.get_nuget_dependencies again to confirm the migration is reflected.## Package Migration: {old-package} -> {new-package} {new-version}
### Before
{table: project, old-package, old-version}
### Changes
{list of .csproj modifications}
### After
- Compilation: {pass/fail}
- Projects Updated: {count}
- Errors Introduced: {count}
### Required Code Changes (if any)
{list of breaking API changes with file:line and suggested fix}
### Next Steps
- [ ] Run tests: `test_run`
- [ ] Review any API migration notes
- [ ] Update documentation if public APIs changed
When the user says "migrate all of Moq to NSubstitute" or "replace Newtonsoft with System.Text.Json everywhere," run family mode:
Inventory. Call get_nuget_dependencies and collect every package whose id matches the old family prefix (e.g., Moq, Moq.Extensions, Moq.AutoMocker). Show the user the set and ask to confirm before proceeding.
API map. Use a known-mapping table (either built-in for common families below, or provided by the user inline). The map translates old-package identifiers into their new-package equivalents so downstream code edits can be planned.
Built-in family maps:
| Old family | New family | Notable translations |
|------------|-----------|----------------------|
| Moq.* | NSubstitute.* | new Mock<T>() → Substitute.For<T>(); mock.Setup(x => x.Foo()).Returns(y) → mock.Foo().Returns(y); mock.Verify(...) → mock.Received().Foo(...) |
| Newtonsoft.Json.* | System.Text.Json (BCL) | JsonConvert.SerializeObject(x) → JsonSerializer.Serialize(x); [JsonProperty("n")] → [JsonPropertyName("n")]; JObject → JsonNode/JsonDocument |
| AutoMapper.* | Mapster.* | IMapper.Map<TDest>(src) stays; profile registration differs (TypeAdapterConfig<...>.NewConfig()) |
| FluentAssertions.* | Shouldly.* | x.Should().Be(y) → x.ShouldBe(y); x.Should().Throw<T>() → Should.Throw<T>(() => x) |
Per-package migration. For each package in the old family, run the single-package workflow (Steps 1-5 above) with the corresponding new-package id. Accumulate per-project preview tokens.
Code edits via bulk_replace_type_preview. After package references are swapped, run bulk_replace_type_preview for each type in the API map (e.g., Moq.Mock<T> → NSubstitute.Substitute). Preview → apply via apply_composite_preview → compile_check per step.
Residual manual edits. Report any remaining diagnostics from project_diagnostics with suggested fixes — family migrations rarely reach 100% automation, and some call-site rewrites need human judgment.
Verify tests still green. Run test_run after each apply.
User-provided maps override built-in ones. Ask the user for mappings when migrating a family not in the table above.
migrate_package_preview — it handles the version bump across all projects.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.