Create a GitHub PR from a worktree branch
Creates a GitHub PR from a worktree branch with auto-detected base and commit summary.
/plugin marketplace add iknite/claude-code-marketplace/plugin install worktree-context@iknite-cc-marketplace<branch-name> [base-branch]Create a GitHub Pull Request for branch $1.
!git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || (git branch -l main master 2>/dev/null | head -1 | tr -d '* ')
!cd worktree/$1 2>/dev/null && git status || echo "Worktree not found at worktree/$1"
!cd worktree/$1 2>/dev/null && git log --oneline -5 || echo ""
$2 is provided, use it as the PR basegit symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || git branch -l main master 2>/dev/null | head -1 | tr -d '* '
cd worktree/$1
If any uncommitted changes exist, ask user what to do.
git push -u origin $1
gh pr create --base <detected-base-branch> --title "..." --body "..."
## Summary
<bullet points of changes>
## Test plan
<how to verify the changes>
---
Generated with [Claude Code](https://claude.ai/code)