Slash command

/pr

Generates a pull-request title and body from every commit on the branch — not just the latest diff.

gitpull requestgithub
Install to
~/.claude/commands/pr.md
descriptionDraft a pull request title and body for the current branch.

Draft a PR for the current branch:

  1. Find the base branch (usually main). Run git log <base>..HEAD --oneline and git diff <base>...HEAD to see the FULL set of changes — every commit on the branch, not just the last one.
  2. Write:
    • Title — under 70 chars, imperative, scoped.
    • Summary — 1-3 bullets on what changed and why.
    • Test plan — a short checklist a reviewer can actually run.
  3. Output the title and body as plain markdown I can paste into GitHub. Do not run gh pr create unless I ask.

If the branch has no commits ahead of base, say so.

How to install

  1. Copy the code and save it to ~/.claude/commands/pr.md (user) or .claude/commands/pr-description.md (project).
  2. Commands hot-reload — it's available in the current session immediately.
  3. Run it by typing /pr-description in the prompt.
  4. Verify: type / and look for it in the command list.

← More slash commands