rebase

rebase is a skill for Claude Code from bengous/claude-code-plugins. It costs 57 tokens per session (2,040 once invoked), scanned A, original, MIT.

A Git skill for interactively rewriting the current branch's commits without opening an editor. It shows a plan for keeping, combining, editing, reordering, or removing commits and supports continuing, skipping, or cancelling a paused rewrite.

In plain words
What is it for?
Use it to clean up a branch before sharing it, change commit messages, reorder commits, or recover from a conflict during a rebase.
Why use it?
It makes history cleanup visible and controlled instead of relying on an interactive editor. It also gives clear follow-up actions when conflicts interrupt the process.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the git plugin — 3 skills shipped together

Good fit Use it to clean up a branch before sharing it, change commit messages, reorder commits, or recover from a conflict during a rebase.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add bengous/claude-code-plugins
Claude Code
/plugin install git

Made for: Claude Code.

Or install git, the plugin that ships this one along with the rest of its 3 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rebase

README.md
[![agentmods](https://agentmods.dev/badge/skills/bengous/claude-code-plugins/rebase/github.svg)](https://agentmods.dev/skills/bengous/claude-code-plugins/rebase)
Your own site
<a href="https://agentmods.dev/skills/bengous/claude-code-plugins/rebase"><img src="https://agentmods.dev/badge/skills/bengous/claude-code-plugins/rebase/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rebase

Your own site · 80×15
<a href="https://agentmods.dev/skills/bengous/claude-code-plugins/rebase"><img src="https://agentmods.dev/badge/skills/bengous/claude-code-plugins/rebase.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,040 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.02040
Opus 5 $0.00028 $0.01020
Sonnet 5 $0.00011 $0.00408
Haiku 4.5 $0.00006 $0.00204

Measured today against content hash 140c58b543a0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

rebase scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

git/skills/rebase/SKILL.md · 205 lines

How it starts

The opening of the file, as written. The whole thing — 205 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Interactive Rebase

Rewrite the commits of the current branch: keep, squash, reword or drop each one.

$ARGUMENTS selects the range, or names a follow-up:

Argument Meaning
N the last N commits (HEAD~N)
<rev> every commit since the merge base with <rev> — it edits those commits, it does not move the branch onto <rev>
X..Y every commit since X
continue | skip | abort | status act on a rebase that stopped on a conflict

The backend never opens an editor and never prompts. It prints one JSON object per call; you ask the questions and feed the answers back in. You write the message suggestions in Phase 3, and the user sees every one before it is used.

Phase 0: Follow-ups

If the argument is continue, skip, abort or status, run that mode and stop:

run `"${CLAUDE_PLUGIN_ROOT}/scripts/rebase.ts" {argument}`

Report step on success. On ok: false, report error and detail; when guidance is present, print every line of it. Then stop — no other phase runs.

exec-failed on continue or skip means a commit message was never applied and neither mode can replay it. Say so, and offer /git:rebase abort — never retry the same mode. backup_ref, when set, names the branch that still holds the history as it was before the rebase started.

Phase 1: Plan

run `"${CLAUDE_PLUGIN_ROOT}/scripts/rebase.ts" plan {argument}`
capture: exit_code, stdout, stderr

if stdout is empty OR is not valid JSON:
  STOP — report "rebase backend failed" with exit_code and stderr

plan = parse stdout as JSON

if plan.ok == false:
  STOP — report plan.error and plan.detail:
    not-a-git-repo             the command needs a git repository
    dirty-worktree             commit or stash first; detail lists the files
    rebase-already-in-progress finish it with /git:rebase continue, skip or abort
    invalid-range              detail says which revision was rejected

if plan.commits is empty:
  STOP — tell the user there is nothing to rebase in that range

Read the full file on GitHub · 205 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 205 lines · 57 tokens per session scan A 140c58b543a0

Subscribe to this mod's changes

rebase is a skill published in the GitHub repository bengous/claude-code-plugins (4 stars, last pushed yesterday), licensed MIT. It adds 57 tokens to every session and 2,040 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-11.