rebase

A procedure for rebasing the current Git branch, which means replaying its changes on top of another branch. It can use a configured base branch, a local branch, or a remote branch such as origin/main.

In plain words
What is it for?
Use it to update a branch from its base, rebase onto local or remote branches, and resolve conflicts while preserving existing uncommitted changes.
Why use it?
It handles common preparation work before rebasing, including checking for local changes, temporarily stashing them, and fetching remote branches when needed. This reduces the risk of losing uncommitted work during the operation.

Skill for Claude CodeCodex

Part of the workmux-status plugin — 6 skills, 23 commands, 2 hooks shipped together

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.

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

Made for: Claude Code, Codex.

Or install workmux-status, the plugin that ships this one along with the rest of its 6 skills, 23 commands, 2 hooks.

Per session 13 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 616 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00013 $0.00616
Opus 5 $0.00006 $0.00308
Sonnet 5 $0.00003 $0.00123
Haiku 4.5 $0.00001 $0.00062

Measured 3d ago against content hash bd610467a11b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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 · 61 lines

What it actually says

Rebase the current branch.

Arguments: $ARGUMENTS

Behavior:

  • No arguments: rebase on the current branch's workmux base branch (git config branch.<current>.workmux-base), falling back to local main when none is configured
  • "origin": fetch origin, rebase on origin/main
  • "origin/branch": fetch origin, rebase on origin/branch
  • "branch": rebase on local branch (use "main" to force a rebase on local main)

Steps:

  1. Check for local changes with git status --porcelain:
    • If the working tree has staged, unstaged, or untracked changes, stash them with git stash push --include-untracked -m "workmux rebase".
    • Remember whether this command created a stash. Existing stash entries must remain untouched.
    • If stashing fails, stop before fetching or rebasing.
  2. Parse arguments:
    • No args → target is the current branch's workmux base branch (git config --get branch.$(git branch --show-current).workmux-base); if that is empty, target is "main". No fetch.
    • Contains "/" (e.g., "origin/develop") → split into remote and branch, fetch remote, target is remote/branch
    • Just "origin" → fetch origin, target is "origin/main"
    • Anything else → target is that branch name, no fetch
  3. If fetching, run: git fetch <remote>. If fetching or target resolution fails before the rebase begins, restore the stash created in step 1 before stopping.
  4. Run: git rebase <target>
  5. If conflicts occur, handle them carefully (see below)
  6. Continue until rebase is complete
  7. If step 1 created a stash, restore it with git stash pop --index:
    • Restore the stash only after the rebase succeeds.
    • If restoration conflicts, preserve the stash, report the conflicts, and leave the affected files for manual resolution.

Handling conflicts:

  • BEFORE resolving any conflict, understand what changes were made to each conflicting file in the target branch
  • For each conflicting file, run git log -p -n 3 <target> -- <file> to see recent changes to that file in the target branch
  • The goal is to preserve BOTH the changes from the target branch AND our branch's changes
  • After resolving each conflict, stage the file and continue with git rebase --continue
  • If a conflict is too complex or unclear, ask for guidance before proceeding
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. 3d ago First seen · 61 lines · 13 tokens per session scan A bd610467a11b

Subscribe to this mod's changes

rebase is a skill published in the GitHub repository raine/workmux (2,351 stars, last pushed yesterday), licensed MIT. It adds 13 tokens to every session and 616 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-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens