Skip to content

commandGit and releases

Pull Request Description

Drafts a pull request title and description from the diff between your branch and the base branch, ready to paste into GitHub.

npx workspacetemplates add pr-description --tool claude-code

Writes 1 file to .claude/commands/

.claude/commands/pr-description.md14 lines · 1.1 KBFile
---
description: Drafts a pull request title and description from the diff between your branch and the base branch, ready to paste into GitHub.
argument-hint: "[base branch, default main]"
---

Write a pull request description for the current branch. Base branch: $ARGUMENTS (use main if empty).

1. Run `git log --oneline <base>..HEAD` and `git diff <base>...HEAD --stat`, then read the diff of the files that carry the logic. Skip lockfiles and generated files.
2. Check for a pull request template in .github/ and follow its headings if one exists.
3. Write a title under 70 characters that names the outcome, not the activity.
4. Write these sections: **Summary** (two or three sentences on what and why), **Changes** (bullets grouped by area, not by commit), **How to test** (exact commands or clicks, with the expected result), **Risk** (migrations, config, behavior changes, rollback).
5. Mark anything you cannot know from the code, such as the ticket or screenshots, as `Fill in:` instead of guessing.

Print the result in one Markdown block. Ask whether to adjust it. Do not run `gh pr create` unless the user then asks for it.

What it does

Reviewers decide how carefully to read a pull request in the first few lines. This command builds a description from the real diff and commit list, so it covers what changed, why and how to check it.

It does not open the pull request. You get text to review, and anything it could not know, such as the ticket or the reason for a trade-off, is marked for you to fill in.

Example

you › /pr-description main

agent › Title: Add retry with backoff to webhook delivery

Summary: Failed webhook calls were dropped after one try. They now retry five times with exponential backoff.

How to test: run npm test -- webhooks, then point WEBHOOK_URL at a closed port and watch five attempts in the log.

Risk: adds a webhook_attempts table (migration 0042).

Questions

Does it create the pull request?
No. It prints the text. Ask it to run gh pr create afterward if you want that.
Can it use my repository template?
Yes. It looks for a template under .github and keeps its headings.
  • Branch Cleanup

    CommandGit and releases

    Free
  • Changelog Entry

    CommandGit and releases

    Free
  • Cherry Pick Fix

    CommandGit and releases

    Free
  • Commit Message

    CommandGit and releases

    Free