create-pr

A workflow for turning local Next.js code changes into a GitHub pull request, including the Git branch and commit steps.

In plain words
What is it for?
Use it to create or confirm a branch, commit and push selected changes, and open a regular or draft pull request.
Why use it?
It removes the need to remember the Git and GitHub commands and helps handle pull-request templates and common creation errors.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/vercel/next.js/create-pr
Any agent
npx skills add vercel/next.js --skill create-pr
Clone the repo
git clone --depth 1 https://github.com/vercel/next.js

Made for: Claude Code, Codex.

Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 903 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00083 $0.00903
Opus 5 $0.00042 $0.00451
Sonnet 5 $0.00017 $0.00181
Haiku 4.5 $0.00008 $0.00090

Measured yesterday against content hash 56bd9a076cf8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

create-pr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/create-pr/SKILL.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 codex/<short-topic>
    

    Use the codex/ prefix 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

Use this PR body format:

## Summary

<what changed and why>

## Verification

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

<!-- NEXT_JS_LLM -->

Read the full file on GitHub · 120 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 120 lines · 83 tokens per session scan A 56bd9a076cf8

Subscribe to this mod's changes

create-pr is a skill published in the GitHub repository vercel/next.js (142,020 stars, last pushed yesterday), licensed MIT. It adds 83 tokens to every session and 903 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.