sidsol/crispy-plugin/git-worktree-isolation
Claude Code and agent skill by sidsol/crispy-plugin
- community
Checking that the SKILL.md file is still in the repository.
Create and clean up isolated git worktrees for parallel slice execution
Install
npx vskill@latest install sidsol/crispy-plugin/git-worktree-isolationSKILL.md
The same SKILL.md was published earlier as sidsol/crispy-plugin/git-worktree-isolation.
Git Worktree Isolation
Creates a per-slice isolated git worktree so multiple slices can be implemented in parallel without file-system conflicts. Used by crispy-implement in fleet mode (SUBAGENTS.md §5.2) and by any sequential slice that wants worktree-based rollback safety.
When to use
crispy-implementis about to dispatch >= 2 independent slices in parallel (fleet mode).- Operator wants worktree isolation for a high-blast-radius sequential slice.
When NOT to use
- Sequential mode with low-risk slices.
- Repositories that predate
git worktree(git < 2.5; rare).
Inputs
slice_id(string, kebab-case) — used to name the worktree directory and branch.base_branch(string) — the branch to fork from. Defaults to the current branch.feature_branch(string, optional) — explicit branch name to create. Defaults tocrispy/<slice_id>.worktree_root(string, optional) — parent directory for worktrees. Defaults to<repo>/.crispy-worktrees/.
Process
1. Precondition checks
Run these in the main checkout:
git rev-parse --show-toplevelto confirm we are in a git repo. Fail withstatus: failedif not.git status --porcelain— if non-empty ANDCRISPY_ALLOW_DIRTYis not set, returnstatus: failedwithnext_actions: ["Commit or stash changes before creating an isolated worktree"].git worktree list --porcelain— if a worktree already exists at the target path, returnstatus: partialwithmetadata.worktree_pathpointing at the existing one (idempotent reuse).
2. Create the worktree
If the branch already exists locally, drop the -b flag and just check it out:
3. Verify
git -C <worktree_root>/<slice_id> rev-parse HEADreturns the expected SHA.git -C <worktree_root>/<slice_id> branch --show-currentreturns<feature_branch>.
4. Return
Cleanup mode
When invoked with mode: cleanup and worktree_path:
git -C <worktree_path> status --porcelain— if non-empty, returnstatus: partial(do not silently drop work).git worktree remove --force <worktree_path>from the main checkout.- Optionally delete the branch:
git branch -D <feature_branch>(only ifdelete_branch: trueand the branch has been merged or the operator explicitly requested it). - Return
status: okwithmetadata.removed: true.
Failure handling
| Symptom | Action | |
|---|---|---|
git worktree add fails (path exists, locked, etc.) | status: failed, surface stderr, do not retry. | |
| Branch name collision | If a worktree already exists for that branch, return status: partial with the existing path (let caller decide). | |
| Dirty working tree | status: failed with next_actions instructing commit/stash. | |
| Cleanup with uncommitted changes | status: partial, do not force-remove. Caller decides. |
Anti-patterns
- ❌ Creating a worktree without checking
git statusfirst (loses uncommitted work). - ❌ Calling
git worktree remove --forcewhen the worktree has uncommitted changes (silent data loss). - ❌ Reusing a single worktree path across overlapping slices (defeats isolation).
- ❌ Hard-coding the worktree root inside the skill — the caller may need a tmpfs path.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/git-worktree-isolation/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sidsol/crispy-plugin/git-worktree-isolation)