branch
Skill0 starsChanged 39 days agoMITView on GitHub
Split a side topic out of this chat into its own NEW chat and open it automatically - write it a capped handoff, lift the reusable procedure into skills, cross-link both directions, then launch the new chat in its own kitty tab (branch-launch.sh) seeded to continue the work. Use when the user says /branch, "I'll use a new chat for that", "fork that off", "spin that off", "split that off", "separate chat for X", "new chat for that", "what handoff can I point it at", "so it can pick that up", AND on your own initiative whenever this chat diverges into a second distinct project that no longer shares state with the first.
12 other projects use a version of this.
Adopted by
Most recently taken up by
- laz3rjenkins/atomic-commitstheir own version, first seen Nov 8, 2026
- Integralist/agent-skillstheir own version, first seen Nov 6, 2026
- egregore-labs/egregoretheir own version, first seen Nov 6, 2026
- islandhopper81/claude-skillstheir own version, first seen Nov 1, 2026
- lgtm-hq/ai-skillstheir own version, first seen Oct 13, 2026
- stijnvanhulle/agentstheir own version, first seen Sep 21, 2026
Used with
Projects with it also use issue, commit and 1 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.
AWSSkillissue
Implement a GitHub issue end-to-end — branch, code, test, docs, and commit.
Also in 3 projects that use this
SentrySkillcommit
Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.
Also in 8 projects that use this
Microsoft AzureSkilltest
Also in 3 projects that use this
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- egregore-labs/egregore★ 293same name
- ahonn/dotfiles★ 62same name
- iamneilroberts/claude-skills★ 26same name
- Integralist/agent-skills★ 23same name
- Mindgames/skills★ 4same name
- bang9/claude-code-settings★ 2same name
- stijnvanhulle/agents★ 2same name
- lgtm-hq/ai-skills★ 1same name
- c0d3ster/claude-skills★ 0same name
- islandhopper81/claude-skills★ 0same name
2 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 repository8 other files it gives its agents.
- ateSkill
- diskinstallSkill
- domainhuntSkill
- handoffSkill
- pinetbootSkill
- rsvpSkill
- sniffSkill
- sshhostSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
5
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 12
Use the triage table and the four durable homes from the handoff skill.
- Distinctive: line 24
Ask before writing anything: do the two topics still share live state?
- Distinctive: line 57
Launch the new chat; don't hand the user a line to paste: Write the opening prompt to a file and run:
- Distinctive: line 76
Auto-trigger, but say so: when you branch on your own initiative, the final message names the new tab and what moved, so a split never …
- Very specific: line 85
Do not close, /clear or /handoff this chat.
- Distinctive: line 86
Do not copy procedure text into the child handoff.
- Distinctive: line 87
Do not branch a topic whose work is already half-done in this chat's working tree.
“Common” is measured: kept by at least 6 in 10 of the 11 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
<!-- needs: the handoff skill (its triage table), kitty with remote control enabled (allow_remote_control yes), bash. --><!-- no accounts or hardware. Without kitty, do steps 1-5 and give the user the opening line to paste. -->Branch a side topic into its own chat
/handoff replaces this session when context fills: same work, next chat.
/branch splits it: a subset leaves, this chat keeps going.
Use the triage table and the four durable homes from the handoff skill; this file only
covers what is different.
Why not just fork the chat
A fork inherits the whole transcript, so the new chat opens already carrying this one's context. That is the opposite of the point, and it is what the context rollover rule exists to avoid. A branch inherits the conclusions and none of the scrollback. If the user asks for a fork, say so and offer this instead.
Only branch what is genuinely separable
Ask before writing anything: do the two topics still share live state?
- Shares a service, a file being edited, a device mid-change: do not branch. Two chats
editing one thing is how state drifts. Finish or
/handoffinstead. - Different box, different repo, different problem, only a technique in common: branch. The technique becomes a skill, which is what makes the split cheap.
Steps
- Name the scope in one line and say what stays here. If that sentence needs an "and also", the scope is wrong.
- Harvest to the durable homes first: triage exactly as
handoffdoes. The test is sharper here: anything BOTH chats will need is a skill or memory, never text copied into two handoffs. Copied text is the failure mode; it drifts and then nobody knows which is true. Example: splitting a Raspberry Pi rebuild off a remote-support chat, the no-card-reader netboot method went to thepinetbootskill, the router and switch access went to its own skill, and the new handoff kept only what was different about that one box. - Write
HANDOFF-<topic>.md, capped like any state file. It opens by naming the skills that now load on their own, and points at the existing-history.mdfor evidence rather than repeating it. It carries only what is different about this topic, plus its open items. - Cross-link BOTH directions. This is the step that earns the skill.
- Child: name the parent handoff and the history file its evidence lives in.
- Parent: remove the branched work from its open items and leave one line saying where it went. If the parent keeps carrying it, the two files drift and both go stale.
MEMORY.md: one index line for the new handoff, and for any new skill.
- Verify what the new chat will actually load.
ls ~/.claude/skills/and confirm the new skill'sdescriptioncontains the words the user would really type. A skill that does not trigger is a file nobody reads. Launch the new chat; don't hand the user a line to paste. Write the opening prompt to a file and run:
~/.claude/skills/branch/branch-launch.sh <name> <prompt-file>It opens a kitty tab titled
<name>, runsclaudethrough your shell (so thehandoffwrapper and your usual flags apply), and takes focus.<name>= topic + next number, no spaces. The prompt tells the new chat to continue, not to ask:Continuing the <topic> work, branched from <parent chat name>: read HANDOFF-<topic>.md (short, capped). The /<skill> skills carry the procedure. Carry on with its plan; stop only where it says the user's word is needed.Then check it took:
kitty @ lsshows a window titled<name>whose foreground process isclaude. Only if the launch fails, fall back to giving the user the line. Auto-trigger, but say so: when you branch on your own initiative, the final message names the new tab and what moved, so a split never happens silently.- Say what the branched chat CANNOT do. Anything this chat holds that it will not: a stopped service, a device only reachable from here, a power cycle it cannot perform. Put it in the child handoff too, not only in chat.
Do not
- Do not close,
/clearor/handoffthis chat. It keeps working. - Do not copy procedure text into the child handoff; lift it to a skill and reference it.
- Do not branch a topic whose work is already half-done in this chat's working tree.
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.

