backport-pr

Name: backport-pr Purpose: Backport merged Next.js pull requests from the canary branch to prior release branches (e.g., next-16-2). Applicable scenarios: When a user requests a backport, cherry-pick commits, or open a backport PR against an older Next.js release using a PR number. Process covered: Finding the commits from the merged PR, creating a backport branch from the target release branch, cherry-picking commits from canary, verification, and opening a PR based on the release branch. metadata: internal use: true

Last repository push
GitHub Stars
143,631
Forks
32,732
Issues / PRs
4,112

Screenshots

A demonstration from skillπ Lab

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "backport-pr" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-82bc07bf2d4fe1a55aa442caabafa6c76d81f97fa58c4425640abc3419738369. Verify the upstream source and version against https://github.com/vercel/next.js before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Name: backport-pr Purpose: Backport merged Next.js pull requests from the canary branch to prior release branches (e.g., next-16-2). Applicable scenarios: When a user requests a backport, cherry-pick commits, or open a backport PR against an older Next.js release using a PR number. Process covered: Finding the commits from the merged PR, creating a backport branch from the target release branch, cherry-picking commits from canary, verification, and opening a PR based on the release branch. metadata: internal use: true

0 Downloads

Introduction source: third_party · vercel · 1.0.0 Reference

SkillPi interpretation

Tasks
Use this skill when a user asks to backport a merged Next.js PR to a release branch.
Audience
Not specified in the source documentation.
Inputs and outputs
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-2` except when the user explicitly asks for it.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
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: true

Backport 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-2 except when the user explicitly asks for it.

Workflow

  1. Inspect the current worktree before changing branches:

    git status --short
    git branch --show-current

    Preserve unrelated user changes. Do not overwrite, reset, or stash them without the user's consent.

  2. Sync the source and target branches:

    git fetch origin canary:refs/remotes/origin/canary <target-branch>:refs/remotes/origin/<target-branch>
  3. 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.oid when the PR is MERGED and the commit is contained in origin/canary. If GitHub does not return a usable merge commit, use the git log --grep result and verify the commit subject references the PR number.

  4. 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-all before Next.js integration tests unless the user explicitly limits the task to preparing the cherry-pick or PR.

  5. 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.

  6. Verify with the narrowest commands that cover the touched files. Prefer focused tests, pnpm types for TypeScript-only risk, and the relevant integration test mode for behavior changes.

  7. Open the backport PR using $create-pr.

    Override the normal $create-pr base branch: use --base <target-branch>, not canary. 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.

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value78/100

Highlights

  • 针对 Next.js 多版本维护中的向后移植需求,具有明确的工程实用价值
  • 适用于开发者将已合并的 PR 从 canary 分支移植到旧版本发布分支
Trigger Precision88/100

Highlights

  • 触发描述清晰,覆盖用户要求向后移植、挑选提交等典型场景
  • 明确指定了输入参数(PR 编号和目标分支),边界清晰
Structure and Standards75/100

Areas to improve

  • 缺少 When to Use 显式章节 Reported severity: Minor

    文档开头有使用说明,但未使用标准的 When to Use 章节标题

    Recommendation: 建议添加显式的 When to Use 章节以提升规范性

  • 文档过长 Reported severity: Minor

    主文档约150行,超过推荐的500字符限制

    Recommendation: 考虑将部分详细说明移至附录或拆分为子章节

Highlights

  • 文档结构清晰,包含 Inputs、Workflow、PR Shape 等完整章节
  • 提供了详细的命令行示例和操作流程
Execution Reliability85/100

Highlights

  • 工具来源明确(git、gh CLI),参数使用正确
  • 覆盖了主要异常情况处理(cherry-pick 冲突、空提交验证)
  • 在切换分支前有状态检查,避免意外覆盖用户更改
Evidence Verifiability (mean of the first four)82/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.