How this command is triggered — by the user, by Claude, or both
Slash command
/git:open-pr draftclaude-haiku-4-5This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Open Pull Request You are executing the `/open-pr` command. Follow these steps precisely: ## Parameters - `draft` (optional): Create PR as draft if specified (e.g., `/open-pr draft`) ## Overview This command creates commits, pushes a branch, and opens a PR. Questions are asked upfront in the main agent, then execution is delegated to preserve context. --- ## Step 0: Branch Check **CRITICAL: Run this check FIRST.** Check current branch: `git branch --show-current` **If on main or master branch:** 1. Run `git diff --stat` to understand changes briefly 2. Generate 4 branch name sugg...
You are executing the /open-pr command. Follow these steps precisely:
draft (optional): Create PR as draft if specified (e.g., /open-pr draft)This command creates commits, pushes a branch, and opens a PR. Questions are asked upfront in the main agent, then execution is delegated to preserve context.
CRITICAL: Run this check FIRST.
Check current branch: git branch --show-current
If on main or master branch:
git diff --stat to understand changes brieflyfeature/name, fix/name, or refactor/namegit checkout -b <chosen-branch-name>If on any other branch: Proceed to Step 1.
Extract session context:
Run lightweight git commands:
git status --short
git diff --stat
Assess:
Create a concise summary (2-4 sentences) of the session's work.
Use AskUserQuestion to gather decisions BEFORE delegating. Ask in a single call when multiple apply:
Question 1 (if multiple distinct tasks detected):
Question 2 (if unstaged/untracked files exist not from session):
If "Let me review first": List files and wait. Do not proceed.
Launch a general-purpose agent with the Task tool using claude-haiku-4-5 model.
Include in the prompt:
Agent prompt structure:
You are creating commits, pushing a branch, and opening a PR. Work autonomously - do not ask questions.
## Session Context
[Include summary from Step 1]
## User Decisions
- Commit strategy: [single commit / multiple logical commits]
- Scope: [all changes / session changes only - list specific files if applicable]
- Branch: [branch name]
- Draft PR: [yes/no]
## Your Tasks
### 1. Analyze changes
Run `git diff` on relevant files to understand what changed.
### 2. Create commits
Stage and commit according to user's strategy.
**Commit message rules:**
- Style: Concise, factual. State what was done.
- Simple changes: Title only
- Complex changes: Title + brief description
- Avoid self-praise adjectives
- Hard limit: 80 words total
- Format:
```bash
git commit -m "$(cat <<'EOF'
Commit title here
Optional description.
EOF
)"
If multiple commits: chronological order, each self-contained.
Check if force-push needed (git status shows diverged).
git push -u origin <branch-name>On push failure: Report error and stop.
PR Title:
PR Description:
Create PR:
gh pr create --title "PR title" --body "$(cat <<'EOF'
PR description here.
EOF
)" [--draft if requested]
On failure: Report error and stop.
xdg-open <PR_URL>
Output:
## Step 4: Display Results
After agent completes, display:
- Commit SHA(s) with messages
- Branch name
- PR URL
- Total commits created
## Error Handling
If agent reports failures:
1. Display error clearly
2. Ask if user wants to retry or needs assistance
npx claudepluginhub sevos/claude-code-marketplace --plugin git/ghprOpens existing or creates new GitHub pull request for current branch. Checks PR status, drafts conventional commit title/body from branch/commits, confirms with user, then creates and opens.
/push-prCommits changes to a new branch if on main, pushes to origin, fills PR template with git diff details, and opens GitHub pull request.
/pr-automationCreates GitHub pull requests from chat session changes, handling branch creation, conventional commits, and PR description generation.
/create-prCreates a pull request by handling branch creation, commits, and submission. Uses full conversation context and optional context argument.
/commit-push-prCommits current changes (staged/unstaged) to a new branch if on main, pushes to origin, and creates a GitHub pull request via gh.