pr-summary — Claude Code command: what it does, how to install
pr-summary reviews the current branch against main and drafts a pull request body with changed files, breaking changes, and a test checklist.
no license ★ 6,091 updated 2026-01-06
.claude/commands/pr-summary.mdWhat pr-summary does
This slash command inspects the current branch against main. It reads the commit list with git log main..HEAD --oneline, then checks diff statistics through git diff main...HEAD --stat.
The result is a Markdown pull request body with a short overview, notable file changes, possible breaking changes, and testing notes. Its tool access is limited to Bash(git:*), so the workflow is built around Git commands.
The base branch is hard-coded as main; a project using another base branch will produce a different review range. In Claude Code, place the command at .claude/commands/pr-summary.md.
What it helps with
- review commits on the current branch
- list changed files and diff statistics
- flag breaking changes in a pull request
- draft a testing checklist
- format a pull request body in Markdown
Example prompts for the agent
- Run
/pr-summaryfor the current branch. - Use
/pr-summaryto draft a pull request description from the changes againstmain. - Create a Markdown pull request body with a test plan using
/pr-summary.
How to install pr-summary
Manually: put the files in place
.claude/commands/pr-summary.mdCall it with /pr-summary. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/pr-summary.mdCall it with /prompts:pr-summary. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/pr-summary.prompt.mdManually: put the files in place
.gemini/commands/pr-summary.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about pr-summary
How do I install pr-summary in Claude Code?
Create .claude/commands/pr-summary.md and place the command content in that file.
What does pr-summary do?
It reviews commits and diff statistics for the current branch against main, then drafts a Markdown pull request body.
Which base branch does pr-summary use?
It uses main through git log main..HEAD --oneline and git diff main...HEAD --stat. A different project base branch will change the comparison range.