Rebase Plan
Drafts a pick / squash / reword plan for git rebase -i to clean up a feature branch before PR.
Entry verified April 21, 2026
The short answer
Interactive rebase is the right tool for consolidating wip commits — and also the one most people get wrong on their first try. This skill reads git log main..HEAD, proposes which commits to squash, and prints the exact todo-list your editor will show.
When to use it
Branch has typo-fixup-wip commits you want to consolidate into 1–3 clean commits before opening a PR. Never on branches already pushed to a shared remote.
Setup
- 1
Save as ~/.claude/commands/rebase-plan.md. Skill runs git log main..HEAD --oneline and proposes a rebase-todo.
- 2
Output includes the exact command (git rebase -i main) and the proposed squash/reword plan.
- 3
Skill refuses to execute the rebase itself — humans drive the editor.
Example
You: /rebase-plan
Claude: [reads 8 commits on feature/claude-pivot]
Proposed plan:
pick a1b2c3 feat: add Skills hub
squash d4e5f6 fixup
squash g7h8i9 typo
reword j0k1l2 → refactor: CTA swap
Run: git rebase -i mainSource & attribution
- Author
- Bryan Collins
- Licence
- MIT (author's own work)
- Type
- Original
Original pattern published under MIT — attribution preserved by convention, not licence requirement.
Caveats
Never rebase branches already pushed to shared remotes — it rewrites history other people have cloned.
56 skills across 10 categories, all licence-verified.