| name | pr |
| description | Creates a GitHub pull request using gh CLI. Triggered when the user asks to open, create, or submit a PR, or runs /pr. |
| model | sonnet |
| allowed-tools | Bash, Read, Grep, Glob |
| argument-hint | [base-branch] |
Create Pull Request
Accept an optional base branch argument (default: main).
Workflow
- Verify clean working tree and current branch via
git status
- If working tree is dirty, stop and inform the user
- Analyze commits since base branch via
git log and git diff <base>...HEAD
- Push branch if needed:
git push -u origin HEAD
- Create PR:
gh pr create --title "<type>: <concise title>" --body "$(cat <<'EOF'
## Summary
- <1-3 bullets focusing on WHY, not what>
## Test plan
- [ ] <verification steps>
EOF
)"
- Return the PR URL
Rules
- Never use interactive flags (
-i)
- Never use
--force or --force-with-lease when pushing