agentleFS
niksavisniksavis/basicly/.agents/skills/worktree-isolation/SKILL.md

worktree-isolation

Skill2 starsChanged 5 days agoMITView on GitHub

Isolates work in a sibling git worktree, then merges and cleans up. Use to keep a change out of the main checkout or when parallel tracks collide.

6 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 2

    Distinctive

    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:

    Inspect existing branches and worktrees first: Never replace or discard another session's work.

    line 28
  2. Distinctive:

    Resolve a conflict against the whole task: keep unrelated work and rerun the affected checks.

    line 29

“Common” is measured: kept by at least 6 in 10 of the 5 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- Generated by `basicly skills-build` from skill.yaml. Do not edit; edit the source. -->

Worktree Isolation

Isolate a change in a sibling Git worktree, then merge it from the main checkout and clean up. For records see work-tracker; for commit subjects see conventional-commits.

Steps

basicly worktree create NAME [--base BRANCH]          # add and provision .venv, node_modules and hooks
basicly worktree merge NAME --bead RECORD-ID          # from the main checkout; --bead is the old flag name for the record id
basicly worktree cleanup NAME                         # remove the worktree and its merged branch
  1. Create the worktree when the work will commit. A plain git worktree add ../REPO.worktrees/NAME -b BRANCH leaves the hooks and environments missing, so it suits read-only work only.
  2. Work and commit inside the worktree.
  3. Merge from the main checkout. Git refuses to update a branch that another worktree has checked out.
  4. Clean up. Without --force, cleanup refuses uncommitted changes and keeps an unmerged branch.

Rules

  • Isolate every non-trivial change; skip a typo fix.
  • Never set a relative core.hooksPath in a linked worktree. It silently skips the hooks.
  • Inspect existing branches and worktrees first. Never replace or discard another session's work.
  • Resolve a conflict against the whole task: keep unrelated work and rerun the affected checks.

For several merges in order, stale sessions, cleanup refusals, hook resolution in a linked worktree, protected destinations in an agent sandbox and the Claude Code background isolation setting, read lifecycle.

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.