PR Description Generator

VerifiedCaution

Generates thorough pull request descriptions by analyzing git diffs, commit history, and related files. Helps when creating or updating PRs, especially to produce reviewer-friendly summaries, change lists, and testing notes.

Sby Skills Guide Bot
DevelopmentIntermediate
1506/2/2026
Claude Code
#pr-description#git#pull-request#code-review#automation

Recommended for

Our review

Generates comprehensive pull request descriptions from git diffs and commit history.

Strengths

  • Automatically analyzes diffs and commit messages to produce a structured description
  • Includes summary, changes, testing, and reviewer notes sections
  • Handles edge cases like large PRs, refactoring, and bug fixes with specific guidance

Limitations

  • Requires git and gh CLI to be installed and configured
  • Relies on commit message quality; vague commits lead to vague descriptions
  • Cannot capture human context not present in code or commits
When to use it

When creating or updating a pull request to ensure a consistent, reviewer-friendly description.

When not to use it

For trivial changes that don't need a full description, or when nuanced human-written explanations are required.

Security analysis

Caution
Quality score95/100

The skill uses git and gh CLI commands that can push to remote and create pull requests. These are powerful actions that could cause accidental changes if misused, though the skill prompts for user approval and includes error handling.

Findings
  • Skill includes commands to push code and create pull requests using GitHub CLI, which could modify remote repositories. Requires user approval before execution, but automated execution carries risk of unintended pushes.

Examples

Generate PR description from current branch
/pr
Write PR description for staged changes
Write a pull request description for my branch based on the git diff.
Help with pull request
Help me write a PR description. I've made changes to add rate limiting to the auth module.

name: pr description: Generate comprehensive PR descriptions from git diffs. Use when creating or updating pull requests, when asked to write a PR description, or when the user says "pr", "/pr", or asks for help with their pull request. Analyzes staged/unstaged changes and commit history to produce thorough, reviewer-friendly descriptions.

PR Description Generator

Generate pull request descriptions that reviewers will love.

Workflow

  1. Gather context (diff, commits, related files)
  2. Analyze the changes (what changed, why it matters)
  3. Generate description following the template
  4. Present to user for approval
  5. Offer to create PR using gh CLI

Step 1: Gather Context

Run these commands to understand the changes:

# Get the diff (staged + unstaged)
git diff HEAD

# If on a feature branch, get diff from main
git diff main...HEAD

# Get recent commits on this branch
git log main..HEAD --oneline

# Get commit messages with bodies
git log main..HEAD --format="%B---"

Step 2: Analyze Changes

For each changed file, identify:

  • What: The technical change made
  • Why: The purpose/motivation (infer from context, commit messages, code comments)
  • Impact: What this affects (features, performance, security, etc.)

Look for clues in:

  • Commit messages
  • Code comments (especially TODOs resolved)
  • Test files (they reveal intent)
  • Related documentation changes

Step 3: Generate Description

Use this template:

## Summary

[1-2 sentences: What does this PR do and why?]

## Changes

[Bullet list of key changes, grouped logically]

- **[Area/Component]**: [What changed]
- **[Area/Component]**: [What changed]

## Testing

[How was this tested? What should reviewers verify?]

- [ ] Unit tests pass
- [ ] Manual testing of [specific flows]
- [ ] [Any other relevant checks]

## Notes for Reviewers

[Optional: Anything reviewers should pay attention to, questions you have, or context that helps review]

---

<sub>📋 PR description generated with [agent-resources](https://github.com/kasperjunge/agent-resources) • `uvx add-skill kasperjunge/pr`</sub>

Quality Standards

Summary

  • Lead with the WHY, not just the WHAT
  • Be specific: "Fix login timeout" > "Fix bug"
  • One PR = one purpose (if not, note it)

Changes

  • Group related changes together
  • Highlight breaking changes prominently
  • Note any migrations or setup steps needed

Testing

  • Be specific about what was tested
  • Include manual testing steps if relevant
  • Note any areas that need extra review attention

Examples

Good Summary

Add rate limiting to authentication endpoints to prevent brute force attacks. Limits to 5 attempts per minute per IP, with exponential backoff.

Bad Summary

Fix auth issues

Good Changes Section

## Changes

- **Auth**: Add rate limiter middleware with Redis backend
- **Config**: New `RATE_LIMIT_*` environment variables
- **Tests**: Add rate limiting integration tests
- **Docs**: Update API documentation with rate limit headers

Bad Changes Section

## Changes

- Changed auth.ts
- Changed config.ts
- Added tests

Handling Edge Cases

Large PRs: Group changes by feature/area, add a "Overview" section at top

Refactoring PRs: Emphasize that behavior is unchanged, note what was restructured and why

Bug fixes: Include what was broken, root cause, and how the fix addresses it

Dependencies: Note any new dependencies and why they were chosen

Step 4: Offer to Create PR

After presenting the generated description to the user, ask if they want to create the PR using gh:

Would you like me to create the PR now using gh?

If the user accepts:

  1. Check if the current branch is pushed to remote:

    git rev-parse --abbrev-ref --symbolic-full-name @{u}
    
  2. If not pushed, offer to push first:

    git push -u origin HEAD
    
  3. Create the PR using gh:

    gh pr create --title "[PR title from summary]" --body "[generated description]"
    
  4. Report the PR URL back to the user

Options to offer

When asking about PR creation, present these options:

  • Create PR - Create as draft or ready for review
  • Create as draft - gh pr create --draft
  • Copy to clipboard - Just copy the description (if user prefers to create manually)

Error handling

  • If gh is not installed, inform the user: "The GitHub CLI (gh) is not installed. You can install it from https://cli.github.com/ or copy the description above to create the PR manually."
  • If not authenticated, guide them to run gh auth login
  • If there are uncommitted changes, warn before proceeding
Related skills