miki-rebase-reflectlisted
Install: claude install-skill mikiwiik/claude-code-skills
# miki-rebase-reflect
## What this does
1. **Rebase** the current branch onto the latest default branch
(`main` / `master`), resolving conflicts in-place: mechanical fixes
directly, judgment calls escalated to the user. Hand off only on
unexpected git state, not on conflicts.
2. **Reflect** on what landed in the default branch since this branch
forked — nature of the changes plus which incoming files intersect
this branch's diff.
Symbol-level cross-referencing and concrete edit recommendations stay
out of scope — those belong in the follow-up turn with full repo context.
## Preconditions
Verify in order; stop and report on first failure:
1. **No rebase / merge / cherry-pick in progress** — no
`.git/rebase-merge`, `.git/rebase-apply`, `.git/MERGE_HEAD`, or
`.git/CHERRY_PICK_HEAD`. If one exists, tell the user to finish or
abort it first (this is the kind of state we hand off, not touch).
2. **Not on the default branch.**
3. **Clean working tree** (`git status --porcelain` empty).
4. **Default branch identified.** Try `git symbolic-ref
refs/remotes/origin/HEAD`, then `git remote show origin | sed -n
's/^.*HEAD branch: //p'`. If both fail or disagree, ask the user.
## Rebase phase
Always rebase (never merge — merge cases are human judgment calls).
1. Capture fork point before fetching: `git merge-base HEAD
origin/<default>`. Save the SHA.
2. `git fetch origin <default>`.
3. List incoming: `git log --oneline <fork-point>..origin/<default>