pr-createlisted
Install: claude install-skill alunduil/alunduil-chezmoi
# PR create
Compose before `gh pr create`. The body is the squash-merge commit
context — write it for the reviewer first, the future reader of
`git log` second.
## Pre-flight
```bash
# REST reads — see ~/.claude/CLAUDE.md "GitHub API budget".
branch=$(git branch --show-current)
gh api repos/:owner/:repo/pulls \
--jq ".[] | select(.head.ref==\"$branch\") | {number, state, url}" # existing PR for this branch?
git log --oneline main..HEAD # what this PR actually contains
gh api repos/:owner/:repo/pulls/<N> --jq '.body' # iterating? read the current body
```
- Existing PR for the branch → iterate on it, don't open a second.
- Find the issue this resolves (branch name, commit trailers, the
task). A PR that closes one carries `Closes #<N>` in the body.
## Detect repo template
```bash
ls .github/pull_request_template.md \
.github/PULL_REQUEST_TEMPLATE.md \
.github/PULL_REQUEST_TEMPLATE/ \
docs/pull_request_template.md 2>/dev/null
```
Template present → fill its sections; don't swap its structure for
ours. Absent → use the structure below.
## Body structure (no template)
Three short blocks. A reviewer should grasp all three in one read; a
block that runs past a few lines is carrying detail the diff already
shows.
- **Summary** — *why this change.* Prose, 1-2 sentences leading with
the user-visible outcome ("X now works"), not the diff ("set Y to
Z"). Surface mechanism only when the choice isn't obvious. Link the
issue; don't re-explain it.
B