write-prlisted
Install: claude install-skill brandtam/skills
# Write PR
Generate a pull request description for the current branch, then optionally push and open the PR with user approval.
## Workflow
### Step 1 — Gather fresh state
Run in parallel — never reuse results from earlier in the conversation:
```
git status
git branch --show-current
git remote -v
gh repo view --json defaultBranchRef -q .defaultBranchRef.name
```
Then, using the default branch name from above as `<base>`:
```
git log <base>..HEAD --oneline
git diff <base>...HEAD --stat
git diff <base>...HEAD
gh pr list --head <current-branch> --json number,url,title
```
Stop and tell the user if:
- The current branch **is** the default branch — offer to create a branch first.
- There are no commits between `<base>` and `HEAD` — nothing to open a PR for.
- A PR already exists for this branch — show its number/URL and ask whether to **update its description** or **stop**.
If there are uncommitted changes, say so and ask whether to **commit first** (hand off to `/write-commit`), **proceed anyway** (they won't be in the PR), or **stop**.
### Step 2 — Check for a repo PR template
Check these paths, in order:
```
.github/pull_request_template.md
.github/PULL_REQUEST_TEMPLATE.md
.github/PULL_REQUEST_TEMPLATE/*.md
docs/pull_request_template.md
pull_request_template.md
```
- If a template exists, read it and fill in every section. Keep its headings and order exactly. Delete only comment blocks (`<!-- ... -->`) and checklist items that are clearly inapplicable.
- If multi