Fetch the latest default branch and rebase the current branch on top of it, resolving any merge conflicts automatically.

GPL-3.0Auto-check passedDevelopment

Install Rebase

skills CLI
$ npx skills add deadlock-mod-manager/deadlock-mod-manager --skill rebase -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install deadlock-mod-manager/deadlock-mod-manager rebase --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/deadlock-mod-manager/deadlock-mod-manager.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/rebase .claude/skills/rebase && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rebase
GitHub stars
473
Token cost
~1.9k tokens
SKILL.md length
832 words
Files
1
Skills in repo
23
Repo updated
First seen
Licence
GPL-3.0

At a glance

Fetch the latest default branch and rebase the current branch on top of it, resolving any merge conflicts automatically.

  • Works in 6 steps: Pre-Flight Checks → Fetch the Latest Base → Start the Rebase → …
  • Asked to rebase
  • SKILL.md covers Step 1: Pre-Flight Checks, Step 2: Fetch the Latest Base, Step 3: Start the Rebase and Step 4: Resolve Conflicts (Loop), plus 3 more sections
  • Calls git, cargo and pnpm

What it does

Rebase is an agent skill from deadlock-mod-manager/deadlock-mod-manager. Fetch the latest default branch and rebase the current branch on top of it, resolving any merge conflicts automatically. Use when asked to "rebase", "rebase on main", "update branch with main", "sync with main", "rebase onto latest", or "/rebase".

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git workflow. It works with Git. The repository describes itself as: A mod manager for the Valve game Deadlock. The licence is GPL-3.0.

When your agent uses it

  • Asked to rebase
  • Update branch with main
  • Rebase onto latest

Example prompts

  • “rebase”
  • “rebase on main”
  • “update branch with main”
  • “/rebase”

Requirements

  • Node.js

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Pre-Flight Checks
  2. Fetch the Latest Base
  3. Start the Rebase
  4. Resolve Conflicts (Loop)
  5. Post-Rebase Validation
  6. Report

What it can do on your machine

Read from SKILL.md and the folder at commit 8bb56d1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • cargo
    • pnpm
    • gh
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, pnpm, gh and npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Rebase loads about 1.9k tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 832 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~64
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from deadlock-mod-manager/deadlock-mod-manager at commit 8bb56d1, republished under its GPL-3.0 licence (© deadlock-mod-manager). 832 words, ~1,937 tokens.

