← ClaudeAtlas

write-prlisted

Draft a pull request title and body from the current branch's diff and commit history, following the project's PR template and title conventions. Use when the user is about to open a PR and wants ready-to-paste content, or asks to write, draft, or fill in a PR description. Read-only — never opens or pushes the PR.
2ykwang/agent-skills · ★ 19 · Code & Development · score 80
Install: claude install-skill 2ykwang/agent-skills
# Write PR Turn the current branch's changes into a PR title and body that match the project's existing conventions. Analyze git history and diffs for intent, not just file names. ## Use this skill when - Writing or drafting a pull request description for the current branch - Generating a PR title that matches the project's commit/PR style - Filling in a PR template based on actual code changes ## Do not use this skill when - The request is to actually open or push a pull request - There are no commits ahead of the base branch - The user only wants a commit message, not a PR description **This skill is read-only. Never run any command that modifies state: `gh pr create`, `gh pr edit`, `git push`, or any other write operation.** ## Context The user wants a ready-to-use PR title and body based on what changed in the current branch. Focus on **intent and impact**, not raw diff output. Respect the project's existing PR style. ## Instructions ### Step 1: Detect Base Branch If `$ARGUMENTS` is provided, use it as the base branch. Otherwise, auto-detect in this order: 1. Run `git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null` — extract branch name (e.g., `origin/main` → `main`) 2. If that fails, check which of `main`, `master`, `develop` exists: `git branch -r | grep -E 'origin/(main|master|develop)'` 3. Use the first match found ### Step 2: Collect Change Information Run these commands in order: ```bash git log <base>..<HEAD> --oneline git diff <base>...<HEAD> --sta