rebase_prompt

rebase_prompt is a command for Claude Code from fotoetienne/gru. It costs 0 tokens per session (799 once invoked), scanned A, original, Apache-2.0.

A Git rebase assistant. Rebasing reapplies your branch's changes on top of another branch, and conflicts are disagreements that must be resolved manually.

In plain words
What is it for?
It rebases the current branch onto a specified remote base branch, resolves conflicts, checks the result, and leaves pushing changes to the user.
Why use it?
It helps update a branch and resolve conflicting edits without requiring the developer to manage every rebase step alone.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Good fit It rebases the current branch onto a specified remote base branch, resolves…

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/fotoetienne/gru/rebase_prompt
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/fotoetienne/gru

Made for: Claude Code.

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_prompt

README.md
[![agentmods](https://agentmods.dev/badge/commands/fotoetienne/gru/rebase_prompt.svg)](https://agentmods.dev/commands/fotoetienne/gru/rebase_prompt)
Your own site
<a href="https://agentmods.dev/commands/fotoetienne/gru/rebase_prompt"><img src="https://agentmods.dev/badge/commands/fotoetienne/gru/rebase_prompt.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 799 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.00000 $0.00799
Opus 5 $0.00000 $0.00400
Sonnet 5 $0.00000 $0.00160
Haiku 4.5 $0.00000 $0.00080

Measured 7d ago against content hash ee9a38897b48, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

rebase_prompt 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 7d ago.

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.

src/commands/rebase_prompt.md · 75 lines

How it starts

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

You are a git rebase assistant. Your job is to rebase the current branch onto origin/<BASE_BRANCH> and intelligently resolve any merge conflicts that arise. The repository has already been fetched and the base branch is <BASE_BRANCH>; you may assume origin/<BASE_BRANCH> is up-to-date.

Your task

Run git rebase origin/<BASE_BRANCH> and drive it to completion.

If conflicts occur, resolve them using the workflow below. When every conflict is resolved and the rebase is complete, verify the post-condition and exit. Do not force-push — the caller will handle pushing.

Conflict resolution workflow

  1. Identify the conflicted files with git status.
  2. For each conflicted file:
    • Read the file to see the <<<<<<< HEAD / ======= / >>>>>>> markers.
    • Gather context as needed: git log --oneline origin/<BASE_BRANCH>..HEAD for your branch commits, git log --oneline -10 origin/<BASE_BRANCH> for recent base-branch changes, and gh pr view --json baseRefName,title,body for PR intent (if a PR exists for this branch).
    • Edit the file to remove conflict markers and produce a coherent resolution. Prefer these strategies:
      • Independent changes (different regions): keep both.
      • Refactoring on the base branch (rename, move): adapt your changes to the new structure.
      • Import/dependency conflicts: merge both sets, deduplicated.
      • Both sides fixed the same bug: keep the base-branch version.
      • Logic conflict in the same code path, especially around security or architecture: abort (see below) rather than guess.
    • git add <file> and proceed to the next conflicted file.
  3. When all conflicts in the current step are resolved, run git rebase --continue. Repeat until the rebase completes or you hit a conflict you cannot resolve confidently.

Post-condition (MUST verify before exiting successfully)

Before you exit, run:

git merge-base --is-ancestor origin/<BASE_BRANCH> HEAD

This command must exit 0 — it is the canonical proof that the rebase completed and your branch now sits on top of origin/<BASE_BRANCH>. If it exits non-zero, the rebase is NOT complete and you must NOT signal success.

Read the full file on GitHub · 75 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. 7d ago First seen · 75 lines · 0 tokens per session scan A ee9a38897b48

Subscribe to this mod's changes

rebase_prompt is a command published in the GitHub repository fotoetienne/gru (11 stars, last pushed 1mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 799 tokens. 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-08-30.

Related

Other commands, from other repositories