From git
Create and update GitHub pull requests with automatic rebase and conflict resolution. Trigger phrases include "PRを作って", "プルリクエスト作成", "レビューに出したい", "create a PR", "open a pull request".
npx claudepluginhub tqer39/claude-code-marketplace --plugin gitThis skill uses the workspace's default tool permissions.
Automate the PR workflow: rebase onto the base branch, resolve conflicts, push, and create or update the pull request.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Automate the PR workflow: rebase onto the base branch, resolve conflicts, push, and create or update the pull request.
Before starting, verify all of the following. If any check fails, stop and tell the user what needs to be fixed.
git rev-parse --is-inside-work-tree).gh CLI authenticated: Run gh auth status. If not authenticated, tell the user to run gh auth login.main or master (or whatever the base branch is). Creating a PR from the base branch to itself is not allowed.git status --porcelain. If there are uncommitted changes, ask the user how to handle them before proceeding:
Determine the base branch using this priority order:
main exists as a remote branch: git ls-remote --heads origin mainmaster exists as a remote branch: git ls-remote --heads origin mastergit symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@'If none of these resolve, ask the user to specify the base branch.
git fetch origin
This ensures the local tracking refs are up to date before rebasing.
git rebase origin/{base-branch}
If the rebase succeeds (exit code 0): proceed to Step 4.
If the rebase hits conflicts:
git diff --name-only --diff-filter=U.<<<<<<<, =======, >>>>>>>).git add {file}.git rebase --continue.If the conflicts are too complex (more than 5 files with non-trivial conflicts, or the user asks to abort):
git rebase --abort
Report the situation and suggest alternatives (merge instead, or manually resolve).
Determine whether the branch already exists on the remote:
git ls-remote --heads origin $(git branch --show-current)
Branch exists on remote:
Before force-pushing, always confirm with the user. Explain that force-push rewrites remote history and could affect collaborators.
Never force-push to main or master. This is an absolute rule — refuse even if the user asks.
After user confirmation:
git push --force-with-lease
Always use --force-with-lease (never --force) to protect against overwriting others' work.
Branch is new (not on remote):
git push -u origin $(git branch --show-current)
No confirmation needed for first push.
gh pr view --json number,title,body,url 2>/dev/null
If a PR already exists:
Ask the user:
gh pr edit).If no PR exists: proceed to Step 6 to create one.
Gather context for writing the PR description:
git log origin/{base-branch}..HEAD --oneline
git diff origin/{base-branch}...HEAD --stat
git diff origin/{base-branch}...HEAD
Read references/pr-description-template.md for the exact format to follow.
Locale detection (for description language):
ja). If in English, use English (en).ja (Japanese).Generate the PR title and description following the template. The content must be:
Creating a new PR:
gh pr create --base {base-branch} --title "{title}" --body "$(cat <<'EOF'
{generated description}
EOF
)"
Updating an existing PR:
gh pr edit --title "{title}" --body "$(cat <<'EOF'
{generated description}
EOF
)"
Before executing, show the user a preview of the title and description. Ask for confirmation or edits.
After the PR is created or updated: