rebase
Skill2 starsChanged 4 months agoMITView on GitHub
Replay a branch's commits onto a new base with git rebase — update a feature branch onto the latest main, move commits onto a different base, or linearize history — safely, with conflict handling and a recovery path. Use when the user says "rebase onto main", "update my branch with the latest main", "replay my commits", "move my branch onto", "rebase this branch", or "get the latest changes into my branch without a merge commit".
- Deletes or force-pushes
- Commits and pushes
28 other projects use a version of this.
Adopted by
Most recently taken up by
- NVIDIA/k8s-test-infratheir own version, first seen Nov 15, 2026
- mjeffrey18/skillstheir own version, first seen Nov 15, 2026
- MarcusJellinghaus/mcp-workspacetheir own version, first seen Nov 14, 2026
- TDesktop-x64/tdesktoptheir own version, first seen Nov 9, 2026
- mustafarslan/skillstheir own version, first seen Nov 8, 2026
- korya/swd-skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use dependency-watch, perform-task and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
telegramdesktopSkilldependency-watch
Audit Telegram Desktop dependencies on freshly fetched origin/dev for releases and security fixes, including upstream lag and backport candidates in patched forks. Use for the scheduled dependency monitor or an explicitly requested dependency report.
Also in 5 projects that use this
telegramdesktopSkillperform-task
Resolve, start or resume, implement, review, test, and publish exactly one existing ai-tdesktop task by short slug or full dated id, including rare blocked retries and split-required results. Use when the user invokes $perform-task or /perform-task with a known task name, or when the continue scheduler delegates one selected task. Runs standard review lenses with fast applicability bailouts and selects task-specific domain and evidence instruments without selecting additional work.
Also in 5 projects that use this
JerovinoSkillprocess-inbox
Processes tasks.md inbox items by triaging each one to its proper location in the vault
Also in 5 projects that use this
Trejon-888Skillcontinue
Load project context, alignment audit, status check, suggest next action. Auto-invoke at session start, after context switches, or when user says 'continue', 'pick up where we left off', 'resume', 'what's next', 'status check', 'what now'.
Also in 6 projects that use this
lepinkainenSkillcode-health
Analyze codebase health - large files, test coverage gaps, duplicate code, dead/legacy code, and documentation issues. Use when asked to scan, audit, or assess code quality, find refactoring targets, or identify technical debt.
Also in 3 projects that use this
dekozaSkillfix-pr
Repair an existing pull request's review findings and target-branch conflicts, verify the result, and update the same open PR.
Also in 3 projects that use this
Other versions28 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 28
- telegramdesktop/tdesktop★ 34ksame name
- raine/workmux★ 3ksame name
- TDesktop-x64/tdesktop★ 3ksame name
- openmeterio/openmeter★ 2.5ksame name
- kukuruzka165/materialgram★ 1.2ksame name
- deadlock-mod-manager/deadlock-mod-manager★ 617same name
- opsmill/infrahub★ 551same name
- burhancodes/fagramdesktop★ 205same name
- fagramdesktop/fadesktop★ 205same name
- tbhb/vale-ai-tells★ 118same name
18 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository68 other files it gives its agents.
- a11ySkill
- api-docsSkill
- audit-logSkill
- benchmarkSkill
- bisectSkill
- cacheSkill
- changelogSkill
- cherry-pickSkill
- ci-setupSkill
- codeownersSkill
- commit-messageSkill
- connection-poolSkill
- contributingSkill
- coverageSkill
- db-migrateSkill
- dead-codeSkill
- debugSkill
- depsSkill
- diagramSkill
- dockerizeSkill
- docstringSkill
- e2eSkill
- env-exampleSkill
- error-handlingSkill
- explainSkill
- feature-flagSkill
- flaky-testSkill
- gitignoreSkill
- graceful-shutdownSkill
- graphqlSkill
- healthcheckSkill
- i18nSkill
- idempotencySkill
- licenseSkill
- lint-fixSkill
- loggingSkill
- migrateSkill
- mockSkill
- onboardSkill
- optimizeSkill
- paginationSkill
- pr-descriptionSkill
- pre-commitSkill
- profileSkill
- prune-branchesSkill
- rate-limitSkill
- readmeSkill
- refactorSkill
- regexSkill
- releaseSkill
- resolve-conflictsSkill
- retrySkill
- review-diffSkill
- scaffoldSkill
- secrets-scanSkill
- security-headersSkill
- seedSkill
- soft-deleteSkill
- sqlSkill
- squashSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 28 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
Fetch first: when rebasing onto a remote base so you replay onto the true latest (git fetch then rebase onto origin/main).
- Distinctive: line 33
Verify nothing was lost: After rebasing, confirm the diff against the base reflects only the intended changes and the test suite still …
- Distinctive: line 37
Never rebase with a dirty tree or without a recoverable backup (reflog/backup branch).
- Very specific: line 39
Use --force-with-lease, never a bare --force, when the rebased branch must be pushed — and only after the user confirms.
“Common” is measured: kept by at least 6 in 10 of the 28 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Branch state
!git status --short 2>/dev/null
!git branch --show-current 2>/dev/null
!git log --oneline --no-merges "$(git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null)"..HEAD 2>/dev/null | head -30
Instructions
Rebase the current branch onto the base in $ARGUMENTS (default main/master) so its commits replay on top of the latest base, giving a linear history without a merge commit. Rebasing rewrites commits — be careful and confirm before rewriting anything already pushed or shared.
Before rebasing
- Require a clean working tree. Uncommitted changes must be committed or stashed first (see the
stashskill) — rebase refuses to start dirty and a half-rebase can lose uncommitted work. - Make a safety net. Record the current tip (
git rev-parse HEAD) or suggestgit branch backup/<name>so the pre-rebase state is recoverable via the reflog if anything goes wrong. - Check whether the branch is shared. Rebasing commits others have pulled forces a
--force-pushthat rewrites their view. If the branch is already pushed, note that--force-with-leasewill be needed afterward and confirm that's acceptable. For a shared branch, a merge is often the safer choice — say so. - Fetch first when rebasing onto a remote base so you replay onto the true latest (
git fetchthen rebase ontoorigin/main).
Rebasing
- Run the rebase:
git rebase <base>(orgit rebase --onto <newbase> <upstream>to transplant only a range of commits onto a different base). - Handle conflicts as a checkpoint. On conflict, do not guess — show the conflicted files, explain both sides, resolve like a merge (see
resolve-conflicts),git addthe resolved files, thengit rebase --continue. Offergit rebase --skipfor an already-applied commit andgit rebase --abortto return cleanly to the pre-rebase state. Never leave the repo mid-rebase silently. - Don't auto-squash here. Reordering/combining commits is the
squashskill's job — this skill replays the existing commits onto a new base. Keep them intact unless the user asks otherwise. - Verify nothing was lost. After rebasing, confirm the diff against the base reflects only the intended changes and the test suite still passes — the content should match what the branch contributed before, now on top of the new base.
Rules
- Never rebase with a dirty tree or without a recoverable backup (reflog/backup branch); state the recovery path.
- On conflict, stop and let the user resolve; never guess. Always surface
--continue/--skip/--abortand never abandon the repo mid-rebase. - Use
--force-with-lease, never a bare--force, when the rebased branch must be pushed — and only after the user confirms. Don't push on their behalf unless asked. - Be cautious on shared branches: call out who is affected and offer merge as the safer alternative before rewriting.
- End with the resulting
git log --oneline, confirmation the content is intact and tests pass, and the exactgit push --force-with-leasecommand to run.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

