babysit-worktree
Skill4 starsChanged 25 days agoMITView on GitHub
Create an isolated git worktree and switch this session into it so all further changes happen there, keeping the main checkout clean. Use when the user says "/babysit-worktree", "work in a worktree", or wants this session's changes isolated from the main working copy. Pair with kill-worktree to fold the work back.
- Commits and pushes
In this repository8 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- babysit-prSkill
- babysit-ticketSkill
- kill-worktreeSkill
- masterdeck-notesSkill
- masterSkill
- queueSkill
- worktree-janitorSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Check current state first: Run git status in the current repo:
- Very specific: line 22
Enter: Use the EnterWorktree tool with a task-descriptive name (e.g.
- Distinctive: line 40
Do not edit files in the main checkout while the worktree session is active — the whole point is isolation.
- Distinctive: line 46
If your workspace has several repos: worktrees are per-repo.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
babysit-worktree — isolate this session's changes in a worktree
Goal: everything this session edits from now on lands in a dedicated worktree under
.claude/worktrees/, not in the main checkout. The main working copy stays untouched
for other sessions, editors, or running services.
Steps
- Check current state first. Run
git statusin the current repo:- Uncommitted changes the user wants in the worktree will NOT follow automatically —
the worktree branches fresh. Either commit them first, or carry them over with
git stash push -unow andgit stash popinside the worktree after entering (stashes are shared repo-wide, visible from every worktree). - Already inside a worktree session? Say so and stop — one at a time; run kill-worktree (or ExitWorktree) first.
- Uncommitted changes the user wants in the worktree will NOT follow automatically —
the worktree branches fresh. Either commit them first, or carry them over with
- Enter. Use the EnterWorktree tool with a task-descriptive
name(e.g.fix-coupon-rounding). Do not use rawgit worktree add— the tool also switches the session's working directory and registers exit-time cleanup.- Note the base ref: with default settings (
worktree.baseRef: fresh) the new branch starts fromorigin/<default-branch>— NOT from the local HEAD. If the task must build on unpushed local commits, tell the user and either push them first or ask them to setworktree.baseRef: "head"in settings.
- Note the base ref: with default settings (
- Confirm. Report the worktree path and branch (
git worktree list,git branch --show-current). All subsequent edits, commits, test runs, and PR creation in this session happen here. - Work as normal. The babysit-pr hooks and skill still apply —
gh pr createfrom inside the worktree triggers the self-review gate and the comment monitor exactly as in the main checkout (same repo, same.git).
Rules
- Do not edit files in the main checkout while the worktree session is active — the whole point is isolation. If the user asks for a change to the main checkout, flag the conflict and let them decide.
- The worktree shares the repo's object database: commits, branches, and stashes made here are visible from the main checkout immediately. Only the working files are isolated.
- If your workspace has several repos: worktrees are per-repo. A cross-repo task needs a worktree in each affected sub-repo — say so before starting, and only isolate the repo(s) actually being changed.
- To leave: use kill-worktree (fold branch + stash back to the main repo and drop
the worktree) or ExitWorktree
keep(park it to resume later).
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.

