Generate comprehensive pull request descriptions that help reviewers understand code changes. Use when the user asks to "generate PR description", "create PR summary", "write PR intro", or needs help documenting their code changes for review. Analyzes git diffs or specified files to create structured descriptions covering why changes were made and what was implemented.
Generate clear, comprehensive pull request descriptions that help reviewers quickly understand your changes.
This skill analyzes code changes and generates structured PR descriptions with two key sections:
Choose the appropriate method based on user input:
Method A: Analyze Current Branch (Default)
git status to check current branchgit diff $(git merge-base HEAD main)...HEAD to get all changes since branch divergedgit log $(git merge-base HEAD main)..HEAD --oneline to see commit historyMethod B: User-Specified Files
Analyze the code changes to understand:
Analysis Tips:
Create a structured Markdown description with these sections:
Provide context that helps reviewers understand the motivation:
Keep it concise but informative - 2-4 sentences or bullet points typically suffice.
Describe the implementation in a way that aids review:
High-level summary (required):
Technical details (include when relevant):
Testing and validation (include when relevant):
Risks and considerations (include when present):
Format Guidelines:
function_name, file.tsBefore presenting the PR description:
Present the generated PR description in a Markdown code block so the user can easily copy it:
## Why I'm Doing This
[Context and motivation]
## What I'm Doing
[Implementation details]
**Technical Details:**
- [Key technical points]
**Risks:**
- [Any risks or considerations]
For detailed examples of well-written PR descriptions across different scenarios (features, bug fixes, optimizations, refactoring), see pr_examples.md.
Load this reference when you need inspiration or want to understand best practices for specific types of changes.