用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/microsoft/msquic --skill cherry-pick-to-release命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | cherry-pick-to-release |
| description | Cherry-pick a merged main-branch PR onto a MsQuic release branch (release/X.Y). |
You are helping a maintainer back-port a fix from main to one or more
MsQuic release branches (release/2.4, release/2.5, etc.).
This skill encodes the patterns the project uses.
The user asks to cherry-pick / back-port / "CP" a PR or commit from main
onto a release branch. Typical requests:
Before doing anything, make sure you know:
main (preferred) or a commit SHA on origin/main.release/2.4, release/2.5. If the
user is ambiguous (e.g. "to the release branches"), ask whether they want
one branch or both, and which.git push or gh pr create.If anything is missing, ask before proceeding.
[CP] <Original PR title> (#<original_pr_number>)
Examples actually used on the release branches:
[CP] Fix underflow in ACK frame parsing #5942 (→ PR #5943 on 2.5, #5944 on 2.4)[CP] Fix SAL annotation placement on function templates (#5895)[CP] Free AES 256 GCM algorithm handle on cleanup (#5526)[CP] Fix double deref in connection pool error path (#5597)When the same fix targets multiple release branches, the title is identical
across PRs; only the target branch differs. After squash-merge, GitHub
appends the new PR number, producing commits like
[CP] Fix underflow in ACK frame parsing #5942 (#5943) on the release
branch — this is expected and required (it makes traceability trivial).
Do not invent new prefixes; stick to [CP] unless asked.
Use the exact body of the original PR, verbatim, including the
## Description, ## Testing, and ## Documentation sections as the
original author wrote them. Do not rewrite, summarize, or augment them
with cherry-pick commentary.
No additions or modification of the original description is acceptable.
Project convention (observed on most recent cherry-pick PRs):
<user>/cp_<short_description>_<target_version>_copilot
The <short_description> is a snake_case summary of the fix, mirroring
prior branches like cp_conn_pool_deref, cp_free_aes_256_gcm_handle,
underflow_fix_cp.
Use one branch per target release branch (do not try to land both release branches from a single branch / PR).
(cherry picked from commit X) trailers — the project
doesn't use git cherry-pick -x; traceability comes from the PR title
containing the original PR number.Follow these steps in order. Do not skip a phase.
origin/main:
gh pr view <orig_pr> --repo microsoft/msquic --json mergeCommit,state,title,body,baseRefName
Verify state == MERGED and baseRefName == main. If not merged, stop and tell the user — never cherry-pick an unmerged change.origin/main:
git --no-pager log -1 --format="%H %s" <sha>
git --no-pager branch -r --contains <sha> | Select-String "origin/main"
Repeat for each target release branch.
git status). If not, stop and ask.git fetch origin --prune.git checkout -b <user>/cp_<short_desc>_2_5_copilot origin/release/2.5
git cherry-pick <commit_sha> (no -x).## Description so reviewers know what differs from main.Check whether the cherry-pick touches things that require regeneration. CI
will fail otherwise (check-clog.yml, check-dotnet.yml).
Trace / log macro changes (QuicTraceLogInfo, QuicTraceEvent,
etc., or anything under src/manifest/):
./scripts/update-sidecar.ps1
Commit any changes under src/generated/ and src/manifest/clog.sidecar as part of the same commit (or amend).
Public C API surface changes (anything under src/inc/, especially msquic.h):
./scripts/generate-dotnet.ps1
Commit any changes under src/cs/.
If neither applies, skip this phase.
Build and run tests locally before pushing. This is required for every
cherry-pick, regardless of whether the git cherry-pick was clean or
required conflict resolution. Do not skip this phase.
Build with the default TLS provider for the platform you're on:
./scripts/build.ps1 -Tls schannel # Windows
pwsh ./scripts/build.ps1 -Tls openssl # Linux
Run the tests that exercise the cherry-picked code. Use a
GoogleTest --Filter to keep the runtime short:
./scripts/test.ps1 -Tls schannel -Filter '<TestSuite>.<TestPattern>*'
At minimum, run:
TlsTest.* for src/platform/tls_*, ApiTest.* for src/inc/
surface changes, HandshakeTest.* for src/core/ handshake logic).If the build or the relevant tests fail on the release branch but
pass on main, stop and ask the user — do not push a broken
cherry-pick. Likely causes: missing prerequisite commits, API drift
between branches, or test infra changes that didn't get back-ported.
Capture the build and test outcome (pass/fail, number of tests run) to mention briefly when you ask for permission to push.
Stop here and show a summary of the cherry-pick to the user: original PR, target branch, branch name, PR title, build and test status. Confirm with the user before pushing. Then:
git push -u origin <user>/cp_<short_desc>_2_5_copilot
gh pr create --repo microsoft/msquic `
--base release/2.5 `
--head <user>/cp_<short_desc>_2_5_copilot `
--draft `
--title "[CP] <Original title> (#<orig_pr>)" `
--body-file <path_to_body.md>
--base must be the release branch (release/2.4, release/2.5, …), not main.Companion PR for release/2.4: #5944).Before telling the user the cherry-pick is ready:
--base is the correct release/X.Y branch (never main).[CP] <orig title> (#<orig_pr>) (or an explicitly approved variant).<user>/cp_<short_desc>_<X_Y>_copilot.scripts/update-sidecar.ps1 was run and generated files committed.src/inc/ public headers were touched → scripts/generate-dotnet.ps1 was run and generated files committed.main yet.git cherry-pick -x — the project doesn't include
(cherry picked from commit X) trailers in the final commit message.[BACKPORT 2.5]) — stick to
[CP] to stay consistent with the last ~2 years of cherry-pick PRs.Bump version to v2.5.X) are separate PRs done at
release time.