Skill for pushing branch and creating pull requests with proper target branch detection and draft support. Use when user asks to "create PR", "push and create PR", "open a pull request", or says "/create-pr". Also invoked by /resolve workflow finalization phase. Do NOT use for reviewing PRs (use review-pr skill instead).
This skill handles the finalization phase of ticket resolution: pushing the branch and creating a pull request.
Priority order for determining the PR target branch:
--base main
Read from .claude-work/{ticket-id}/status.json:
{
"options": {
"base_branch": "develop"
}
}
This can be set when creating a worktree, preserving the original base branch.
Some tickets specify target branch:
Check in ticket.md or analysis.md for:
Target Branch: develop
Fix Version: release/2.0
Detect from current branch name:
hotfix/* → main (or master)
release/* → main
feature/* → develop (if exists) or main
fix/* → develop (if exists) or main
From .claude/ticket-config.json:
{
"pr": {
"default_target": "main"
}
}
git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@'
Try in order: main, master, develop
Format: {type}: {ticket_title} ({ticket_id})
Examples: