Index of every page on this site: llms.txt
All skills
vercel avatar

/create-pr

@495cbfa official
by vercelvercel/next.js144k stars
32,812
Run it yourself

Create Git branches, commits, pushes, and GitHub pull requests for Next.js. Use when the user asks to create a branch, commit current changes, open a PR or draft PR, publish a pull request, or recover from gh pr create / PR template issues. Covers .github/pull_request_template.md, --body formatting, <agent-name>/ branch names, and Codex app git directives.

  • 1 file
  • 4.1 KB
  • Updated 5 days ago
  • GitHub
Use this Skill: https://skilld.dev/gh/vercel/next.js/create-pr

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈92 tokens for metadata: the name and description. ≈939 when used: this file.

Description uses 4.6% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈370 characters, or 4.6%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Create PR

Use this skill when turning local work into a GitHub pull request.

Fork PRs vs Branch PRs

Before writing a PR description, check whether this is a branch PR (the branch lives in vercel/next.js) or a fork PR (an external contribution from a fork). You may write full descriptions for branch PRs, but not for fork PRs — inform the user, offer to review their description or provide technical details, and give them the GitHub URL to create the PR themselves. See "GitHub Pull Requests and Issues" in AGENTS.md for the full policy.

Workflow

  1. Inspect the current state before mutating Git:

    git status --short
    git branch --show-current
    git diff -- <paths>

    Stage only files that belong to the requested change. Preserve unrelated user changes.

  2. Create or confirm the branch:

    git switch -c <agent-name>/<short-topic>

    Prefix the branch with your agent's name as a single lowercase word, such as codex/, claude/, or fleet/ (e.g. claude/<short-topic>), unless the user asks for a different name. If a .git/*lock or Operation not permitted error appears, rerun the same Git command with sandbox escalation. Do not assume a branch namespace conflict until checking refs with git branch --list, git show-ref, or git for-each-ref.

  3. Validate and commit:

    git add <paths>
    git diff --cached --check
    git commit -m "<concise message>"

    Keep commit messages concise and do not add generated-tool or co-author footers.

  4. Push the branch:

    git push -u origin <branch>
  5. Create the PR as a draft unless the user explicitly asks otherwise:

    gh pr create --draft --base canary --head <branch> --title "<title>" --body '<body>'

    For this repo, prefer canary as the base branch. If GitHub network access fails in the sandbox, rerun with escalation.

PR Body

Follow the "PR Descriptions" section in AGENTS.md: the .github/pull_request_template.md structure (What? / Why? / How?, issue links) plus a Verification section. Use this PR body format:

### What?

<what changed>

### Why?

<motivation>

### How?

<implementation notes, if not obvious from the diff>

Fixes #<number>

### Verification

- `<command that passed>`
- Not run: `<command>` (`<reason>`)

<!-- NEXT_JS_LLM -->

The "what" should be explained from the end-user perspective or developer perspective. Only include implementation changes in "How?" if they're not obvious from the diff.

A "why" should be included if the change isn't self-explanatory, or if the motivation is not clear from the diff. Omitting the "why" should be used sparingly and only for small changes.

Do not include trivial verification commands that CI already covers (e.g. pnpm run build), but do include any manual verification steps. If the PR changes a test, you don't need to repeat the command to run that test. But if you used an existing test to validate some behavior didn't change, include that test.

Use --body with this filled content.

Recovery

  • If a PR may already exist, check before creating a duplicate:

    gh pr view --head <branch> --json url,isDraft,title
  • If approval is denied for gh pr create, report that the branch is pushed but the PR was not created, and provide the exact corrected command.

  • After successful Codex app Git actions, include the appropriate final-response directives for branch creation, staging, committing, pushing, and PR creation.

Related Skills

  • $pr-status-triage - Analyze CI failures and PR review feedback after the PR exists.
  • $gh-stack - Manage stacked branches and dependent pull requests.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 495cbfa. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 5 days ago
metadata
{
  "internal": true
}

README badge

README badge for vercel/next.js/create-pr