Skip to content
Agent Orchestration
Skill

/rebase-safely

Rebase, squash, or rewrite history without losing work or breaking shared branches. Use before any history rewrite.

BOOST
From plugin
loopkit
75553 skills1 agent4 commands2 MCP
Install
$ npx -y skills add Archive228/loopkit --skill rebase-safely --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/rebase-safely

Context preview

The summary Claude sees to decide when to auto-load this skill.

Rebase, squash, or rewrite history without losing work or breaking shared branches. Use before any history rewrite.

SKILL.md

rebase-safely.SKILL.md
name: rebase-safely
description: Rebase, squash, or rewrite history without losing work or breaking shared branches. Use before any history rewrite.
when_to_use: rebase, squash, "update my branch", interactive rebase, force-push

Rebase Safely

1. **Backup first** — `git branch backup/<name>` before any rewrite. Free undo. 2. Rebase onto the latest base: `git fetch; git rebase origin/main`. 3. Resolve conflicts one commit at a time. Test after the rebase, not just that it "completed". 4. **Never rewrite shared history** — if others pulled the branch, rebasing it forces them into pain. Rewrite only your own un-pushed/un-shared commits. 5. Push with `--force-with-lease`, never bare `--force` (lease refuses if someone else pushed). If anything goes sideways: `git reflog` finds the pre-rebase state; `git reset --hard backup/<name>` restores it.

Ships withloopkit

33 battle-tested skills + minimal .claude harness for any coding agent (Claude Code, Cursor, Codex, Gemini CLI).

Get the whole plugin

Other skills on loopkit.