Create a pull request with validation and format guidance
Creates a GitHub pull request with validation and conventional formatting.
/plugin marketplace add flexion/claude-domestique/plugin install onus@claude-domestiquetitleCreate a GitHub pull request following project conventions with validation.
IMPORTANT: Consult the PR CHECKLIST from git.md before proceeding.
Before creating the PR, verify:
Run tests (if applicable)
npm test
Check current branch and commits
git branch --show-current
git log main..HEAD --oneline
git diff main...HEAD --stat
Ensure changes are pushed
git push -u origin $(git branch --show-current)
Check session file for summary content
.claude/sessions/<branch>.mdcomplete (should be marked before final commit)Format Requirements:
#N - lowercase description (for issues)chore - lowercase description (for chores)Use session file content to build the body:
## Summary
<2-3 bullets from Session Log or Approach>
## Test Plan
<How to verify the changes work>
## Acceptance Criteria
<From issue, if applicable>
- [ ] Criterion 1
- [ ] Criterion 2
IMPORTANT:
gh pr create --title "#42 - add user authentication" --body "$(cat <<'EOF'
## Summary
- Implement login form with email/password fields
- Add JWT token handling with httpOnly cookies
- Create auth middleware for protected routes
## Test Plan
- Run `npm test` to verify unit tests pass
- Manually test login flow at /login
## Acceptance Criteria
- [x] Login form with email and password fields
- [x] Secure token storage
- [ ] Auto-logout on token expiry (follow-up)
EOF
)"
Note: Do NOT update the session file after PR creation. The PR number is discoverable via gh pr view—no need to store it in the session.
User: /onus:pr
Claude: I'll help you create a PR. Let me check the branch and commits.
[Runs git branch, git log, reads session file]
Branch: issue/feature-42/auth
Commits: 3 commits ahead of main
Session: Goal is "Add user authentication"
Creating PR with title matching your commits...
gh pr create --title "#42 - add user authentication" --body "..."
Created: https://github.com/org/repo/pull/87
Next steps:
- Review at the link above
- Request reviewers if needed
"Pull request already exists"?
gh pr listgh pr viewWrong base branch?
gh pr create --base mainNeed to update PR after creation?
gh pr edit --title "new title"gh pr edit --body "new body"Authentication failed?
gh auth status shows logged inrepo scope