Official agent skill

Backport PR

by vercel in vercel/next.js

Backport a merged Next.js pull request from canary to a previous release branch such as next-16-2.

OfficialMITAuto-check: warningsDevelopment

Install Backport PR

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add vercel/next.js --skill backport-pr -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vercel/next.js backport-pr --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vercel/next.js.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/backport-pr .claude/skills/backport-pr && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
backport-pr
GitHub stars
143k
Token cost
~833 tokens
SKILL.md length
322 words
Files
1
Skills in repo
27
Repo updated
First seen
Licence
MIT

At a glance

Backport a merged Next.js pull request from canary to a previous release branch such as next-16-2.

  • Works in 7 steps: Inspect the current worktree before… → Sync the source and target branches → Identify the commit that landed the PR… → …
  • The user asks to backport
  • SKILL.md covers Inputs, Workflow, PR Shape and Related Skills
  • Calls git, pnpm and gh

What it does

Backport PR is an agent skill from vercel/next.js, published by the product's own GitHub organization. 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.

Its SKILL.md is about 830 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Deployment and Pull requests. It works with Next.js. The licence is MIT.

When your agent uses it

  • The user asks to backport
  • Open a backport PR from a PR number to an older Next.js version

Example prompts

  • “/backport-pr”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Inspect the current worktree before changing branches
  2. Sync the source and target branches
  3. Identify the commit that landed the PR on canary
  4. Create the backport branch from the release branch
  5. Cherry-pick the landed commit with provenance
  6. Verify with the narrowest commands that cover the touched files. Prefer
  7. Open the backport PR using $create-pr.

What it can do on your machine

Read from SKILL.md and the folder at commit a32ddfd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • pnpm
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, pnpm and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Backport PR loads about 833 tokens when it runs. Until then it costs about 105 tokens; SKILL.md has 322 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~105
When it runs · the whole SKILL.md, loaded when a task matches
~833

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • WarningContains instruction-override wording (e.g. “without asking the user”)SKILL.md:37
    without the user's consent.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vercel/next.js at commit a32ddfd, republished under its MIT licence (© vercel). 322 words, ~833 tokens.

