一键导入
rebase
Interactive rebase onto a base branch, resolving conflicts along the way and verifying tests pass. Compares against remote when done.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Interactive rebase onto a base branch, resolving conflicts along the way and verifying tests pass. Compares against remote when done.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Show pull requests that need review, ranked by ease of review. Displays PRs as clickable links with line counts, grouped as a dependency tree when PRs build on each other.
Evaluate unresolved review comments on the current branch's PR and, after user confirmation, address each in a separate sub-agent and separate commit.
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Like grill-me, but asks one structured, numbered question at a time with multiple-choice options. Use when the user wants a disciplined interview to stress-test a plan or design, or mentions "interview me".
Evaluate pending (unsubmitted) review comments on the current branch's PR and, after user confirmation, address each in a separate sub-agent and separate commit.
Run bin/claude-review --print and automatically fix all reported issues, committing each fix individually.
Review and merge open Dependabot pull requests
| name | rebase |
| description | Interactive rebase onto a base branch, resolving conflicts along the way and verifying tests pass. Compares against remote when done. |
| disable-model-invocation | true |
| user-invocable-only | true |
| allowed-tools | Bash, Read, Glob, Grep, Agent, Skill, AskUserQuestion |
| argument-hint | ["base-branch"] |
Rebase the current branch onto a base branch, resolving conflicts and verifying tests along the way.
Before anything else, check whether a rebase is already underway:
git rev-parse --git-path rebase-merge >/dev/null 2>&1 && ls "$(git rev-parse --git-path rebase-merge)" >/dev/null 2>&1 && echo "rebase in progress" || (ls "$(git rev-parse --git-path rebase-apply)" >/dev/null 2>&1 && echo "rebase in progress")
If a rebase is already in progress, skip Steps 1–2 entirely. Assume the task is to resolve the outstanding conflicts and continue the rebase: go straight to Step 3. Treat the base branch as the one already being rebased onto — you do not need to determine or fetch it.
Otherwise, continue to Step 1.
Determine the base branch in this order:
$ARGUMENTS if the user specifies a branchgit config branch.$(git branch --show-current).parent, if set and it still resolves to a commitbin/base-branch if the script exists and is executableFetch latest and begin the rebase:
git fetch origin
git rebase origin/<base-branch>
If the rebase completes with no conflicts, skip to Step 6.
git diff --name-only --diff-filter=Ugit addIf a conflict is ambiguous and you can't confidently determine the correct resolution, ask the user.
Run the tests related to the files that had conflicts. If tests fail due to the conflict resolution, fix them before proceeding.
If tests fail but seem unrelated to the rebase, verify by stashing and testing:
git stash
# run tests again
git stash pop
If you are unable to resolve test failures, let the user know what's broken and what you tried.
git rebase --continue
If there are more conflicts, go back to Step 3. Repeat until the rebase is complete.
If a tracked parent is set for this branch (git config branch.$(git branch --show-current).parent), update it so later tooling stays in sync and doesn't act on a stale parent ref:
branch=$(git branch --show-current)
git config "branch.$branch.parent" "<base-branch>"
git update-ref "refs/parent/$branch" "$(git rev-parse origin/<base-branch>^{commit})"
Skip this step if no tracked parent is set.
Check if a remote tracking branch exists:
git rev-parse --verify @{u} 2>/dev/null
If a remote branch exists, run the /remote-diff skill to compare the rebase result against the remote and flag any potential issues.
If no remote branch exists, skip this step and report that the rebase is complete.