gza-rebase
Rebase current branch onto the requested target branch, with interactive conflict resolution. Use when rebasing, merging, or resolving git conflicts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Rebase current branch onto the requested target branch, with interactive conflict resolution. Use when rebasing, merging, or resolving git conflicts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Review changes on current branch and output a structured review. Optionally post to PR with --pr flag, or apply non-blocking follow-ups inline with --apply-followups.
Run an interactive code-only review for a gza task's implementation branch and produce structured review output compatible with gza-task-improve
Check the implementation against the behavior specs in specs/behavior/. Reports where the code diverges from intended behavior — each divergence is either a code bug or a spec gap. The behavior spec is the source of truth; this skill never edits code or the spec.
Check the behavior spec set for coherence, ownership boundaries, and plain-language discipline without editing the spec or the code
Turn the recurring `watch` stuck-task pile into (1) a diagnosis of why each class is stuck, (2) the existing stuck rows actually cleared now, and (3) systemic prevention so it does not recur. Snapshots watch/incomplete/queue, buckets stuck tasks by failure class, dedups against already-tracked `system` work, unsticks each row by its clearing action (drop moot/dead/stale, spawn follow-up, hand review-loop rows to /gza-task-fix), then ranks and files `system`-tagged prevention fixes by blast radius (cascade-preventer first). Never merges, retries, resumes, deletes branches, or edits code.
Triage `gza incomplete` rows — classify each unresolved merge-unit lineage and recommend the right corrective action (drop moot leaves, escalate to fix, surface manual-resolve rebases, etc.). Never merges, retries, resumes, or deletes branches; never edits code.
| name | gza-rebase |
| description | Rebase current branch onto the requested target branch, with interactive conflict resolution. Use when rebasing, merging, or resolving git conflicts. |
| allowed-tools | Read, Edit, Glob, Grep, Bash(git:*), Bash(uv run:*), Bash(./*), Bash(make:*), Bash(npm:*), Bash(pytest:*), Bash(python:*), Bash(awk:*), Bash(sed:*) |
| version | 1.0.0 |
| public | true |
Rebase the current branch onto a local target branch, resolving any merge conflicts interactively.
Treat the current worktree root as fixed. Set:
GZA_WORKTREE_ROOT="${GZA_WORKTREE_ROOT:-/workspace}"
When not running in Docker and /workspace is not the current checkout, set GZA_WORKTREE_ROOT to the existing checkout root before running any Git command. Run every Git command as git -C "$GZA_WORKTREE_ROOT" ...; do not rely on the shell's current directory.
--continue mode: assume a rebase conflict is already in progress, skip Steps 1-3, and start directly at Step 4.
git rebase --continue cannot proceed.--auto mode: unattended rebase for background workers. Same as default mode but:
git -C "$GZA_WORKTREE_ROOT" stash pop afterwards.git fetch, git ls-remote, HTTPS fallback fetches, or modify git remotes/config. Use only local refs already present in the repo. If the required local target is missing, stop and report failure.GZA_WORKTREE_ROOT, or cannot prove the checkout root, abort and report the invalid state. Do not reconstruct branch linkage.actual_root="$(git -C "$GZA_WORKTREE_ROOT" rev-parse --show-toplevel)".GZA_WORKTREE_ROOT after path normalization. If it does not, stop and report the mismatch.git -C "$GZA_WORKTREE_ROOT" rev-parse --git-dir and ensure it resolves to this checkout's gitdir. If this is ambiguous or fails, stop.git -C "$GZA_WORKTREE_ROOT" status --porcelain)
--auto mode: if any exist, run git -C "$GZA_WORKTREE_ROOT" stash push -u to save them. They will be restored after the rebase completes.master), use that exact branch name. Do not substitute main or any other default.git -C "$GZA_WORKTREE_ROOT" symbolic-ref --quiet --short refs/remotes/origin/HEAD and strip any leading origin/.main or master exists locally by checking git -C "$GZA_WORKTREE_ROOT" show-ref --verify --quiet refs/heads/<name>.main.<resolved-target> (local - default) - Use the local branch already present in the repoorigin/<resolved-target> (remote) - Only use this when the caller explicitly asked for a remote rebase--auto mode, do not choose or synthesize a remote target. Rebase only onto the local target already provided by the caller or resolved locally in this step.--auto mode, run git -C "$GZA_WORKTREE_ROOT" fetch origin <resolved-target>git -C "$GZA_WORKTREE_ROOT" rebase <chosen-target>For each conflicted file:
git -C "$GZA_WORKTREE_ROOT" diff --name-only --diff-filter=U to list conflicted files<<<<<<<, =======, >>>>>>>)git -C "$GZA_WORKTREE_ROOT" add <file>Repeat for each conflicted file.
After all conflicts are resolved:
git -C "$GZA_WORKTREE_ROOT" rebase --continueIf changes were stashed in Step 1, run git -C "$GZA_WORKTREE_ROOT" stash pop to restore them before final verification. If stash pop introduces conflicts, resolve them before proceeding and do not report success until the current checkout is clean enough to verify.
Before declaring success, read verify_command directly from gza.yaml as the project verify_command. Also note inner_verify_command if present. If uv run gza config is available in this environment, you may use it as an optional confirmation or to inspect merged config, but do not treat gza config failure as an error when gza.yaml was readable.
inner_verify_command when configured, or otherwise use targeted tests for the files you touched.verify_command from the project root or worktree root after the rebase is fully complete, after any stashed changes have been restored, and after the last planned code change.gza.yaml has no verify_command, stop and report that it must be set before this skill can complete successfully.Show:
--auto mode, remind the user to push with git push --force-with-lease--auto mode) - if the intent isn't clear, askverify_command, not language-specific hardcoded checks--auto - do not run git branch -f, bare git checkout, git worktree repair, or ad hoc branch recovery. Stop and report invalid or confused worktree state.