ワンクリックで
rebase
Rebase a feature branch onto a target branch, resolving conflicts intelligently. Use when a branch is behind and needs updating.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Rebase a feature branch onto a target branch, resolving conflicts intelligently. Use when a branch is behind and needs updating.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Close a GitHub issue with discipline — resolved, superseded, or duplicate. Pre-flights body + comments, migrates substance before destroying context, cross-links both directions.
File a new GitHub issue with duplicate search, scope decision, label discovery, and preview before posting. Prevents fragmented or silently-filed issues.
Restructure the topology of GitHub issues — split one into many focused replacements, or merge multiple into one keeper. Migrates substance and cross-links before closing anything.
Update an existing GitHub issue — edit body, post a comment, retag, or reopen. Pre-flights body + comments; acknowledges stale framing instead of silently rewriting.
Review and address PR feedback using 6-dimensional code review
Structured code review using 6 dimensions. Works with or without the code-reviewer agent.
| name | rebase |
| description | Rebase a feature branch onto a target branch, resolving conflicts intelligently. Use when a branch is behind and needs updating. |
| argument-hint | [target branch] |
| allowed-tools | Bash(git rebase*), Bash(git fetch*), Bash(git status*), Bash(git diff*), Bash(git log*), Bash(git add*), Bash(git stash*), Bash(git branch*), Bash(git rev-parse*), Bash(git merge-base*), Bash(git show*), Bash(git checkout*), Bash(GIT_SEQUENCE_EDITOR*), Bash(${CLAUDE_PLUGIN_ROOT}/skills/rebase/*), Bash(${CLAUDE_PLUGIN_ROOT}/skills/shared/discover-verification-cmd.sh*), Bash(${CLAUDE_PLUGIN_ROOT}/skills/shared/is-branch-shared.sh*), Read, Grep, Glob |
Rebase the current feature branch onto a target branch, handling conflicts automatically with full context awareness.
Update a feature branch by replaying its commits onto a target branch (default: origin/main), resolving any conflicts intelligently.
git log for the target branch changes to the conflicting file before resolving. Never blindly pick one side.--no-verify — Hooks exist for a reason. Fix issues, don't skip them.main)Run the pre-flight script (validates branch, fetches remote, checks for collaboration, stashes if needed):
target=$(${CLAUDE_PLUGIN_ROOT}/skills/rebase/preflight.sh "${ARGUMENTS:-origin/main}")
The script exits 1 if on main/master or if other authors are detected on a published branch. It prints the target branch to stdout and stash info to stderr.
${CLAUDE_PLUGIN_ROOT}/skills/rebase/assess.sh "$target"
Shows commits to replay, files that may conflict, and the merge base.
git rebase $target
If this succeeds cleanly, skip to step 5.
When rebase stops for conflicts:
# See which files have conflicts
git diff --name-only --diff-filter=U
For each conflicting file, follow the sequence in DETAIL: Resolving Individual Conflicts. Then:
git rebase --continue
Repeat if subsequent commits also conflict.
# Verify commit history looks right
git log --oneline $target..HEAD
# Restore stashed changes if we stashed in step 1
[ -n "$STASH_REF" ] && git stash pop "$STASH_REF"
Run the project's validation command:
cmd=$(${CLAUDE_PLUGIN_ROOT}/skills/shared/discover-verification-cmd.sh)
eval "$cmd"
Report validation results. If validation fails, the rebase is complete but the branch has integration issues that need fixing.
Print:
git push --force-with-lease reminder)If a rebase is going badly and you need to start over:
git rebase --abort
This restores the branch to its pre-rebase state. Use when:
Always check for a rebase in progress before starting a new one:
# Check if a rebase is already in progress
git rev-parse -q --verify REBASE_HEAD >/dev/null 2>&1
For each conflicting file discovered by git diff --name-only --diff-filter=U:
Read to see the full file with <<<<<<<, =======, >>>>>>> markersgit log -p $target -- <file> to see what changed on the target and whygit show REBASE_HEAD -- <file> to see what changed in the commit being replayedgit add <file>After all conflicts in the current commit are resolved, run git rebase --continue to move to the next commit.
Binary files can't be merged. Choose one side:
# NOTE: In rebase, --ours/--theirs are swapped from merge semantics!
git checkout --ours <file> # Keep target branch version (branch we're rebasing onto)
git checkout --theirs <file> # Keep rebased commit version (our changes being replayed)
git add <file>
Default to --theirs (keep rebased commit version) for most binaries, since we're replaying our commits. Only ask the user if the file is manually-edited content with ambiguous intent (e.g., images, documents).
Regenerate rather than merge:
git checkout --theirs pnpm-lock.yaml # Take target's version
pnpm install # Regenerate with our deps
git add pnpm-lock.yaml
For files like flake.lock, .terraform.lock.hcl, or similar — take the target version and regenerate:
git checkout --theirs <lockfile>
# Run the appropriate regeneration command
git add <lockfile>
When one side deleted a file and the other modified it:
# Check what each side did
git log --oneline --follow $target -- <file> # Was it deleted on target?
git log --oneline HEAD -- <file> # Did we modify it?
If target deleted it intentionally (refactor, migration), accept the deletion. If our changes are important, keep the file and adapt.
Use the squash script for non-interactive operations:
# Squash all commits into one
${CLAUDE_PLUGIN_ROOT}/skills/rebase/squash.sh squash $target
# Drop a specific commit by SHA
${CLAUDE_PLUGIN_ROOT}/skills/rebase/squash.sh drop $target <short-sha>
# Reword a commit
${CLAUDE_PLUGIN_ROOT}/skills/rebase/squash.sh reword $target <short-sha>
The script automatically detects your sed flavor (GNU or BSD) and applies the correct sed -i syntax.
/commit — Quality-gated conventional commits/open-pr — Open PR with validation (often follows rebase)/review-pr — Address review feedback