create-prlisted
Install: claude install-skill thinceller/claude-plugins
# Create Pull Request
Create a GitHub Pull Request using the `gh` CLI. Analyze branch changes, detect PR templates, and generate structured PR descriptions.
If `$ARGUMENTS` contains `draft` or `--draft`, create the PR as a draft. Otherwise, create a regular (open) PR.
## Workflow
### Step 1: Gather Context
Run the following commands in parallel:
1. `git status` - Check for uncommitted changes (never use `-uall` flag)
2. `git branch --show-current` - Get current branch name
3. `git log --oneline -20` - Get recent commit history for message style reference
If there are uncommitted changes, warn the user and ask whether to proceed or commit first.
### Step 2: Identify Base Branch and Changes
Determine the base branch for the PR:
1. Detect the default branch: `gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'`
2. Use the default branch as the base unless the user specifies otherwise
Gather the full diff and commit log from the base branch:
1. `git log --oneline <base-branch>..HEAD` - All commits to include in the PR
2. `git diff <base-branch>...HEAD` - Full diff of changes
3. `git diff <base-branch>...HEAD --stat` - Summary statistics
If there are no commits ahead of the base branch, inform the user and stop.
### Step 3: Detect PR Templates
Search for PR templates in the repository in this order:
1. `.github/pull_request_template.md`
2. `.github/PULL_REQUEST_TEMPLATE.md`
3. `docs/pull_request_template.md`
4. `pull_request_template.md`
5. `.github/