agentleFS
tkadauketkadauke/syrus/.claude/skills/rebase/SKILL.md

rebase

Skill9 starsChanged 8 days agoMITView on GitHub

Use when a branch has fallen behind its base and needs its conflicts resolved to restore PR mergeability — rebase onto the base branch and leave a clean, mergeable HEAD.

  • Deletes or force-pushes

28 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use dependency-watch, perform-task and 9 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.
  • telegramdesktopSkill

    dependency-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

  • telegramdesktopSkill

    perform-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

  • JerovinoSkill

    process-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-888Skill

    continue

    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

  • lepinkainenSkill

    code-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

  • dekozaSkill

    fix-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

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 6 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 28 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run git fetch origin <base_branch> (the base branch name is given in the context above) so you have the latest base.

    line 10
  2. Very specific:

    Run git rebase origin/<base_branch> (you are already on the branch specified in the context).

    line 11
  3. Distinctive:

    If conflicts come up, resolve them mechanically — preserve both intents where possible, prefer minimal edits, never delete code that looks …

    line 12
  4. Distinctive:

    Do NOT make functional changes beyond what conflict resolution requires.

    line 17
  5. Distinctive:

    Do NOT run tests, lint, formatters, or anything else that mutates files.

    line 18
  6. Distinctive:

    If they catch real bugs introduced by the conflict resolution, that's a separate Run's problem.

    line 19
  7. Very specific:

    If, after that file-by-file attempt, you still cannot resolve a conflict mechanically because the two sides genuinely disagree on intent, …

    line 29
  8. Distinctive:

    If the two sides genuinely disagree on intent, that's the abort case in step 7.

    line 43
  9. Very specific:

    Before you start, Syrus may run setup commands from .syrus.yml at the repo root.

    line 63
  10. Distinctive:

    If a tool gives you trouble (a setup task fails because dependencies aren't installed, a linter blows up, etc.), surface that in the run's …

    line 99

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

$ARGUMENTS

Your job is to make it mergeable again. Specifically:

  1. Run git fetch origin <base_branch> (the base branch name is given in the context above) so you have the latest base.
  2. Run git rebase origin/<base_branch> (you are already on the branch specified in the context).
  3. If conflicts come up, resolve them mechanically — preserve both intents where possible, prefer minimal edits, never delete code that looks like real work just to make the rebase clean.
  4. Continue the rebase (git add <resolved files> && git rebase --continue) until it completes.
  5. Do NOT make functional changes beyond what conflict resolution requires.
  6. Do NOT run tests, lint, formatters, or anything else that mutates files. If they catch real bugs introduced by the conflict resolution, that's a separate Run's problem.
  7. You may only conclude that a conflict is not mechanically resolvable after you have attempted a file-by-file resolution of every conflicted file in the in-progress rebase. Do not abort based only on commit history, architectural summaries, naming patterns, or a high-level judgment that the branches disagree. Inspect the conflict markers and surrounding code in each file, preserve both intents where possible, stage resolved files, and run git rebase --continue until either the rebase completes or a concrete file-level contradiction remains.
  8. If, after that file-by-file attempt, you still cannot resolve a conflict mechanically because the two sides genuinely disagree on intent, abort the rebase (git rebase --abort) and explain the specific files and contradictions in submit_summary. Do NOT push a half-rebased branch.

Syrus will force-push the rebased branch to origin once you finish — your only job is to leave the working tree on a clean rebased HEAD.


Corner-cutting contract — rationalizations that show up mid-conflict, and why they don't hold here:

  • "The two sides don't quite match, but I'll pick one and move on." → If the two sides genuinely disagree on intent, that's the abort case in step 7. Don't guess at intent and push anyway.
  • "This chunk looks like a leftover conflict-marker artifact, I'll just drop it." → Don't silently drop code that looks like a conflict artifact. Preserve both intents; if you can't tell whether it's leftover cruft or real work, that's also the abort case in step 8.
  • "The branch architecture looks incompatible with main, so this is not mechanical." → That is not enough to abort. First attempt the concrete file-level merge for each conflicted file; many apparent architecture conflicts resolve mechanically once both sides are preserved in code.

Syrus context — Syrus is the automation harness running this agent inside a cloned repository. It turns GitHub issues, PR feedback, scheduled tasks, retries, and rebases into agent runs, then captures your commits and opens or updates the PR.

Before you start, Syrus may run setup commands from .syrus.yml at the repo root. Supported shape:

prepare: - bundle install - npm ci

prepare: [] or prepare: false opts out. If .syrus.yml is absent, Syrus auto-detects one setup command from common files such as Gemfile, yarn.lock, pnpm-lock.yaml, package-lock.json, or package.json. Do not edit .syrus.yml unless the task asks you to fix setup itself.

Live Syrus state — if you need to make a claim about the current Job, Workflow, Run, queue, PR, or related chat state, call the read-only read_live_state MCP tool first. Prompt text can be stale by the time you act; the tool is the approved current-state source. Do not use it to mutate jobs or queues.


Git pipeline contract — Syrus runs your work through:

commit_agent_changes → git diff origin/<default_branch>...HEAD → push → open PR

For that pipeline to work, your branch's HEAD must share history with the repo's default branch. Don't break that invariant. In particular, NEVER run any of these mid-run:

  • git checkout --orphan ... / git switch --orphan ...
  • git reset --hard <unrelated commit>
  • git rm -r . followed by re-adding everything
  • rm -rf .git && git init
  • git update-ref on HEAD or refs/heads/*
  • git commit-tree produced by yourself, then attached to HEAD

If a tool gives you trouble (a setup task fails because dependencies aren't installed, a linter blows up, etc.), surface that in the run's requested reporting channel instead of working around it via destructive git ops. Syrus would rather record "I couldn't do X because Y" and let the operator decide than have your branch silently land on an orphan and lose the work.

Sane git ops are fine — git status, git log, git diff, git add, git commit, git restore, git stash (if you pop it back). git rebase and git merge against <default_branch> are also fine — they preserve history.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.