From git-toolkit
Creates a GitHub Pull Request using the gh CLI. Use when asked to "create a PR", "open a PR", "submit a PR", "make a pull request", or "send a PR". Supports draft and open statuses.
How this skill is triggered — by the user, by Claude, or both
Slash command
/git-toolkit:create-prThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create a GitHub Pull Request using the `gh` CLI. Analyze branch changes, detect PR templates, and generate structured PR descriptions.
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.
Run the following commands in parallel:
git status - Check for uncommitted changes (never use -uall flag)git branch --show-current - Get current branch namegit log --oneline -20 - Get recent commit history for message style referenceIf there are uncommitted changes, warn the user and ask whether to proceed or commit first.
Determine the base branch for the PR:
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'Gather the full diff and commit log from the base branch:
git log --oneline <base-branch>..HEAD - All commits to include in the PRgit diff <base-branch>...HEAD - Full diff of changesgit diff <base-branch>...HEAD --stat - Summary statisticsIf there are no commits ahead of the base branch, inform the user and stop.
Search for PR templates in the repository in this order:
.github/pull_request_template.md.github/PULL_REQUEST_TEMPLATE.mddocs/pull_request_template.mdpull_request_template.md.github/PULL_REQUEST_TEMPLATE/ directory (if multiple templates exist)If a template is found:
When multiple templates exist in .github/PULL_REQUEST_TEMPLATE/, list them and ask the user which to use.
If no template is found, use the default format described in Step 4.
If a PR template was found in Step 3, populate each section of the template with relevant content from the analyzed changes.
If no template was found, use this default format:
## Summary
<1-3 bullet points describing the changes>
## Changes
<Detailed description of what was changed and why>
## Test Plan
<How to verify the changes work correctly>
Always append the following footer:
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Ensure the branch is pushed to the remote:
git rev-parse --abbrev-ref @{upstream} 2>/dev/nullgit push -u origin <current-branch>git pushCreate the PR using gh pr create:
gh pr create \
--title "PR title" \
--body "$(cat <<'EOF'
PR body content here
EOF
)" \
[--draft] # Include if draft mode requested
Add --draft flag when draft mode is requested.
gh pr view --json url,number,title,isDraft to confirm creation and report the PR URL, number, title, and status (draft/open) to the user.gh auth logincat <<'EOF' (single-quoted) for the body HEREDOC to prevent variable expansionnpx claudepluginhub thinceller/claude-plugins --plugin git-toolkitCreates GitHub pull requests from the current branch, analyzes diffs, applies PR templates, and prompts for effort and testing details.
Creates draft pull requests via GitHub CLI: gathers git context with status/logs/diffs, generates conventional commit titles, formats markdown bodies. Triggers on PR creation phrases.