agentleFS
sblueminsbluemin/fleet-harness/.claude/skills/rebase-on-canary/SKILL.md

rebase-on-canary

Skill18 starsChanged 2 days agoMITView on GitHub

Rebase an existing topic branch onto the latest remote canary, preserving both sides of conflicts and validating resolutions. Not for worktree creation/removal or releasing public canary.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

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

    Verify target path and branch first.

    line 19
  2. Distinctive:

    Read Remote-base rebase procedure.

    line 23
  3. Distinctive:

    Verify target/remote base and a clean tree.

    line 25
  4. Distinctive:

    After fetch, record remote-base SHA and old topic SHA.

    line 26
  5. Very specific:

    After resolving conflicts, run affected workspace tests/typecheck/build.

    line 28
  6. Very specific:

    Do not use --abort, --skip, interactive/autosquash/rebase-merges, or hook bypasses without explicit instruction.

    line 33

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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

Rebase on Canary

Replay the target topic's commits onto the latest remote base. Regardless of local-base synchronization, the fetched <remote>/<base> is the rebase and final-verification reference. This skill never pushes.

Inputs

  • <worktree_path>: absolute target; defaults to the topic in the current active worktree.
  • <base> / <remote>: default canary / origin. A main/master base requires explicit override.
  • <sync_local_base>: default yes. Mirror by fast-forward only when that base has a clean checked-out worktree; otherwise skip the mirror.
  • <conflict_mode>: default auto-resolve. With stop, return control at the first conflict without editing or continuing.

Boundaries

Verify target path and branch first. Reject topic=base or a protected topic (main/master/canary). Never stash, auto-commit, or force-restore a dirty target. Rebase a topic directly in the main checkout only when the user explicitly targets that current branch.

Execution and completion

Read Remote-base rebase procedure.

  1. Verify target/remote base and a clean tree. Do not reread already loaded instructions, but apply child CLAUDE.md rules when editing conflicted files.
  2. After fetch, record remote-base SHA and old topic SHA. Perform the optional safe local-base mirror and preview overlapping files against the remote base.
  3. If the remote base is already an ancestor of HEAD, skip the rebase and step 4 as a no-op and go to step 5: plain rebase would still flatten the topic's merge commits and replay conflicts they already resolved. Otherwise run plain rebase. By default integrate incoming and topic intent; never discard a side wholesale with -X ours/-X theirs. Regenerate derived files with their owning tools and do not guess through semantic conflicts.
  4. After resolving conflicts, run affected workspace tests/typecheck/build. Even a textually clean rebase may need relevant checks when overlapping changes interact. If validation fails, report the unresolved outcome and block downstream publishing.
  5. Confirm a clean tree, remote base as an ancestor of HEAD, zero behind count, and the expected topic commit list.

Report old/new base/topic SHA, rewrite count, per-conflict integration, checks and skipped-check reasons, and ahead/behind counts; a no-op reports rewrite count 0 and the unchanged topic SHA. If the topic was published, disclose rewritten SHAs; force-push remains a separately authorized action.

Do not use --abort, --skip, interactive/autosquash/rebase-merges, or hook bypasses without explicit instruction. Preserve and report state on ambiguous conflicts, local-base divergence, or failed validation.

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.