# backport-pr

> Claude/Codex skill by [@vercel](https://omgskills.com/library/vercel/index.md) · 142k stars · Updated 2026-08-17

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.

Tags: blog, browser, compiler, components, hybrid, nextjs, node, react, server-rendering, ssg, static, static-site-generator, universal, vercel

## Install

```sh
git clone https://github.com/vercel/next.js /tmp/next.js && ln -s /tmp/next.js/.agents/skills/backport-pr ~/.claude/skills/backport-pr
```

## From README

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 Inspect the current worktree before changing branches: Preserve unrelated user changes. Do not overwrite, reset, or stash them without the user's consent. Sync the source and target branches: 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.

## Links

- HTML page: https://omgskills.com/library/vercel/next.js/dot-agents/skills/backport-pr/
- GitHub: https://github.com/vercel/next.js
- Author: [@vercel](https://omgskills.com/library/vercel/index.md)

## More from this repo

- [authoring-skills](https://omgskills.com/library/vercel/next.js/dot-agents/skills/authoring-skills/index.md) — How to create and maintain agent skills in .agents/skills/.
   - [@vercel](https://omgskills.com/library/vercel/index.md) · 142k stars
- [create-pr](https://omgskills.com/library/vercel/next.js/dot-agents/skills/create-pr/index.md) — Used to create Git branches, commits, pushes, and GitHub pull requests for Next.js.
   - [@vercel](https://omgskills.com/library/vercel/index.md) · 142k stars

## More skills by this author

- [turborepo](https://omgskills.com/library/vercel/turbo/turborepo/index.md) — Configure and troubleshoot Turborepo repositories.
   - [@vercel](https://omgskills.com/library/vercel/index.md) · 31k stars
