backport-pr
预览截图
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "backport-pr":https://skillpi.com/zh/skills/deepskill-82bc07bf2d4fe1a55aa442caabafa6c76d81f97fa58c4425640abc3419738369。安装前核对上游来源和版本:https://github.com/vercel/next.js。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
名称: backport-pr 用途: 将已合并的 Next.js 拉取请求从 canary 分支向后移植到之前的发布分支(如 next-16-2)。 适用场景: 用户要求向后移植、挑选提交或从 PR 编号向旧版 Next.js 打开向后移植 PR 的场景。 覆盖流程: 查找已合并 PR 的提交、从目标发布分支创建向后移植分支、从 canary 分支挑选提交、验证以及以发布分支为基准打开 PR 的完整流程。 元数据: 内部使用: true
介绍来源: third_party · vercel · 1.0.0 参考来源
SkillPi 解读
- 能完成的任务
- 当用户要求将一个已合并的 Next.js PR 移植到发布分支时使用此技能 。
- 适合谁
- 来源文档未说明。
- 输入和输出
- 需要一个 PR 编号和一个目标释放分支, 例如 `next-16-2` 。如果目标分支没有提供,而且无法从用户的请求中自信地推断,请在变换 git 状态前询问。 将目标分支视为变量; 不使用硬码 `next-16-2` 但用户明确要求时除外.
- 软件、账号及付费要求
- 来源文档未说明。
- 限制与区别
- 来源文档未说明。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: backport-pr
description: >
Backport a merged Next.js pull request from canary to a previous release
branch such as next-16-2. Use when the user asks to backport, cherry-pick,
or open a backport PR from a PR number to an older Next.js version. Covers
finding the merged PR commit, creating a backport branch from the target
release branch, cherry-picking from canary, validating, and opening the PR
with the release branch as the base.
metadata:
internal: trueBackport PR
Use this skill when a user asks to backport a merged Next.js PR to a release branch.
Inputs
- Require a PR number and a target release branch, for example
next-16-2. - If the target branch is not provided and cannot be inferred confidently from the user's request, ask before mutating git state.
- Treat the target branch as variable; do not hard-code
next-16-2except when the user explicitly asks for it.
Workflow
-
Inspect the current worktree before changing branches:
git status --short git branch --show-currentPreserve unrelated user changes. Do not overwrite, reset, or stash them without the user's consent.
-
Sync the source and target branches:
git fetch origin canary:refs/remotes/origin/canary <target-branch>:refs/remotes/origin/<target-branch> -
Identify the commit that landed the PR on
canary:gh pr view <pr-number> --repo vercel/next.js --json number,title,state,url,mergeCommit,baseRefName,headRefName git log origin/canary --oneline --fixed-strings --grep="(#<pr-number>)"Prefer
mergeCommit.oidwhen the PR isMERGEDand the commit is contained inorigin/canary. If GitHub does not return a usable merge commit, use thegit log --grepresult and verify the commit subject references the PR number. -
Create the backport branch from the release branch:
git switch -c backport-<pr-number>-to-<target-branch> origin/<target-branch>After switching branches in this repo, run
pnpm build-allbefore Next.js integration tests unless the user explicitly limits the task to preparing the cherry-pick or PR. -
Cherry-pick the landed commit with provenance:
git cherry-pick -x <merged-commit-sha>Resolve conflicts in favor of preserving the release branch's compatibility constraints. If the cherry-pick is empty, verify whether the change is already present on the release branch and report that instead of opening a duplicate PR.
-
Verify with the narrowest commands that cover the touched files. Prefer focused tests,
pnpm typesfor TypeScript-only risk, and the relevant integration test mode for behavior changes. -
Open the backport PR using
$create-pr.Override the normal
$create-prbase branch: use--base <target-branch>, notcanary. Keep the PR as a draft unless the user explicitly asks otherwise.
PR Shape
Use a title like:
[backport] <original PR title>
Use a concise PR body:
Backports <original PR title/link> to `<target-branch>`.
<!-- NEXT_JS_LLM -->
Related Skills
$create-pr- Create the branch commit, push it, and open the draft PR.$pr-status-triage- Check CI failures or review feedback after the PR exists.
当前收录版本
1.0.0
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 针对 Next.js 多版本维护中的向后移植需求,具有明确的工程实用价值
- 适用于开发者将已合并的 PR 从 canary 分支移植到旧版本发布分支
亮点
- 触发描述清晰,覆盖用户要求向后移植、挑选提交等典型场景
- 明确指定了输入参数(PR 编号和目标分支),边界清晰
待提升项
-
缺少 When to Use 显式章节 原报告严重程度:轻微
文档开头有使用说明,但未使用标准的 When to Use 章节标题
改进建议:建议添加显式的 When to Use 章节以提升规范性
-
文档过长 原报告严重程度:轻微
主文档约150行,超过推荐的500字符限制
改进建议:考虑将部分详细说明移至附录或拆分为子章节
亮点
- 文档结构清晰,包含 Inputs、Workflow、PR Shape 等完整章节
- 提供了详细的命令行示例和操作流程
亮点
- 工具来源明确(git、gh CLI),参数使用正确
- 覆盖了主要异常情况处理(cherry-pick 冲突、空提交验证)
- 在切换分支前有状态检查,避免意外覆盖用户更改
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
来源文档未说明。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。