Worktree Isolation

Use when feature work, plan execution, or parallel Agents need isolation from the current checkout and changes must remain recoverable.

9 stars 3 forksGit & Code Review

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add sandbaseai/workbuddy-skill --skill worktree-isolation
Manual install
git clone --depth 1 https://github.com/sandbaseai/workbuddy-skill.git /tmp/workbuddy-skill
mkdir -p ~/.claude/skills
cp -r /tmp/workbuddy-skill/skills/worktree-isolation ~/.claude/skills/worktree-isolation

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Git Worktree Isolation

## Purpose

Use a linked Git worktree when edits, experiments, plan execution, or parallel Agent work must be separated from the current checkout. Isolation is a safety boundary, not a substitute for authorization: record the allowed branch, files, remotes, and external effects before creating or reusing a workspace.

## Step 0: detect current state

Before creating anything, inspect the checkout without mutating it:

```bash
git rev-parse --show-toplevel
git rev-parse --git-dir
git rev-parse --git-common-dir
git rev-parse --show-superproject-working-tree 2>/dev/null
git branch --show-current
git status --short --branch
git worktree list --porcelain
```

Treat `git-dir != git-common-dir` as a linked worktree only after confirming the checkout is not a submodule. If already isolated, reuse it when its branch, path, cleanliness, and authority match the task; do not nest another worktree by habit. A detached HEAD requires an explicit branch or externally managed handoff before integration.

## Step 1: choose and verify a workspace

Honor an explicit WorkBuddy or user workspace preference. Otherwise prefer an existing project-local `.worktrees/`, then `worktrees/`, and finally a sibling path that does not overlap another checkout. Before using a project-local directory, verify it is ignored:

```bash
git check-ignore -q .worktrees || git check-ignore -q worktrees
```
Read the full skill on GitHub

Details

Skill name
worktree-isolation
Path
skills/worktree-isolation/SKILL.md
License
MIT
Repo updated
8 September 2026

FAQ

What does the Worktree Isolation skill do?

Use when feature work, plan execution, or parallel Agents need isolation from the current checkout and changes must remain recoverable.

How do I install the Worktree Isolation skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add sandbaseai/workbuddy-skill --skill worktree-isolation. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Worktree Isolation popular?

It lives in sandbaseai/workbuddy-skill, which has 9 GitHub stars and 3 forks.

Related skills

Browse the most popular Claude skills, all git & code review skills, or write your own with the skills generator.