From draft-pr
This skill MUST be used when drafting GitHub Pull Request or GitLab Merge Request titles and descriptions. This includes when the user asks to "create a PR", "open a PR", "raise a MR", "write a PR description", "draft a merge request", "submit a PR", "make a merge request", or when an agent workflow reaches a PR/MR creation step. This skill should also be used when reviewing or rewriting an existing PR/MR description.
How this skill is triggered — by the user, by Claude, or both
Slash command
/draft-pr:draft-prThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Draft titles and descriptions for GitHub Pull Requests and GitLab Merge Requests by reading the actual changes from git, then presenting the draft for user confirmation before creating.
Draft titles and descriptions for GitHub Pull Requests and GitLab Merge Requests by reading the actual changes from git, then presenting the draft for user confirmation before creating.
This skill takes precedence unless the current project's CLAUDE.md or equivalent defines its own PR/MR description process.
Auto-detect from git tracking info. Fall back to main, master, or develop (in that order, whichever exists). Accept an explicit override as an argument (e.g. /draft-pr develop).
Gather context from:
# All commits on this branch relative to base
git log --oneline <base>..HEAD
# Full diff against base
git diff <base>...HEAD
# Current branch name
git rev-parse --abbrev-ref HEAD
Read all commits, not just the latest. The description must reflect the entire branch.
Default format (overridable by project CLAUDE.md):
component: Brief imperative description.
Rules:
component is the primary area of the codebase affected (e.g. py/objstr, extmod/modnetwork, docs)Use this template:
### Summary
<!-- Lead with what you found or what prompted the change -- the
observation, bug, or requirement that made you open the editor.
Give the reviewer the same "aha" moment you had: what was wrong
or missing, and why it matters. Only then describe the approach
taken to address it.
Bad: "Add a shaped renderer backend using rustybuzz."
Good: "The resvg renderer spends 92% of its time re-parsing SVG
every frame. To avoid that overhead while keeping text quality..."
For changes that span multiple subsystems, introduce new components,
or alter data/control flow, include a mermaid diagram (flowchart,
sequence, state, etc.) to give the reviewer a map of the change
before they read the diff. -->
### Testing
<!-- What was tested and on which boards/ports. Mention anything that
could NOT be tested. Omit this section only for trivially obvious
changes (typo fixes, comment-only edits). -->
### Trade-offs and Alternatives
<!-- Include by default. Explain any negative impact (code size, performance)
and why the trade-off is worthwhile. Mention alternative approaches
considered. Delete this section entirely if genuinely irrelevant. -->
### Generative AI
<!-- Include this section when AI tools were used during development.
Remove entirely if all code was written manually. -->
I used generative AI tools when creating this PR, but a human has checked
the code and is responsible for the description above.
Show the drafted title and body to the user. On confirmation, create the PR/MR using the appropriate tool (gh pr create or glab mr create). Do not create without confirmation.
The primary audience is a reviewer who will also be reading the diff. The description's job is to provide what the diff alone cannot:
Do not repeat what the reviewer can already see. The diff shows what changed; the description explains why and how to think about the change. Assume the reader is already an expert in the codebase -- provide only brief detail and background.
Describe the current state, not the development journey. The summary should read as an overview of what the branch delivers in its final form -- not a narrative of how it got there. Do not describe intermediate refactors, false starts, or the sequence of iterations. The commit log already captures that history. A reviewer merging this branch cares about what it is, not how it was built.
The reviewer already has access to the commit log, file list, and full diff in the review UI. Do not duplicate that content in the description.
Never include:
PR/MR descriptions must read as natural human writing. Avoid patterns statistically associated with LLM-generated text.
Banned vocabulary -- these words appear at anomalously high rates in AI output and must not be used:
Structural patterns to avoid:
Per-project CLAUDE.md files may override:
component: prefix)## Migration Guide section)gh vs glab vs other)When a project override exists, follow it. When it doesn't, this skill's defaults apply.
npx claudepluginhub andrewleech/claude-mpy-marketplace --plugin draft-prDrafts conventional commit PR titles and Shopware 5-section descriptions for core PRs targeting trunk. Analyzes branch against trunk, uses session context, asks for missing info.
Creates, updates descriptions, and adds comments to GitHub pull requests using file-based drafts for safety, emphasizing material impact and reviewer-friendly communication.
Generates structured PR descriptions from a git diff, commit list, or change summary. Covers what changed, why, and how to test.