| name | pr |
| description | Create a pull request with intelligent base branch detection. Use when: (1) User says 'create pr', 'make pr', or 'open pr', (2) User wants to create a PR from the current branch, (3) User has finished work on a feature branch and needs a PR. Auto-detects base branch from conversation, git history, or repo default. |
| argument-hint | [target-branch] |
PR Command
Create a pull request with automatic base branch detection from conversation history, git log, or repository default.
Usage
/pr - Create PR with auto-detected base branch
/pr <target-branch> - Create PR targeting the specified branch
Steps
1. Verify Current State
git status
git branch --show-current
Ensure you're on a feature branch (not main/master/develop).
2. Determine Base Branch
Priority order for base branch detection:
- Explicit argument: If
<target-branch> is provided, use it directly
- Conversation context: Search conversation history for mentions of:
- "based on", "branch from", "create branch from"
- PR context or issue references that mention a target branch
- Recent git commands showing branch creation
- Git history: Auto-detect from git log and merge-base
- Repository default: Use the default branch as fallback
Conversation History Check
Search the current conversation for clues about the base branch: