smart-rebaselisted
Install: claude install-skill tonkotsuboy/smart-rebase-skill
# smart-rebase — rebase onto the base branch and force-push
The whole workflow is in `scripts/rebase-sync.sh`, split into subcommands so a
conflict can stop the run, get fixed, and resume. Drive the script — don't
hand-roll `git fetch`/`rebase`/`push` calls, because the script also carries the
safety checks (refuse on the base branch, lease-protected push, autostash).
`$SKILL_DIR` below is this skill's directory.
## Three paths, decided by `preflight`
The guiding principle: **prefer the tool that already knows how to do this
safely over a hand-rolled sequence.** `gh` covers two situations better than
local git can — a chain of stacked PRs, and a plain PR that just needs catching
up — so reach for those first and fall back to local git only when neither fits.
`preflight` prints a `STACK:` line and a `SERVER:` line, and together they route
everything that follows:
| preflight says | Path | Why it wins |
|---|---|---|
| `STACK: stack` | **Stack path** — `stack-sync` | Cascade-rebases the whole chain |
| `SERVER: eligible` | **Server path** — `server-sync` | GitHub rebases; no local force-push |
| otherwise | **Plain path** — `rebase` → `push` | Handles everything else, incl. conflicts |
Check `STACK:` first — it outranks `SERVER:`, because updating one PR branch of a
stack in isolation strands the layers above it.
Also read `STATUS:` before doing any work. `up-to-date` means the base is already
contained in this branch and nothing needs to happen — say so and stop rather