Skills

/pr-description: pull request description from the branch diff

A Claude Code slash command that reads every commit and the full diff on your branch and writes a reviewer-friendly PR description: summary, motivation, notable changes, how to test, and risk and rollback.

Skill in Engineering by AISkillHub Library

What it does

Reviewers need to know why a change exists, where to look first, and how to check it works. `/pr-description` produces that from the branch itself rather than from memory.

**What it does** - Finds the merge base with your base branch (default `main`, or the one you pass) and reads the commit list and the full diff. - Writes a description with fixed sections: **Summary**, **Why**, **Changes** (grouped by area, with the files a reviewer should read first), **How to test** (concrete steps or commands), **Risk and rollback**, and **Screenshots** only when UI files changed (as a reminder, since it cannot take them). - Calls out migrations, new environment variables, config or feature flags, dependency changes and breaking API changes in their own bullet list, because these are the things reviewers most often miss. - Uses a `.github/pull_request_template.md` if the repository has one, filling in its headings instead of using the default layout.

**What it will not do** It does not invent ticket numbers, metrics, or test results. If it did not run the tests, the "How to test" section lists commands rather than claiming they pass. It does not create or edit the PR unless you ask; when you do, it uses the GitHub CLI (`gh pr create --body-file` or `gh pr edit --body-file`).

**Example output (excerpt)** ``` ## Summary Adds per-workspace rate limits to the public API.

## Needs attention - New env var `RATE_LIMIT_REDIS_URL` (required in production) - Migration `2025_02_03_add_rate_limit_overrides` (new table, no locks on existing tables) ```

How to use it

1. Save the file below as `.claude/commands/pr-description.md`. 2. Push or at least commit your branch work. 3. Run `/pr-description` (compares with `main`) or `/pr-description develop` to compare with another base. 4. Copy the Markdown, or reply "create the PR" / "update the PR" to have Claude run the `gh` command (requires the GitHub CLI to be installed and authenticated).

Files

Save each file at the path shown, relative to your project root.

  • .claude/commands/pr-description.md2.4 KB

More skills

See all