Download SKILL.mdSave it as .claude/skills/rebase/SKILL.md (or your agent's skills folder).
name
rebase
description
Fetch the latest default branch and rebase the current branch on top of it, resolving any merge conflicts automatically. Use when asked to "rebase", "rebase on main", "update branch with main", "sync with main", "rebase onto latest", or "/rebase".

Rebase Current Branch on Latest Main

Fetch the latest default branch from origin and rebase the current branch on top of it, resolving conflicts as they appear. Do not push unless the user asks.

Step 1: Pre-Flight Checks

Before doing anything, verify the working tree state:

  1. Run git status --porcelain=v1 --branch. Confirm there are no uncommitted changes. If there are:
    • List them to the user
    • Ask whether to stash (git stash push -u -m "rebase-skill autostash") or abort
    • Do NOT silently discard work
  2. Run git rev-parse --abbrev-ref HEAD to capture the current branch name. If it is main, master, or the default branch, stop and tell the user there is nothing to rebase.
  3. Determine the default branch:
    bash
    gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
    Fall back to git symbolic-ref refs/remotes/origin/HEAD --short | sed 's@^origin/@@' if gh is unavailable. Cache the result as $BASE.
  4. Confirm an origin remote exists with git remote get-url origin.

Step 2: Fetch the Latest Base

Fetch only what is needed and prune stale refs:

bash
git fetch --prune origin "$BASE"

If the fetch fails (network/auth), report the exact error and stop. Do not start a rebase against stale refs.

Step 3: Start the Rebase

Run:

bash
git rebase "origin/$BASE"

Capture both stdout and stderr. There are three outcomes:

OutcomeHow to DetectAction
Clean rebaseExit 0, no CONFLICT linesGo to Step 5
ConflictsExit non-zero, output contains CONFLICT or could not applyGo to Step 4
Other failureExit non-zero without conflict markersRun git rebase --abort, restore any stash from Step 1, report error, stop

Step 4: Resolve Conflicts (Loop)

Repeat this loop until git status reports the rebase is no longer in progress.

4a. Inventory the Conflicts

Run git status --porcelain=v1. Conflicted files are marked UU, AA, DU, UD, AU, UA, or DD.

For each conflicted file:

  • Read the full file (do not rely on <<<<<<< markers alone for context)
  • Identify the conflict regions delimited by <<<<<<<, =======, >>>>>>>
  • Identify which side is "ours" (the rebased commit being replayed) and "theirs" (the base branch tip). During git rebase, "ours" is the upstream base and "theirs" is the commit being replayed — this is the opposite of git merge. Verify with git log --oneline -1 HEAD and git log --oneline -1 REBASE_HEAD if unsure.
4b. Resolve Each File

Apply this decision logic per conflict region:

SituationResolution
Lockfiles (pnpm-lock.yaml, Cargo.lock, package-lock.json, yarn.lock, bun.lockb, uv.lock)Take the base branch version, then regenerate (pnpm install, cargo build, npm install, etc.) at the end of the rebase, not per-step
Generated files (build output, snapshots, codegen)Take the base branch version and regenerate after the rebase completes
Both sides changed unrelated lines in the same hunkCombine both changes, preserving intent from each
Same line changed differently with clear semantic conflictRead surrounding code, infer intent, prefer the change that is consistent with the rest of the diff being replayed; if ambiguous, ask the user
Import/export lists, CHANGELOG.md, version bumpsMerge by union (keep entries from both sides, deduplicated, sorted as the file dictates)
Whitespace-only / formatting-only conflictsTake whichever side matches the project's formatter; run the formatter after if needed
Truly ambiguous business logicStop, present both versions to the user with file paths and line ranges, and ask which to keep

After editing, ensure no <<<<<<<, =======, or >>>>>>> markers remain:

bash
git grep -nE '^(<{7}|={7}|>{7})( |$)' -- ':(exclude)*.md'
Show full SKILL.md (299 more words)Show less
4c. Stage and Continue
bash
git add <resolved files>
git rebase --continue

If the rebase reports "No changes - did you forget to use 'git add'?", the commit became empty after resolution. Run git rebase --skip.

If new conflicts appear on the next commit, return to step 4a.

If at any point you are stuck (more than 2 attempts on the same file produce conflict markers, or the user asked to stop), run git rebase --abort, restore the stash, and report.

Step 5: Post-Rebase Validation

Once the rebase completes:

  1. Confirm state: git status should show "nothing to commit, working tree clean" and the branch ahead of origin/$BASE.
  2. If lockfiles or generated files were taken from base in Step 4, regenerate them now:
    • pnpm install if pnpm-lock.yaml was touched
    • cargo build (or cargo check) if Cargo.lock was touched
    • The project-appropriate codegen command for any generated sources Stage and amend into the relevant commit only if regeneration produced changes; otherwise leave alone.
  3. If a stash was created in Step 1, ask the user before popping it (git stash pop).

Step 6: Report

Tell the user:

  • The base branch and SHA you rebased onto (git rev-parse --short "origin/$BASE")
  • How many commits were replayed (git rev-list --count "origin/$BASE..HEAD")
  • Which files had conflicts and a one-line summary of how each was resolved
  • Any follow-up they should do (e.g., "lockfile regenerated, please verify"), and whether a force-push is required (git push --force-with-lease) — but do not push unless explicitly asked

Hard Rules

  • NEVER run git push --force (without --with-lease) on the user's behalf
  • NEVER push at all unless the user explicitly asks
  • NEVER run git rebase --skip to bypass conflicts you do not understand — only for genuinely empty commits
  • NEVER discard uncommitted work without explicit confirmation
  • NEVER resolve a conflict by deleting code from one side without reading both sides in full

© deadlock-mod-manager, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/rebase of deadlock-mod-manager/deadlock-mod-manager.

Open the folder on GitHubat commit 8bb56d1

Compare with similar skills

Rebase next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Rebase compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rebase this skilldeadlock-mod-manager/deadlock-mod-manager473—~1.9kAutomated safety check: PassGPL-3.0
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Code Design Rationale Investigatorcursor/plugins10k9 repos~2.6kAutomated safety check: PassNone
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Migrate Internal Package into GhostTryGhost/Ghost55k—~3.8kAutomated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Official

    Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.

    10k GitHub starsUsed in 9 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.

    55k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Git Merge Conflict Resolver

    tailcallhq/forgecode

    Resolves Git merge conflicts with a plan-first workflow that keeps both sides' intent, regenerates lock files and backs up deleted-but-modified files.

    7.6k GitHub starsUsed in 1 repo~4.5k tokens
    DevelopmentAuto-check passed

More from deadlock-mod-manager/deadlock-mod-manager

All 23 skills in this repo
  • Skill Creator

    deadlock-mod-manager/deadlock-mod-manager

    Create new agent skills following the Agent Skills specification.

    473 GitHub starsUsed in 1 repo~2.9k tokens
    Auto-check passed
  • Create Auth Skill

    deadlock-mod-manager/deadlock-mod-manager

    Scaffold and implement authentication in TypeScript/JavaScript apps using Better Auth.

    473 GitHub starsUsed in 4 repos~3.4k tokens
    Auto-check passed
  • Opensrc

    deadlock-mod-manager/deadlock-mod-manager

    Fetch source code for npm, PyPI, or crates.io packages and GitHub/GitLab repos to provide AI agents with implementation context beyond types and docs.

    473 GitHub stars~910 tokensUpdated yesterday
    Auto-check passed
  • Security Review

    deadlock-mod-manager/deadlock-mod-manager

    Security code review for Tauri/Rust/TypeScript desktop apps and Hono/oRPC APIs.

    473 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Babysit

    deadlock-mod-manager/deadlock-mod-manager

    Stay on one pull request until it is merge-ready, fixing the highest-priority blocker and waiting when nothing is actionable.

    473 GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • Changeset

    deadlock-mod-manager/deadlock-mod-manager

    Generate a changeset file describing the current PR's changes.

    473 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Rebase

What does Rebase do?

Fetch the latest default branch and rebase the current branch on top of it, resolving any merge conflicts automatically. Rebase is an agent skill from deadlock-mod-manager/deadlock-mod-manager. Fetch the latest default branch and rebase the current branch on top of it, resolving any merge conflicts automatically.

When should I use Rebase?

Rebase fits situations like: asked to rebase; update branch with main; rebase onto latest.

How do I install Rebase in Claude Code?

Run `npx skills add deadlock-mod-manager/deadlock-mod-manager --skill rebase -a claude-code`. Or copy the skill folder (.agents/skills/rebase in deadlock-mod-manager/deadlock-mod-manager) into .claude/skills/rebase in your project. Claude Code loads it when a task matches its description.

How do I install Rebase in Codex?

Run `npx skills add deadlock-mod-manager/deadlock-mod-manager --skill rebase -a codex`. Or copy the skill folder (.agents/skills/rebase in deadlock-mod-manager/deadlock-mod-manager) into .agents/skills/rebase in your project. Codex loads it when a task matches its description.

Can I use Rebase in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add deadlock-mod-manager/deadlock-mod-manager --skill rebase -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rebase, .gemini/skills/rebase, .github/skills/rebase and .opencode/skills/rebase in your project.

What does Rebase need to run?

Going by SKILL.md and its folder, Rebase needs the command-line tools its instructions call (git, cargo, pnpm, gh and npm). Our summary lists: Node.js.

Does Rebase access the network?

SKILL.md contains no URLs. Its commands use git, gh and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Rebase safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Rebase use?

Rebase is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Rebase use?

About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Rebase?

Skills that share tags, products or a category with Rebase: Finishing a Development Branch (obra/superpowers, 296k stars), Code Design Rationale Investigator (cursor/plugins, 10k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars) and Migrate Internal Package into Ghost (TryGhost/Ghost, 55k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rebase?

deadlock-mod-manager (a GitHub organization) maintains it in deadlock-mod-manager/deadlock-mod-manager, which has 473 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on October 6, 2026.

Source: deadlock-mod-manager/deadlock-mod-manager on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.