Agent skill · software engineering · vercel

backport-pr

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.

Why this skill is useful

Adds specific git commands and workflows for backporting Next.js PRs that the AI wouldn't reliably generate on its own.

What it needs

About 2k tokens when loaded. Last updated 2026-08-07. 141,663 stars on the source repository.

What this skill does

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: Preserve unrelated user changes. Do not overwrite, reset, or stash them without the user's consent. 2. Sync the source and target branches: 3. Identify the commit that landed the PR on canary: 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: 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: 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: Use a concise PR body: Related Skills $create-pr - Create the branch commit, push it, and open the draft PR. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills vercel/backport-pr

View the source on GitHub

Browse the @skills marketplace