Agent Skills › microsoft/rayfin › hotfix-release

hotfix-release

GitHub

用于创建热修复发布分支,支持NuGet和npm包。通过获取标签、计算补丁版本、创建分支、Cherry-pick提交、更新版本号并推送草稿PR,自动化完成紧急修复流程。

.github/skills/hotfix-release/SKILL.md microsoft/rayfin

Trigger Scenarios

hotfix patch release cherry-pick to release hotfix nuget hotfix npm release branch fix backport fix

Install

npx skills add microsoft/rayfin --skill hotfix-release -g -y
More Options

Non-standard path

npx skills add https://github.com/microsoft/rayfin/tree/main/.github/skills/hotfix-release -g -y

Use without installing

npx skills use microsoft/rayfin@hotfix-release

指定 Agent (Claude Code)

npx skills add microsoft/rayfin --skill hotfix-release -a claude-code -g -y

安装 repo 全部 skill

npx skills add microsoft/rayfin --all -g -y

预览 repo 内 skill

npx skills add microsoft/rayfin --list

SKILL.md

Frontmatter
{
    "name": "hotfix-release",
    "license": "MIT",
    "metadata": {
        "author": "rayfin",
        "version": "1.0"
    },
    "description": "Create a hotfix release branch, cherry-pick commits, bump the version, and open a draft PR. Use when: hotfix, patch release, cherry-pick to release, hotfix nuget, hotfix npm, release branch fix, backport fix."
}

Create a hotfix release for a previously published NuGet or npm package.

Input: The user provides:

  • Package type: nuget or npm
  • Version to patch: The published version to hotfix (e.g., 0.0.45 for NuGet, 1.31.0 for npm)
  • Commits to cherry-pick: One or more commit SHAs, PR numbers, or branch names containing the fix

If any input is missing, use the AskUserQuestion tool to collect it:

  • If package type is unclear, ask: nuget or npm?
  • If version is missing, list recent tags with git tag -l "nuget/v*" --sort=-version:refname | head -10 (or npm/v*) and let the user pick
  • If commits are missing, ask for the commit SHAs or PR numbers to cherry-pick

Steps

1. Validate the tag exists

git fetch origin --tags
git rev-parse "{{type}}/v{{version}}" >/dev/null 2>&1

If the tag doesn't exist, stop and tell the user. List available tags for that package type to help them.

2. Determine the hotfix version

NuGet: Use 4-part versioning. Check for existing hotfix tags:

git tag -l "nuget/v{{version}}.*" --sort=-version:refname
  • If no prior hotfix: new version is {{version}}.1
  • If {{version}}.N exists: new version is {{version}}.N+1

npm: Use semver patch bump. Parse the version parts and increment patch:

  • 1.31.0 → 1.31.1
  • If npm/v1.31.1 exists, use 1.31.2, etc.

Announce the computed hotfix version to the user before proceeding.

3. Create the release branch

git checkout -b release/{{type}}-v{{version}} {{type}}/v{{version}}
git push origin release/{{type}}-v{{version}}

4. Create the fix branch and cherry-pick

git checkout -b fix/hotfix-{{type}}-v{{hotfix_version}} release/{{type}}-v{{version}}

Cherry-pick each provided commit:

git cherry-pick {{commit_sha}}

If a cherry-pick conflicts:

  1. Show the conflicting files to the user
  2. Ask them to resolve
  3. After resolution, run git cherry-pick --continue

5. Bump the version

NuGet: Edit packages/host/Version.props — set <VersionPrefix> to the hotfix version:

<VersionPrefix>{{hotfix_version}}</VersionPrefix>

npm: Edit packages/typescript-sdk/core/package.json and any other affected packages — set "version" to the hotfix version. Rush version policies apply to all packages in the typescript-sdk policy, so update each affected package.

6. Commit the version bump

git add -A
git commit -m "chore(host): bump {{type}} version to {{hotfix_version}} for hotfix" --no-verify

7. Push and create a draft PR

git push origin fix/hotfix-{{type}}-v{{hotfix_version}}

Create a draft PR targeting release/{{type}}-v{{version}} (not main):

  • Title: fix({{type}}): hotfix v{{hotfix_version}}
  • Body: List the cherry-picked commits and the version bump
  • Draft: true

8. Summary

After creating the PR, print a summary:

✅ Hotfix prepared

  Package type:    {{type}}
  Base version:    {{version}}
  Hotfix version:  {{hotfix_version}}
  Release branch:  release/{{type}}-v{{version}}
  Fix branch:      fix/hotfix-{{type}}-v{{hotfix_version}}
  PR:              {{pr_url}}

Next steps:
  1. Review and merge the PR
  2. Queue the rayfin.official pipeline on release/{{type}}-v{{version}}
     - Set Publish{{Type}}: true
  3. Pipeline will publish and tag {{type}}/v{{hotfix_version}}

Error Handling

  • Tag not found: List available tags and ask the user to pick the correct version
  • Cherry-pick conflict: Show conflicting files, let the user resolve, then continue
  • Branch already exists: Ask the user if they want to use the existing branch or create a new one
  • Version already tagged: Increment to the next available revision and confirm with the user

Version History

  • 0979439 Current 2026-10-18 22:48

Same Skill Collection

.github/skills/launch-vscode-extension/SKILL.md
.github/skills/openspec-apply-change/SKILL.md
.github/skills/openspec-archive-change/SKILL.md
.github/skills/openspec-bulk-archive-change/SKILL.md
.github/skills/openspec-continue-change/SKILL.md
.github/skills/openspec-explore/SKILL.md
.github/skills/openspec-ff-change/SKILL.md
.github/skills/openspec-new-change/SKILL.md
.github/skills/openspec-onboard/SKILL.md
.github/skills/openspec-sync-specs/SKILL.md
.github/skills/openspec-verify-change/SKILL.md
.github/skills/privacy-dfd/SKILL.md
.github/skills/rayfin-cli-ux/SKILL.md
.github/skills/react-best-practices/SKILL.md
.github/skills/run-cli-e2e-locally/SKILL.md
.github/skills/vscode-react-webview-architecture/SKILL.md
.github/skills/vscode-webview-trpc-messaging/SKILL.md
samples/data-app/.agents/skills/app-design/SKILL.md
samples/data-app/.agents/skills/app-validation/SKILL.md
samples/data-app/.agents/skills/dax-authoring/SKILL.md
samples/data-app/.agents/skills/fabric-cli/SKILL.md
samples/data-app/.agents/skills/fabric-sdk/SKILL.md
samples/data-app/.agents/skills/playwright-cli/SKILL.md
samples/data-app/.agents/skills/query-design/SKILL.md
samples/data-app/.agents/skills/schema-discovery/SKILL.md
samples/data-app/.agents/skills/visuals/SKILL.md
.github/skills/react-clean-architecture/SKILL.md
plugin/skills/rayfin-getting-started/SKILL.md
skills/rayfin-getting-started/SKILL.md

Metadata

Files
0
Version
0979439
Hash
df63b089
Indexed
2026-10-18 22:48

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-22 23:27
浙ICP备14020137号-1