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.
In this repository13 other files it gives its agents.
- .changelog.d/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- ai-gateway-loop-optimizationSkill
- clean-codeSkill
- console-e2eSkill
- console-handoffSkill
- console-performanceSkill
- design-sweepSkill
- git-worktreeSkill
- learning-harvestSkill
- product-proposalSkill
- pr-workflowSkill
- release-version-updateSkill
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
- Very specific: line 19
Verify target path and branch first.
- Distinctive: line 23
Read Remote-base rebase procedure.
- Distinctive: line 25
Verify target/remote base and a clean tree.
- Distinctive: line 26
After fetch, record remote-base SHA and old topic SHA.
- Very specific: line 28
After resolving conflicts, run affected workspace tests/typecheck/build.
- Very specific: line 33
Do not use --abort, --skip, interactive/autosquash/rebase-merges, or hook bypasses without explicit instruction.
≈ “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.
Files
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>: defaultcanary/origin. Amain/masterbase requires explicit override.<sync_local_base>: defaultyes. Mirror by fast-forward only when that base has a clean checked-out worktree; otherwise skip the mirror.<conflict_mode>: defaultauto-resolve. Withstop, 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.
- Verify target/remote base and a clean tree. Do not reread already loaded instructions, but apply child
CLAUDE.mdrules when editing conflicted files. - 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.
- 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. - 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.
- 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.
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.

