From claude-resources
Creates pull requests with automatic base branch detection from conversation context, git history, or repository default. Confirms details and pushes before opening.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-resources:pr [target-branch][target-branch]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create a pull request with automatic base branch detection from conversation history, git log, or repository default.
Create a pull request with automatic base branch detection from conversation history, git log, or repository default.
/pr - Create PR with auto-detected base branch/pr <target-branch> - Create PR targeting the specified branchgit status
git branch --show-current
Ensure you're on a feature branch (not main/master/develop).
Priority order for base branch detection:
<target-branch> is provided, use it directlySearch the current conversation for clues about the base branch:
# Fetch latest remote refs
git fetch origin
# Find merge-base with candidate branches
for branch in main master develop staging; do
git merge-base HEAD origin/$branch 2>/dev/null && echo "Found: $branch"
done
# Check which branch has the closest merge-base
# The branch with most recent common ancestor is likely the parent
# Get the default branch
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
gh pr list --head $(git branch --show-current)
If PR exists, ask user if they want to view or update it.
# Get commits
git log origin/<base-branch>..HEAD --oneline
# Get file changes
git diff origin/<base-branch>..HEAD --stat
Before creating, confirm:
<branch-name><base-branch> (with detection method: "specified", "from conversation", "auto-detected", or "default")# Push if needed
git push -u origin $(git branch --show-current)
# Create PR
gh pr create \
--base <base-branch> \
--title "<title>" \
--body "$(cat <<'EOF'
## Summary
<description>
## Changes
- <change 1>
- <change 2>
## Test Plan
<testing instructions>
EOF
)"
Display:
The command uses this logic to find the base branch:
gh repo viewIf detection is ambiguous, ask the user to clarify before creating the PR.
npx claudepluginhub takazudo/claude-resources --plugin claude-resourcesCreates a pull request from the current branch with unpushed commits, auto-detecting the base branch and using PR templates when available.
Creates GitHub Pull Requests using GitHub CLI: detects existing PRs for branches, pushes changes, generates titles/bodies from commits. Handles monorepos/submodules. Use for /create-pr or PR/review requests.
Creates pull requests with context gathering, conventional commit title generation, and formatted body via GitHub CLI. Creates PRs as drafts by default.