Sponsor Suno AI Music arrow_forward
Slash Command

Rebase Interactive

Guide through interactive rebase to clean commit history

Type
Slash Command
GitHub stars
2.8k
License
MIT
Repo last updated
Sep 27, 2026

What Rebase Interactive is

Rebase Interactive is a slash command published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”

A slash command is a reusable prompt saved as a markdown file and run by typing its name after a slash. In Claude Code, custom commands have been merged into skills: a file in .claude/commands/ and a skill folder in .claude/skills/ both create the same kind of command, and existing command files keep working.

Rebase Interactive gives you a repeatable way to run the same instructions without retyping them, optionally with arguments.

How to install Rebase Interactive

Claude Code

  1. Download rebase-interactive.md from the repository.
  2. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md.
  3. Run it by typing / followed by its name.

Claude Cowork

  1. Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it.
  2. In Customize → Skills, click +, then upload the ZIP.
  3. Run it from any task with / and the skill name.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/packages/devops-automation-pack/plugins/01-git-workflow/commands/rebase-interactive.md, shared under the repository's MIT license. Read the full file on GitHub.

Safely clean up your commit history by squashing, reordering, or rewording commits with step-by-step guidance and safety checks.

When to Use This

  • Before creating PR (clean up messy commits)
  • Want to squash "WIP" or "fix typo" commits
  • Need to reword commit messages for clarity
  • DON'T use on commits already pushed to shared branches
  • DON'T use if unfamiliar with Git history (ask for help first)

How It Works

You are a Git rebase expert who makes history cleanup safe and understandable. When user runs /rebase-interactive or /gr:

  1. Safety check:
   # Check if commits are pushed
   git log @{u}..HEAD

   # If pushed commits found, warn user
  1. Ask how many commits to rebase: "How many recent commits do you want to modify? (or type 'all' for all unpushed commits)"
  1. Show commits that will be included:
   git log --oneline -n [count]
  1. Explain rebase options:
   Available actions:

   pick   - Keep commit as-is
   squash - Combine with previous commit
   reword - Change commit message
   edit   - Pause to amend commit
   drop   - Remove commit entirely

   What would you like to do?
   1. Squash all into one commit
   2. Custom rebase (advanced)
   3. Just reword messages
   4. Cancel
  1. Execute based on choice:

If squash all:

   git reset --soft HEAD~[count]
   # Then create single commit with combined message

If custom rebase:

   git rebase -i HEAD~[count]
   # Guide user through each commit

If reword:

   # For each commit, ask for new message
   git commit --amend -m "[new message]"
  1. Verify result:
   git log --oneline -n [count]
  1. Confirm or undo: "Happy with the result? (yes/undo)"
  1. If undo:
   git reflog
   git reset --hard [original-commit]

Required Information

  • Commit count: How many commits to modify
  • Action type: What to do with commits

Output Format

Interactive walkthrough:

Let's clean up your commit history safely.

Your recent commits:
1. abc123 - fix typo
2. def456 - WIP: still working
3. ghi789 - add user authentication
4. jkl012 - fix tests
5. mno345 - add login form

What would you like to do?
1. Squash all 5 commits into one "Add user authentication"
2. Squash commits 1,2,4 (keep 3,5 separate)
3. Just reword commit messages
4. Custom rebase (I'll guide you)
5. Cancel

Your choice:

Examples

Example 1: Squash WIP commits

User: /gr

You:

How many commits to rebase?

Your last 5 commits:
1. fix typo in login
2. WIP
3. still debugging
4. add OAuth support
5. update dependencies

Enter number (or 'all'):

User: 4

You:

You selected 4 commits. Suggested action:

Squash these 4 messy commits into:
"feat(auth): add OAuth login support"

This will:
- Remove WIP commits
- Combine related work
- Create clean history

Proceed? (yes/no/customize)

User: yes

You:

git reset --soft HEAD~4
git commit -m "feat(auth): add OAuth login support"

Result:

 Rebased successfully!

Before:
- fix typo in login
- WIP
- still debugging
- add OAuth support

After:
- feat(auth): add OAuth login support

Your history is now clean for PR!

Example 2: Reword commit messages

User: /gr

You: [Shows commits]

User: 3 (just reword)

You:

Current commits:
1. "added stuff" → Suggest: "feat(api): add user endpoints"
2. "fix" → Suggest: "fix(auth): resolve token expiration"
3. "update" → Suggest: "docs: update API documentation"

Accept suggestions? (yes/customize/cancel)

User: yes

You:

Rewriting commit messages...

 Done! Your commits now have clear, conventional messages.

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Rebase Interactive?

Rebase Interactive is a slash command for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Guide through interactive rebase to clean commit history

How do I install Rebase Interactive in Claude Code?

Download rebase-interactive.md from the repository. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md. Run it by typing / followed by its name.

Can I use Rebase Interactive in Claude Cowork?

Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it. In Customize → Skills, click +, then upload the ZIP. Run it from any task with / and the skill name.

Is Rebase Interactive safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.