Generate breaking change documentation for merged dotnet/runtime PRs. USE FOR: creating breaking change docs, "document this breaking change", "write breaking change issue for PR #NNNNN", processing PRs labeled needs-breaking-change-doc-created. DO NOT USE FOR: general code review (use code-review skill), bug fixes, API proposals (use api-proposal skill).
72
88%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Generate high-quality breaking change documentation for merged dotnet/runtime pull requests and file it as an issue in dotnet/docs.
When a PR in dotnet/runtime introduces a breaking change, the docs team needs a structured issue in dotnet/docs describing the change, its impact, and migration guidance. This skill automates that process:
.github/workflows/breaking-change-doc.md triggers when a PR labeled
needs-breaking-change-doc-created is merged (or the label is added to an
already-merged PR). It can also be run manually via workflow_dispatch with
an optional suppress_output flag for dry-run inspection.| File | Purpose |
|---|---|
.github/workflows/breaking-change-doc.md | gh-aw workflow — triggers on PR merge/label |
.github/workflows/breaking-change-doc.lock.yml | Compiled workflow (generated by gh aw compile) |
.github/skills/breaking-change-doc/SKILL.md | This skill |
.github/skills/breaking-change-doc/Get-VersionInfo.ps1 | Release-branch/tag-based .NET version detection (via gh CLI) |
.github/skills/breaking-change-doc/Build-IssueComment.ps1 | Builds PR comment with a hybrid pre-filled issue creation link |
The user provides one of:
#114929 or 114929)https://github.com/dotnet/runtime/pull/114929)The source repository is always dotnet/runtime.
Use GitHub tools to read comprehensive PR data. Collect all of the following:
area-* labels. If none exist, report an error asking the user to set one.Map the area-* label to the dotnet/docs feature area dropdown value:
area-* label pattern | Feature area |
|---|---|
area-System.Net.*, area-Networking | Networking |
area-System.Security.*, area-Cryptography | Cryptography |
area-System.Text.Json, area-Serialization | Serialization |
area-System.Xml.* | XML, XSLT |
area-Extensions-* | Extensions |
area-System.Globalization | Globalization |
area-System.Runtime.InteropServices*, area-Interop | Interop |
area-CodeGen-*, area-JIT | JIT |
area-System.Linq* | LINQ |
area-System.CodeDom, area-Analyzers | Code analysis |
area-Infrastructure-*, area-SDK | SDK |
area-System.Windows.Forms* | Windows Forms |
area-WPF | Windows Presentation Foundation (WPF) |
Most other area-System.* labels | Core .NET libraries |
If the mapping is unclear, use "Other (please put exact area in description textbox)" and include the actual area label in the description.
Run the helper script to determine the .NET version context:
pwsh .github/skills/breaking-change-doc/Get-VersionInfo.ps1 -PrNumber <number>You MUST display the complete script output. The script determines the version
from the existence of release/<major>.<minor>-preview<N> (and later -rc<N> / GA)
branches: once a milestone is branched it is locked, so a change merged to main
ships in the next milestone. Two things can move it into an earlier, already-branched
milestone: the merge commit is already contained in that branch (compare API), or a
linked PR (open or merged) targets that branch — in the latter case the version is
reported as tentative, because such a linked PR is only "a PR that references this
one and targets a release branch" and is not verified to be a genuine backport (and a
cherry-pick backport's commit differs from this PR's, so containment can't confirm it). Backports are discovered via the primary PR's cross-reference graph
(GitHub timeline), so they are found regardless of the backport's head-branch name.
For predicting the next, unbranched milestone the script assumes the standard .NET
cadence of 7 previews, then 2 RCs, then GA (tunable via -PreviewCount /
-RcCount), so it correctly rolls over Preview 7 → RC 1 and RC 2 → GA. For
changes that already shipped in a past major (whose preview/RC branches have been
pruned), containment only resolves to the GA line, so the script then scans the
persistent release tags to recover the exact first preview/RC. The JSON output
includes:
EstimatedVersion — human-readable version string like ".NET 11 Preview 7"Tentative — true when the version depends on an unverified linked release-branch
PR (open or merged)DetectionMethod — how the version was determined (direct release-branch merge,
own-commit containment in a branched milestone, tag-refined first-shipped version,
potential linked backport, or "ships after highest branched milestone")FallbackVersion — present only when Tentative is true: the version to use if
the linked PR turns out not to be a genuine backport (the normal "ships after
highest branched milestone" result), so you don't have to re-derive itHighestBranch — the highest release branch found for the target major.minorContainedInBranch — present only when the merge commit is already in a branchFirstShippedTag — set when the version was refined from release tags (the exact
tag where the change first shipped, e.g. v9.0.0-preview.4.24266.19)Backports — array of potential backport PRs cross-referenced from this PR and
targeting a release branch (Number, State, Merged, Target, Title),
including cross-major servicing backports (informational; they do not change the
primary version)MergeCommit — the merge commit SHAMergedAt — when the PR was mergedBaseRef — the PR base branch used to determine version contextThe Backports entries are candidates, not confirmed backports. A cross-reference
only means the PR mentions this one; it does not prove it is a backport of this change.
When a backport is relevant to the outcome (especially a tentative version, or when
listing backports in the draft), confirm it is a genuine backport by inspecting the
candidate PR's title, description, and — if still unclear — its code diff, before
relying on it.
After running the script, print the full JSON output so it is visible in the workflow log. Then check the JSON:
Error field, report the error and fall back to
inspecting the release branches manually (gh api repos/dotnet/runtime/branches)
to estimate the version.Tentative is true, confirm the referenced linked PR is a genuine backport of
this change (title/description/diff). If it is, use EstimatedVersion and note in the
draft that it depends on that backport; if it is not, use FallbackVersion instead.EstimatedVersion as definitive.
If it's confirmed and still open, treat the EstimatedVersion as provisional and note this in the draft.Error field, use EstimatedVersion as
the version for the breaking change issue. Do not fall back to manual
detection when the script succeeds.Search for existing breaking change issues in dotnet/docs:
dotnet/docs issues for Breaking change <PR_NUMBER> with label breaking-change.Read the breaking change issue template from dotnet/docs at:
.github/ISSUE_TEMPLATE/02-breaking-change.yml
gh api repos/dotnet/docs/contents/.github/ISSUE_TEMPLATE/02-breaking-change.yml -H "Accept: application/vnd.github.raw"This template defines the required sections and dropdown values. Use it as a structural reference only — do not output YAML.
Also capture the template's labels: and assignees: values — these are the
authoritative source for the labels and assignee applied to the new issue and must
be passed to Build-IssueComment.ps1 in Step 6.
Search dotnet/docs for 2-3 recent issues with the breaking-change label.
Read their bodies to understand the expected quality, tone, and level of detail.
Generate a complete breaking change issue. The output must be clean markdown formatted to work with the GitHub issue form template. Structure it as follows:
[Breaking change]: <concise description of the change>
Do not just repeat the PR title. Write a clear, user-facing summary.
Brief description of the breaking change. Include the PR link.
Use the EstimatedVersion from Step 2. Must match one of the template dropdown values
(e.g., ".NET 11 Preview 3"). If it doesn't match exactly, use
"Other (please put exact version in description textbox)" and state the version in the description.
Describe what happened before the change. Include a code example if applicable showing the old behavior.
Describe what happens now. Include a code example if applicable showing the new behavior. Highlight exceptions thrown, changed return values, or different default settings.
Categorize as one or more of:
Most changes are behavioral. Only mark binary/source incompatible when the change actually affects compilation or binary loading.
Explain why the change was made. Reference the motivation from the PR body and closing issues.
Provide specific, actionable guidance:
Use the mapping from Step 1.
List all affected APIs. For methods, specify whether it's all overloads or
specific ones. Use fully qualified names (e.g., System.IO.Compression.ZipArchiveEntry.Open()).
Create the output directory and write the full markdown content from Step 5
(everything except the title line) to
artifacts/docs/breakingChanges/issue-draft.md. This file is the primary
output and can be reviewed before taking any further action.
Run the helper script to produce a PR comment with a pre-filled issue link.
Pass the labels and assignee from the docs issue template (Step 4) for the new
issue, and pass the runtime PR's assignees separately so they are @-mentioned:
pwsh .github/skills/breaking-change-doc/Build-IssueComment.ps1 \
-IssueDraftPath artifacts/docs/breakingChanges/issue-draft.md \
-Title "<the [Breaking change]: ... title from Step 5>" \
-Labels "<comma-separated labels from the template's labels: field>" \
-IssueAssignees "<comma-separated usernames from the template's assignees: field>" \
-CcMentions "@user1 @user2" \
-OutputPath artifacts/docs/breakingChanges/pr-comment.md-Labels and -IssueAssignees come from the dotnet/docs template captured in
Step 4 (e.g. -Labels "breaking-change", -IssueAssignees "gewarren").-CcMentions is built from the runtime PR's assignee list (Step 1 metadata),
prefixing each GitHub username with @ and separating with spaces. These are
used for the /cc notification line.The script:
https://github.com/dotnet/docs/issues/new?... link that opens
a blank markdown editor (not the structured form) with the title, labels, and
assignee pre-filled.<details> block for the user to copy-paste into the opened
editor.When running interactively (not in dry-run mode), post the contents of
artifacts/docs/breakingChanges/pr-comment.md as a comment on the original
dotnet/runtime PR using GitHub tools.
When running in automated (gh-aw) mode, use the add_comment safe-output tool to post the comment.
When in dry-run mode or when the user has not explicitly asked to comment,
skip posting — the two files under artifacts/docs/breakingChanges/ are the
outputs for review.
The Build-IssueComment.ps1 script includes the standard AI disclosure note
and the email reminder to the .NET Breaking Change Notifications alias in the
generated comment. No additional action is needed.
If the user asks for a draft or review before publishing, or if you are uncertain about any aspect of the documentation:
When the user has not explicitly asked to create the issue, default to draft mode.
If the user provides a GitHub search query or asks to process multiple PRs:
| Problem | Solution |
|---|---|
No area-* label on PR | Ask the user to add one, or ask which area applies |
| Version detection script fails | Inspect release branches manually: gh api repos/dotnet/runtime/branches --paginate --jq '.[].name' and find the highest milestone branch (release/<M>.<m>-preview<N>, release/<M>.<m>-rc<N>, or release/<M>.<m>); a change on main ships in the next milestone (Preview N+1, or RC 1 after the final Preview, or GA after the final RC) |
| PR not yet merged | Breaking change docs are for merged PRs only — inform the user |
| Existing docs issue found | Report the existing issue URL and stop |
| Cannot determine affected APIs | Review the diff carefully; list the public types/methods in changed files |
| Workflow not triggering | Ensure gh aw compile was run and .lock.yml is committed |
| AI output needs review | Check technical accuracy of before/after behavior, API list completeness, and migration guidance |
ba10a6e
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.