Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Sets up an isolated workspace for feature work via native worktree tools, git worktrees, or a non-git copy fallback.
55% 82%+27 ptsof test cases passed
Passed 18 of 22 test cases with the skill, and 12 of 22 without it.
3 of 3 safety checks passed
Not used yet
Ensure work happens in an isolated workspace. Prefer your platform's native worktree tools. Fall back to manual git worktrees only when no native tool is available. If git is unavailable or the project is not a git repository, create an isolated filesystem copy instead.
Core principle: Detect existing isolation first. Then use native tools. Then fall back to git. Then use a non-git copy fallback. Never fight the harness.
Announce at start: "I'm using the using-git-worktrees skill to set up an isolated workspace."
Before creating anything, check whether git can be used here.
command -v git >/dev/null 2>&1
git rev-parse --is-inside-work-tree >/dev/null 2>&1
If git is not installed: Skip git-specific detection and go to Step 2 (Non-Git Copy Fallback).
If the current directory is not inside a git work tree: Skip git-specific detection and go to Step 2 (Non-Git Copy Fallback).
If git is available and the project is a git repository, check if you are already in an isolated workspace.
GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
BRANCH=$(git branch --show-current)
Submodule guard: GIT_DIR != GIT_COMMON is also true inside git submodules. Before concluding "already in a worktree," verify you are not in a submodule:
# If this returns a path, you're in a submodule, not a worktree - treat as normal repo
git rev-parse --show-superproject-working-tree 2>/dev/null
If GIT_DIR != GIT_COMMON (and not a submodule): You are already in a linked worktree. Skip to Step 3 (Project Setup). Do NOT create another worktree.
Published skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.