Prepare a new release for the C# MCP SDK. Assesses Semantic Versioning level (PATCH/MINOR/MAJOR), bumps the version, runs ApiCompat and ApiDiff, reviews documentation, updates changelogs, drafts release notes, and creates a pull request with all release artifacts. Use when asked to prepare a release, start a release, create a release PR, or assess what the next release should be.
Prepare a new release for the modelcontextprotocol/csharp-sdk repository. This skill assesses the appropriate Semantic Versioning 2.0.0 level based on queued changes, bumps the version, runs API compatibility and diff tools, reviews documentation, drafts release notes, and creates a pull request containing all release artifacts.
Safety: This skill creates a local branch and PR. It must never create a GitHub release. Release creation is handled by the publish-release skill after this PR is merged.
User confirmation required: This skill NEVER pushes a branch or creates a pull request without explicit user confirmation. The user must review and approve all details before any remote operations occur.
Work through each step sequentially. Present findings at each step and get user confirmation before proceeding. Skip any step that has no applicable items.
The user may provide:
main (noting HEAD) and offer the option to enter a branch or tag name insteadOnce the target is established:
gh release list (most recent published release — exclude drafts with --exclude-drafts).src/Directory.Build.props at the target commit. Extract <VersionPrefix> as the candidate version.Sort every PR into one of four categories. See references/categorization.md for detailed guidance.
| Category | Content |
|---|---|
| What's Changed | Features, bug fixes, improvements, breaking changes |
| Documentation Updates | PRs whose sole purpose is documentation |
| Test Improvements | Adding, fixing, or unskipping tests; flaky test repairs |
| Repository Infrastructure Updates | CI/CD, dependency bumps, version bumps, build system |
Entry format — * Description #PR by @author with co-authors when present:
* Description #PR by @author
* Description #PR by @author (co-authored by @user1 @Copilot)
Attribution rules:
Co-authored-by trailers from all commits in each PR (not just the merge commit) to identify co-authors. Do this for every PR regardless of primary author.copilot_work_started timeline event to identify the triggering user. That person becomes the primary author; @Copilot becomes a co-author.Invoke the breaking-changes skill with the commit range from the previous release tag to the target commit. Examine every PR, assess impact, reconcile labels (offering to add/remove labels and comment on PRs), and get user confirmation.
Use the results (confirmed breaking changes with impact ordering and detail bullets) in the remaining steps.
Using the categorized PRs from Step 2 and confirmed breaking changes from Step 3, assess the appropriate Semantic Versioning 2.0.0 release level. Follow the SemVer assessment guide (owned by the bump-version skill) for the full assessment criteria.
[Experimental] APIssrc/Directory.Build.props. Flag any discrepancy:
After the version is confirmed:
release-{version} from the target commit (e.g., release-1.1.0).src/Directory.Build.props:
<VersionPrefix> to the confirmed version<PackageValidationBaselineVersion> if the MAJOR version has changed (set to the previous release version)dotnet buildThis step creates local changes only — nothing is committed or pushed yet.
Run API compatibility validation against the baseline version. Follow references/apicompat-apidiff.md for the full procedure.
dotnet pack to trigger package validation against PackageValidationBaselineVersionCompatibilitySuppressions.xml in the affected project directoryGenerate a human-readable diff of the public API surface between the previous release and the new version. Follow references/apicompat-apidiff.md for the full procedure, including how to install the Microsoft.DotNet.ApiDiff.Tool from the .NET transport feed.
Microsoft.DotNet.ApiDiff.Tool from the transport feed if not already installed (requires --prerelease and --add-source pointing to https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet{MAJOR}-transport/nuget/v3/index.json)dotnet apidiff comparing baseline vs. current assemblies for each SDK packageIf the ApiDiff tool cannot be installed or fails to produce output, STOP and inform the user. Present the error and ask how to proceed. Do not fall back to a manual summary — the user must decide whether to troubleshoot, skip the API diff, or abort.
Review repository documentation for changes needed to compensate for or adapt to this release:
README.md and src/PACKAGE.md compile against the current SDK. Follow references/readme-snippets.md for the validation procedure. Propose fixes for any API mismatches.docs/ for content affected by the changes in this release. Update references to changed APIs, new features, or removed functionality.docs/versioning.md reflects them.CHANGELOG.md), update them with the release information. If no changelogs exist, skip this sub-step and note it in the summary.Stage all documentation changes for inclusion in the release commit.
Compose the release notes that will appear in the PR description and serve as the foundation for the publish-release skill. This is a draft — the final release notes will be refreshed when the GitHub release is created.
Omit empty sections. Present each section for user review before proceeding.
Commit all changes to the release-{version} branch:
Prepare release v{version}Present all of the following details to the user for review. The user must confirm every aspect before proceeding to Step 12.
release-1.1.0)origin)src/Directory.Build.props — Version bumped from 1.0.0 to 1.1.0
src/ModelContextProtocol.Core/CompatibilitySuppressions.xml — Added 2 new suppressions
README.md — Updated code sample for new API
docs/experimental.md — Added new experimental API reference
Release v1.1.0)After presenting all details, explicitly ask the user:
Would you like to push the branch and create the pull request?
Do not proceed without explicit "yes" confirmation.
Only after explicit user confirmation in Step 11:
release-{version} branch to the remoteRelease v{version}main)release-{version}release)Important: No draft GitHub release is created at this point. The publish-release skill handles release creation after this PR is merged.
Co-authored-by trailers to determine whether @Copilot should be a co-author; if still unclear, use @Copilot as primary authorDirectory.Build.props doesn't match the SemVer assessment, present the discrepancy and let the user decide the final versiondotnet pack output; note in the PR description that full ApiCompat was run via package validation onlyrelease-{version} already exists locally or remotely, ask the user whether to reuse it, delete and recreate, or choose a different nameThe PR description combines release notes, ApiCompat, and ApiDiff into a single document. Omit empty sections.
# Release v{version}
[Preamble — summarize the release theme]
## Release Notes
### Breaking Changes
Refer to the [C# SDK Versioning](https://csharp.sdk.modelcontextprotocol.io/versioning.html) documentation for details on versioning and breaking change policies.
1. **Description #PR**
* Detail of the break
* Migration guidance
### What's Changed
* Description #PR by @author (co-authored by @user1 @Copilot)
### Documentation Updates
* Description #PR by @author
### Test Improvements
* Description #PR by @author
### Repository Infrastructure Updates
* Description #PR by @author
### Acknowledgements
* @user made their first contribution in #PR
* @user1 @user2 @user3 reviewed pull requests
**Full Changelog**: https://github.com/modelcontextprotocol/csharp-sdk/compare/previous-tag...release-{version}
---
## API Compatibility Report
[ApiCompat output — pass/fail status per package and any issues or suppressions]
## API Diff Report
### ModelContextProtocol.Core
[API diff — additions, removals, changes]
### ModelContextProtocol
[API diff — additions, removals, changes]
### ModelContextProtocol.AspNetCore
[API diff — additions, removals, changes]
The release notes section within the PR description uses the same format as the final GitHub release notes (used by the publish-release skill). This ensures consistency between the PR and the published release.
Omit empty sections. The preamble is always required — it is not inside a section heading.
[Preamble — REQUIRED. Summarize the release theme.]
## Breaking Changes
Refer to the [C# SDK Versioning](https://csharp.sdk.modelcontextprotocol.io/versioning.html) documentation for details on versioning and breaking change policies.
1. **Description #PR**
* Detail of the break
* Migration guidance
## What's Changed
* Description #PR by @author (co-authored by @user1 @Copilot)
## Documentation Updates
* Description #PR by @author (co-authored by @user1 @Copilot)
## Test Improvements
* Description #PR by @author (co-authored by @user1 @Copilot)
## Repository Infrastructure Updates
* Description #PR by @author (co-authored by @user1 @Copilot)
## Acknowledgements
* @user made their first contribution in #PR
* @user submitted issue #1234 (resolved by #5678)
* @user1 @user2 @user3 reviewed pull requests
**Full Changelog**: https://github.com/modelcontextprotocol/csharp-sdk/compare/previous-tag...new-tag