Download SKILL.mdSave it as .claude/skills/backport-pr/SKILL.md (or your agent's skills folder).
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:

    bash
    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:

    bash
    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:

    bash
    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:

    bash
    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:

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

Show full SKILL.md (36 more words)Show less

PR Shape

Use a title like:

text
[backport] <original PR title>

Use a concise PR body:

markdown
Backports <original PR title/link> to `<target-branch>`.

<!-- NEXT_JS_LLM -->
  • $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.

© vercel, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/backport-pr of vercel/next.js.

Open the folder on GitHubat commit a32ddfd

Compare with similar skills

Backport PR next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Backport PR compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Backport PR this skillvercel/next.js143k—~833Automated safety check: WarnMIT
LobeHub Version Releaselobehub/lobehub83k—~1.2kAutomated safety check: PassCustom licence
Proceedatelier-fashion/adlc-toolkit171—~14kAutomated safety check: WarnMIT
Vercel Deploy Previewjeremylongshore/tons-of-skills-marketplace2.8k—~1.6kAutomated safety check: PassMIT
Docs AuthoringTracecatHQ/tracecat3.8k—~3.1kAutomated safety check: NotesAGPL-3.0
Create Vechain Dappvechain/x-app-template450—~1.8kAutomated safety check: PassMIT

Similar skills

  • Guides the release PR flow, the CI rules that tag a release and the writing of GitHub Release notes for a repo that develops on a canary branch.

    83k GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Proceed

    atelier-fashion/adlc-toolkit

    End-to-end ADLC pipeline that takes a requirement from spec through to deployed.

    171 GitHub stars~14k tokensUpdated 10 days ago
    DevelopmentAuto-check: warnings
  • Vercel Deploy Preview

    jeremylongshore/tons-of-skills-marketplace

    Create and manage Vercel preview deployments for branches and pull requests.

    2.8k GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Docs Authoring

    TracecatHQ/tracecat

    A skill your agent uses when adding or updating documentation pages in an existing docs site.

    3.8k GitHub stars~3.1k tokensUpdated today
    DevelopmentAuto-check: notes
  • Create Vechain Dapp

    vechain/x-app-template

    Scaffold a VeChain dApp with Next.js, VeChain Kit, Chakra UI v3, and GitHub Pages deployment.

    450 GitHub stars~1.8k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • PR Review

    cdklabs/cdk-nextjs

    Review the current PR branch and fix the findings in rounds until reviews come back clean.

    111 GitHub stars~2.4k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from vercel/next.js

All 27 skills in this repo
  • Gh Stack

    vercel/next.js

    Official

    Manages stacked PRs and splits multi-part work into reviewable branches with gh-stack.

    143k GitHub starsUsed in 7 repos~2.3k tokens
    Auto-check passed
  • Sandbox Bench

    vercel/next.js

    Official

    Benchmark React or Next.js changes on Vercel Sandbox VMs with paired A/B statistics: react PR/commit vs base, or Next.js PR/commit vs base, measured end-to-end through the bench/render-pipeline app…

    143k GitHub stars~4.1k tokensUpdated today
    Auto-check passed
  • Next Dev Loop

    vercel/next.js

    Official

    Verify Next.js runtime behavior after editing app code. An agent skill from vercel/next.js.

    143k GitHub starsUsed in 9 repos~2.3k tokens
    Auto-check passed
  • Docs Diagrams

    vercel/next.js

    Official

    Draw diagrams for the Next.js docs in the style of the ones already published there: the light/dark PNGs an mdx references with <Image srcLight="/docs/light/<name.png" srcDark="/docs/dark/<name.png".

    143k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Official

    Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces.

    143k GitHub starsUsed in 6 repos~8.3k tokens
    Auto-check passed
  • React Sync

    vercel/next.js

    Official

    Build local React changes in the bundle variants consumed by Next.js, sync them into a local Next.js checkout, and test the resulting integration.

    143k GitHub stars~486 tokensUpdated today
    Auto-check passed

Works with

Questions about Backport PR

What does Backport PR do?

Backport a merged Next.js pull request from canary to a previous release branch such as next-16-2. js, published by the product's own GitHub organization.js pull request from canary to a previous release branch such as next-16-2.

When should I use Backport PR?

Backport PR fits situations like: the user asks to backport; open a backport PR from a PR number to an older Next.js version.

How do I install Backport PR in Claude Code?

Run `npx skills add vercel/next.js --skill backport-pr -a claude-code`. Or copy the skill folder (.agents/skills/backport-pr in vercel/next.js) into .claude/skills/backport-pr in your project. Claude Code loads it when a task matches its description.

How do I install Backport PR in Codex?

Run `npx skills add vercel/next.js --skill backport-pr -a codex`. Or copy the skill folder (.agents/skills/backport-pr in vercel/next.js) into .agents/skills/backport-pr in your project. Codex loads it when a task matches its description.

Can I use Backport PR in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vercel/next.js --skill backport-pr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/backport-pr, .gemini/skills/backport-pr, .github/skills/backport-pr and .opencode/skills/backport-pr in your project.

What does Backport PR need to run?

Going by SKILL.md and its folder, Backport PR needs the command-line tools its instructions call (git, pnpm and gh).

Does Backport PR access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Backport PR safe to install?

Our automated static check of SKILL.md flagged 1 warning(s): contains instruction-override wording (e.g. “without asking the user”). Read the flagged lines before installing; the check is not a guarantee either way.

What licence does Backport PR use?

Backport PR is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Backport PR use?

About 833 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Backport PR?

Skills that share tags, products or a category with Backport PR: LobeHub Version Release (lobehub/lobehub, 83k stars), Proceed (atelier-fashion/adlc-toolkit, 171 stars), Vercel Deploy Preview (jeremylongshore/tons-of-skills-marketplace, 2.8k stars) and Docs Authoring (TracecatHQ/tracecat, 3.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Backport PR?

vercel (a GitHub organization, an official publisher) maintains it in vercel/next.js, which has 143,241 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on October 8, 2026.

Source: vercel/next.js on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.