Automatically generate PR titles and descriptions based on your branch's git history and diff.

Install

mkdir -p .claude/skills/pr-draft && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11835" && unzip -o skill.zip -d .claude/skills/pr-draft && rm skill.zip

Installs to .claude/skills/pr-draft

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Generates a PR title and description from the current branch's commits and diff. Triggers: /pr-draft, PR 만들어줘, PR 초안, pull request 작성, pr draft
143 charsno explicit “when” trigger
Beginner

Key capabilities

  • Generate a PR title and description from current branch commits and diff
  • Detect the base branch (main, master, develop)
  • Read project PR templates from `.github/PULL_REQUEST_TEMPLATE.md`
  • Fill in PR template sections or generate a default structure
  • Confirm the draft PR content with the user
  • Optionally create the PR directly on GitHub

How it works

This skill reads the current branch's commit history and diff, detects the base branch, and uses project templates to generate a PR title and body. It then offers to create the PR on GitHub.

Inputs & outputs

You give it
Current branch history, diff, project PR template, user confirmation
You get back
Draft PR title and body, GitHub PR URL

When to use pr-draft

  • Automating PR descriptions
  • Generating standardized pull requests
  • Summarizing branch changes

About this skill

PR Draft Generator

Reads branch history + diff → generates PR title and body matching the project's template → optionally creates the PR.

Procedure

Step 1 — Read branch context

Run in parallel:

git branch --show-current
git log main..HEAD --oneline
git diff main..HEAD --stat

If no commits ahead of main, tell the user and stop.

Step 2 — Detect base branch

Check if main or master or develop exists. Use the most likely base.

Step 3 — Read project PR template

Check .github/PULL_REQUEST_TEMPLATE.md — if it exists, use it as the body structure.

Also check project CLAUDE.md for:

  • PR title format
  • Language (Korean or English)

Step 4 — Read the diff (if small enough)

git diff main..HEAD

Only read if --stat shows ≤ 300 lines changed. If larger, rely on commit messages.

Step 5 — Generate PR content

Title: Follow project format. If issue-based: [#이슈번호] {이슈 제목}. If conventional: feat: {summary}

Body: Fill in the PR template sections. If no template:

## 변경 사항
- {bullet points of what changed}

## 이유
{why this change was needed}

## 테스트
- [ ] {key test scenarios}

Step 6 — Confirm and optionally create

Show the draft and ask:

PR 초안:

제목: {title}

{body}

---
GitHub에 PR을 생성할까요? (y/n)

On confirm:

gh pr create --title "{title}" --body "$(cat <<'EOF'
{body}
EOF
)"

Step 7 — Report

Return the PR URL, then output:

## 사람이 확인해야 할 것
- [ ] PR 범위가 이슈 하나에 해당하는지 (너무 크지 않은지)
- [ ] 테스트 체크리스트가 실제로 실행 가능한지
- [ ] base branch가 올바른지 (main vs develop vs feature)
- [ ] 민감한 변경사항(인증, 결제, DB 스키마)이 있으면 별도 리뷰어 지정 필요

Notes

  • Never push to main/master directly
  • If the branch isn't pushed yet, run git push -u origin {branch} first
  • Only add --assignee, --reviewer, --label when the user requests them

When not to use it

  • When there are no commits ahead of the base branch
  • When the diff is too large (over 300 lines changed) and detailed diff-based generation is expected
  • When the user does not want to create a PR on GitHub

Limitations

  • Only reads diff if `--stat` shows ≤ 300 lines changed
  • Relies on commit messages if diff is larger than 300 lines
  • Only adds `--assignee`, `--reviewer`, `--label` when the user requests them

How it compares

This skill automates the drafting of PR content by analyzing branch changes and applying project templates, simplify the PR creation process compared to manual writing.

Compared to similar skills

pr-draft side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
pr-draft (this skill)04moReviewBeginner
changelog-generator310moNo flagsBeginner
wiki-changelog34moNo flagsBeginner
resolve-conflicts818moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

changelog-generator

ComposioHQ

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

346

wiki-changelog

microsoft

Analyzes git commit history and generates structured changelogs categorized by change type. Use when the user asks about recent changes, wants a changelog, or needs to understand what changed in the repository.

332

resolve-conflicts

antinomyhq

Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.

81334

payload

payloadcms

Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.

73206

dependency-upgrade

wshobson

Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.

26240

openspec-onboard

studyzy

Guided onboarding for OpenSpec - walk through a complete workflow cycle with narration and real codebase work.

10207

Search skills

Search the agent skills registry