Opens pull requests with a consistent description format and assignment. Use when the user asks to open, create, or draft a PR or pull request, push a branch for review, or write a PR description.
Gather context before writing anything:
git status
git fetch origin
git log --oneline origin/HEAD..HEAD
git diff origin/HEAD...HEAD --stat
git diff origin/HEAD...HEAD
gh pr list --head "$(git branch --show-current)" --state open --json number,url,title
ls .github/pull_request_template.md .github/PULL_REQUEST_TEMPLATE.md .github/PULL_REQUEST_TEMPLATE/ docs/pull_request_template.md pull_request_template.md 2>/dev/nullRun these as one batch. Note origin/HEAD...HEAD — three dots. Two dots compares against the current tip of the default branch and misdescribes the PR.
The gh pr list result decides which path you are on. An open PR means updating the existing one — gh pr create fails outright on a branch that already has a PR.
Empty git log output means no commits ahead of the default branch — the work may be uncommitted, or you may still be on the default branch. When git status shows changes, describe the PR from the working-tree diff instead.
Never commit on the default branch. When git status reports main or master, create a branch with git switch -c <branch> first and tell the user the name you picked. Only ever create a new branch — switching to an existing one changes which work the PR describes.
Commit uncommitted work before pushing, but say what you are about to commit and wait for the user to agree first. Stage named paths, never git add -A, which sweeps unrelated changes into the PR. Review git status after staging; if anything unexpected appears, stop and ask.
Push with git push -u origin HEAD, then write the description to a file and open the PR:
gh pr create --title "<title>" --body-file <path> --assignee @meAdd --draft when the work is unfinished. Use the scratchpad directory for the body file. Always use --body-file, never --body — the shell eats backticks and $ in a long inline string.
Assign the person opening the PR every time, whoever authored the commits. --assignee @me resolves to the account gh is authenticated as, so it needs no configuration; if it fails, pass the login from gh api user --jq .login instead. Add reviewers only when the user names them.
After creating, print the PR URL.
When the branch already has an open PR, read its current description first, so the rewrite starts from what is there:
gh pr view <pr> --json title,bodyWrite the full replacement description to a file and edit in place. Never assign or add reviewers again — the PR already has both.
gh pr edit <pr> --title "<title>" --body-file <path>--body-file replaces the whole body, so the file must carry every heading, not just the changed part. Preserve whatever the user wrote under Screenshots and any checklist boxes they ticked — that content is theirs, and a careless edit drops it.
Print the PR URL when done.
When the repo has a PR template, it sets the shape — see the next section. Otherwise use these headings, in this order. Why, What Changed, and Screenshots are always present; Post-merge appears only when the PR needs it.
## Why
## What Changed
- [x] ...
- [x] ...
## Post-merge
- [ ] ...
## ScreenshotsEvery box under What Changed ships checked. Each line is work that is already done, so an unchecked box would read as unfinished.
Post-merge lists work someone has to do after the merge — a data backfill, a re-import, a config change, a manual migration step. Every box ships unchecked: it is a list to work through once the PR lands. One line per item, saying what to run and what stays broken until it runs. Omit the heading entirely when there is none.
Leave Screenshots empty — the user fills it in. When the PR changes nothing visible, keep the heading and write N/A — no UI changes under it, so reviewers are not left waiting for an image.
If the ls above found a template, read it before writing the body. --body-file replaces the template outright, so any section you don't write is gone.
The template is the repo's expectation, and the place the team goes to change it. Keep its headings, their exact wording, and their order. Don't add headings it lacks. Replace each placeholder with content, and follow any instruction the template gives for a section, such as deleting it when it doesn't apply.
The rules below say how to fill a section, not which sections exist. Apply the Why rules to the template's equivalent (Why?, Summary, Motivation), and the What Changed rules to its list of changes.
For a checklist, check each item this PR did. Check and strike through each item that doesn't apply: - [x] ~~Updated relevant READMEs~~. Leave an item unchecked only when it applies but isn't done. When a section asks for something only the user can answer, leave it for them. Say so for both when you print the URL, and mention any post-merge work the template has no place for.
Why
What Changed
Title
[ABC-123] Add delivery status to invite list.## Why
Users could not tell whether an invite had been sent, so support kept fielding "did it go through?" tickets. This adds a visible status on the invite list.
Delivery status comes from the mail provider's webhook rather than our own send call, because our send only proves we queued the message.
## What Changed
- [x] Show delivery status on each row of the invite list
- [x] Record provider webhook events against the invite
- [x] Backfill status for invites sent in the last 30 days
- [x] Add the mail provider's webhook gem
## Post-merge
- [ ] Run `rake invites:backfill_status` — existing invites show no status until it runs.
- [ ] Point the provider's webhook at `/webhooks/mail` in the provider dashboard; no new events record until then.
## Screenshotscb80143
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.