← ClaudeAtlas

pr-createlisted

Open a GitHub PR with a tight body — why this change, what'll surprise the reviewer, how we know it's correct — or add a pull_request_template to a repo. Use when asked to open, create, or draft a pull request, compose or regenerate a PR description, or scaffold a repo's PR template. Composes the Summary/Gotchas/Verification structure and detects an existing template first.
alunduil/alunduil-chezmoi · ★ 1 · Data & Documents · score 67
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