agentleFS
bostonaholicbostonaholic/team/skills/pr-rebase/SKILL.md

pr-rebase

Skill11 starsChanged 4 months agoMITView on GitHub

Use for branch rebases only on explicit request. Never infer from a behind branch. Rebases onto the branch base.

  • Deletes or force-pushes
  • Commits and pushes

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never take a side whole, never git rebase --skip, and ask the user when the code and its history do not decide.

    line 29

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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

pr-rebase — rebase onto the latest base

Fetch the base, rebase the current branch onto it, resolve conflicts from both sides' intent, and confirm the branch still works before publishing it.

  • Base. Resolve it from $ARGUMENTS when that names a PR number or URL — a failed lookup stops the run — otherwise from the repository's default branch (git symbolic-ref refs/remotes/origin/HEAD), then main. Fetch it from origin, or from the remote that owns the base repository when they differ. The argument selects the base only; the branch rebased is always the current checkout.
  • Pre-flight. Refuse to start on a dirty tracked tree, a rebase or merge already in progress, or a checkout of the base branch itself. Record git rev-parse HEAD as the recovery point, report git reset --hard <sha> whenever the run stops, and run the project's checks once, keeping each result.
  • Rebase the checkout onto the fetched base, with --rebase-merges when the branch contains merge commits. On a conflict, read the stages (git show :1:, :2:, :3:) and keep both sides' intent. During a rebase --ours is the base and --theirs is your commit — the reverse of a merge. Never take a side whole, never git rebase --skip, and ask the user when the code and its history do not decide.
  • Verify by re-running the same checks. A check that passed before and fails now stops the run, as does an undecided conflict; nothing reaches the remote while either stands.
  • Publish with git push --force-with-lease=<branch>:<pre-fetch-sha> --force-if-includes, the lease sha captured before the fetch. Never use a bare --force; a branch that was never pushed gets git push -u instead. The explicit invocation authorized the rewrite — do not stop to confirm it.

Report the base and its source, the commits replayed, the conflicts resolved, the before/after checks, and whether the push happened. Does not wait for CI and does not merge.

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.