create_pr
Create a pull request on GitHub or GitLab after the user reviews and approves an auto-generated title and description. Requires explicit user confirmation.
Instructions
Create a pull request on the detected platform (GitHub/GitLab).
CRITICAL WORKFLOW - YOU MUST FOLLOW THESE STEPS IN ORDER:
Call get_pr_context to analyze the changes
Generate PR title and description based on the diff
SHOW the generated PR title and body to the user in your response
ASK the user: "Should I create this PR?" and WAIT for their response
ONLY call this tool AFTER the user explicitly approves (says "yes", "proceed", "create it", etc.)
Set user_approved=True when calling this tool
DO NOT call this tool in the same response where you generate the PR description. The user MUST see the content and approve it first.
Args: title: PR title (keep it concise, ~50 chars) body: PR description (formatted markdown) base_branch: Base branch (e.g., "main", "dev") user_approved: REQUIRED - Must be True. Confirms user has seen and approved the PR content. head_branch: Head branch (defaults to current branch) draft: Create as draft PR (default: False) repo_path: Path to git repository (optional, defaults to Claude's working directory)
Returns: Success message with PR URL or error message
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| draft | No | ||
| title | Yes | ||
| repo_path | No | ||
| base_branch | Yes | ||
| head_branch | No | ||
| user_approved | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |