# Generate Pr Description

> Generate a structured PR description from the diff. Fetches the diff, analyzes changes, and optionally applies the description.

- Skill: `majiayu000/generate-pr-description` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add majiayu000/generate-pr-description`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/generate-pr-description/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/generate-pr-description

---


# Generate PR Description

Generate a structured pull request description by analyzing the diff.

## Steps

1. Fetch the PR diff using `gh pr diff <PR>`.
2. Fetch the PR title using `gh pr view <PR> --json title --jq .title`.
3. Analyze the diff and generate a description with these sections:
   - **## Summary** — 1-2 sentences on purpose and motivation
   - **## Changes** — bulleted list of logical changes
   - **## Testing** — suggested verification steps
4. Show the generated description to the user.
5. Ask the user if they want to apply it to the PR.
6. If confirmed, apply via `gh pr edit <PR> --body "<description>"`.

## Guidelines

- Keep descriptions under 500 words
- Use present tense ("Add", "Fix", "Update")
- Focus on intent and impact, not line-by-line details
- Do not repeat the PR title — provide additional context

