write-prlisted
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