rebase-onto-main

rebase-onto-main is a skill for Claude Code from cboone/agent-harness-plugins. It costs 108 tokens per session (2,234 once invoked), scanned A, original, MIT.

A procedure for fetching a repository's base branch and replaying the current feature-branch commits on top of it. Rebasing updates a branch's starting point while keeping its changes as new commits.

In plain words
What is it for?
Rebasing onto main or another base branch, resolving conflicts commit by commit, and updating the remote branch with a force-with-lease push.
Why use it?
It brings a feature branch up to date and handles conflicts before integration.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md.

Part of the rebase-onto-main plugin — 1 skill shipped together

Good fit Rebasing onto main or another base branch, resolving conflicts commit by commit, and updating the remote branch with a force-with-lease push.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cboone/agent-harness-plugins/rebase-onto-main
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 cboone/agent-harness-plugins --skill rebase-onto-main
Clone the repo
git clone --depth 1 https://github.com/cboone/agent-harness-plugins

Made for: Claude Code.

Or install rebase-onto-main, the plugin that ships this one along with the rest of its 1 skill.

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-onto-main

README.md
[![agentmods](https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/rebase-onto-main.svg)](https://agentmods.dev/skills/cboone/agent-harness-plugins/rebase-onto-main)
Your own site
<a href="https://agentmods.dev/skills/cboone/agent-harness-plugins/rebase-onto-main"><img src="https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/rebase-onto-main.svg" alt="Measured on agentmods" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,234 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.00108 $0.02234
Opus 5 $0.00054 $0.01117
Sonnet 5 $0.00022 $0.00447
Haiku 4.5 $0.00011 $0.00223

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

Security

Grade A, and why

rebase-onto-main 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 8d 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.

plugins/rebase-onto-main/skills/rebase-onto-main/SKILL.md · 230 lines

How it starts

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

Rebase Onto Main

Fetch and rebase the current feature branch onto the repository's base branch.

Options

The user may provide these options inline:

  • --base <branch>: Override the auto-detected base branch (e.g., --base develop)

Workflow

1. Pre-Flight Checks

Run these commands in parallel to understand the current state:

# Check for uncommitted changes
git status

# Detect the repository's default branch
gh repo view --json defaultBranchRef -q '.defaultBranchRef.name'

# Confirm which branch we are on
git branch --show-current

# Check whether the branch has been pushed to a remote
git rev-parse --abbrev-ref --symbolic-full-name '@{u}' 2>/dev/null || echo "no upstream"

If --base <branch> was specified, use that value instead of the detected default branch.

If gh is not available, fall back to detecting the default branch with:

git remote show origin | grep 'HEAD branch' | sed 's/.*: //'

If the current branch is the default branch itself, warn the user that rebasing the base branch onto itself is a no-op and stop.

2. Handle Uncommitted Changes

If git status shows uncommitted changes (staged or unstaged):

  1. Warn the user that there are uncommitted changes.
  2. Ask whether to:
    • Stash: Run git stash before proceeding, then git stash pop after the rebase completes.
    • Commit first: Invoke the /commit skill, then continue with the rebase.
    • Abort: Stop without doing anything.

Rebase will refuse to start with a dirty working tree, so this step is mandatory before fetching.

3. Fetch and Rebase

Capture the current HEAD so the post-rebase step can detect whether history was actually rewritten:

git rev-parse HEAD

Record this as <pre-rebase-head>. Then:

git fetch origin <base-branch>
git rebase origin/<base-branch>

Where <base-branch> is the detected or overridden base branch name.

4. Handle Rebase Result

Clean Rebase

If the rebase completes without conflicts:

Read the full file on GitHub · 230 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. 8d ago First seen · 230 lines · 108 tokens per session scan A a0f7ef428bce

Subscribe to this mod's changes

rebase-onto-main is a skill published in the GitHub repository cboone/agent-harness-plugins (2 stars, last pushed 1mo ago), licensed MIT. It adds 108 tokens to every session and 2,234 once invoked, about $0.0005 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.

Related

Other skills, from other repositories

release-check

Pre-release verification checklist. Validates features, tests, docs, security, and quality gates before shipping. Delegates to the Centinela (QA) agent.

davepoon/buildwithclaude · 36 tokens

05-review

Review a diff read-only on three axes, code, behavior versus the plan, and relevancy, into one verdict report. Use before shipping a change. Not for fixing findings or auditing a codebase.

ai-driven-dev/framework · 44 tokens

00-repo-init

Initialize a project repository with git init, a default branch, a bootstrap commit, CONTRIBUTING.md, and optionally the remote. Use when the user wants to init or set up a new repo, or publish to a remote. Not for committing, opening a PR, or tagging.

ai-driven-dev/framework · 61 tokens

01-commit

Create an atomic git commit with a conventional message, optionally pushing. Use when the user wants to commit changes, optionally pushing the branch. Not for amending, rebasing, opening a pull request, or tagging a release.

ai-driven-dev/framework · 49 tokens

02-pull-request

Create a draft pull or merge request from the current branch, in whatever VCS tool the project uses. Use when the user wants to open a pull or merge request. Not for committing, pushing, or merging a branch.

ai-driven-dev/framework · 50 tokens

03-release-tag

Cut a semver release with an annotated tag and release notes. Use when the user wants to release, tag a release, bump the version, or cut a version. Not for a plain commit, a pull request, or amending an existing tag.

ai-driven-dev/framework · 55 tokens