rebase

rebase is a skill for Claude Code from ronaknnathani/relay. It costs 24 tokens per session (688 once invoked), scanned A, original, MIT.

A workflow for replaying a branch's changes on top of the latest main branch, resolving merge conflicts, and force-pushing the result. A branch is a separate line of work in a version-control system.

In plain words
What is it for?
Use it when a branch needs to be rebased onto main and its conflicts resolved before updating the remote branch.
Why use it?
It helps bring work up to date when the main branch has changed, including handling conflicting edits.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it when a branch needs to be rebased onto main and its conflicts resolved before updating the remote branch.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ronaknnathani/relay/rebase
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.

Any agent
npx skills add ronaknnathani/relay --skill rebase
Clone the repo
git clone --depth 1 https://github.com/ronaknnathani/relay

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/ronaknnathani/relay/rebase.svg)](https://agentmods.dev/skills/ronaknnathani/relay/rebase)
Your own site
<a href="https://agentmods.dev/skills/ronaknnathani/relay/rebase"><img src="https://agentmods.dev/badge/skills/ronaknnathani/relay/rebase.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 688 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.00024 $0.00688
Opus 5 $0.00012 $0.00344
Sonnet 5 $0.00005 $0.00138
Haiku 4.5 $0.00002 $0.00069

Measured 7d ago against content hash c4354cc66089, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, 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 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.

skills/rebase/SKILL.md · 98 lines

How it starts

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

Rebase — Rebase, Fix Conflicts, Push

Rebase the current branch onto the base branch (default: main), resolve any merge conflicts, and force-push.

Steps

1. Determine Base Branch

  • If $ARGUMENTS contains a branch name, use it as the base.
  • Otherwise, default to main.

2. Pre-check Working Tree

git status --porcelain

If output is non-empty, the working tree is dirty. Abort and report to the user:

Working tree has uncommitted changes. Commit or stash before rebasing:
  <output of git status --porcelain>

Do NOT auto-stash — too easy to lose work.

3. Fetch Latest

git fetch origin <BASE_BRANCH>

4. Rebase

git rebase origin/<BASE_BRANCH>

5. Handle Conflicts

If the rebase stops with conflicts:

  1. Run git diff --name-only --diff-filter=U to list conflicted files
  2. For each conflicted file:
    • Read the file to understand the conflict markers
    • Resolve the conflict by understanding both sides (ours = current branch work, theirs = base branch changes)
    • Prefer keeping our changes where they don't conflict with upstream intent
    • If unsure about a conflict, ask the user
  3. Stage the resolved files: git add <resolved-files>
  4. Continue the rebase: git rebase --continue
  5. If more conflicts appear, repeat steps 1-4
  6. Max 10 conflict rounds — if still conflicting, abort and ask the user

6. Verify

After successful rebase:

git log --oneline -5

7. Push

Check whether the branch has an upstream:

git rev-parse --abbrev-ref --symbolic-full-name @{upstream} 2>/dev/null
  • If the command fails (no upstream): the branch has never been pushed. Use:
    git push -u origin "$(git rev-parse --abbrev-ref HEAD)"
    
  • If the command succeeds: check ahead/behind state:
    ahead=$(git rev-list --count @{upstream}..HEAD)
    behind=$(git rev-list --count HEAD..@{upstream})
    
    • If both ahead == 0 and behind == 0: nothing to push, skip.
    • Otherwise (ahead, behind, or diverged): git push --force-with-lease

Read the full file on GitHub · 98 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 · 98 lines · 24 tokens per session scan A c4354cc66089

Subscribe to this mod's changes

rebase is a skill published in the GitHub repository ronaknnathani/relay (3 stars, last pushed 4d ago), licensed MIT. It adds 24 tokens to every session and 688 once invoked, about $0.0001 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-08-31.