About create-draft-pr
A skill for preparing and opening a draft pull request from current changes. It guides agents through reviewing the diff, committing and pushing a branch, then writing a focused PR description.
Key features
- 01Review status, diff, and commit history
- 02Create a branch when starting on main
- 03Commit and push changes
- 04Draft a PR description
- 05Open a draft PR with GitHub CLI
Use cases
- 01Turn completed changes into a draft PR
- 02Ensure a PR description follows a consistent structure
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ jnsahaj/ skills --skill create-draft-prAfter installing, type/create-draft-prin Claude Code to confirm it loaded.
Details
From the project READMECreate Draft PR
Commit all changes, push to remote, and create a draft pull request with a focused generated description.
Steps
- Run
git statusto see changes - Run
git diffto understand what changed - Run
git logto see commit message style - If on
main, create a new branch in the format<initials>/<feature>or the project's branch naming convention, then switch to it - Stage and commit changes with a concise message
- Push branch to remote with
-uflag - Generate the PR description using the
pr-descriptionskill's description format. - If the change is user-facing, workflow-oriented, or architectural, include a concise UX flow section using the
ux-flow-planstyle. - Create draft PR using
gh pr create --draft - If you created the branch (were on
main), switch back tomainafter the PR is created
PR Body Format
Use the pr-description skill's format as the base:
## Summary
<One sentence describing the overall change>
- Additional note if needed
- Another note if needed
## Problem
Describe the issue being addressed. What was broken, missing, or suboptimal? Be specific about the root cause.
## Solution
Explain the approach taken to fix the problem. Include code snippets only when they clarify the core approach.
When relevant, add this section between Problem and Solution:
## UX Flow
```text
Current flow
└─ ...
Desired flow
└─ ...
```
Only include UX Flow when it helps explain the product behavior, user journey, or architecture boundary. Keep it short and use the ux-flow-plan tree style.
Rules
- PR title should be succinct (no "feat:" prefix, but "fix:" is ok for bug fixes)
- Use
pr-descriptionas the source of truth for PR body structure. - Include
UX Flowfromux-flow-planonly when relevant; omit it for mechanical, dependency, or tiny internal changes. - Do NOT include a file-by-file summary of code changes.
- Do NOT include a test plan with checkboxes.
- Do NOT include "Generated with Claude Code" or similar footers
- Keep the PR description concise and focused on intent and approach
- Use HEREDOC for the PR body to preserve formatting
Comments
Markdown supported