← ClaudeAtlas

csp-using-git-worktreeslisted

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback
maythyai/code-skills-package · ★ 1 · Code & Development · score 70
Install: claude install-skill maythyai/code-skills-package
| Condition | Action | |-----------|--------| | Already in linked worktree | Skip creation (Step 0) | | In a submodule | Treat as normal repo (Step 0 guard) | | Native worktree tool available | Use it (Step 1a) | | No native tool | Git worktree fallback (Step 1b) | | `.worktrees/` exists | Use it (verify ignored) | | `worktrees/` exists | Use it (verify ignored) | | Both exist | Use `.worktrees/` | | Neither exists | Check instruction file, then default `.worktrees/` | | Global path exists | Use it (backward compat) | | Directory not ignored | Add to .gitignore + commit | | Permission error on create | Sandbox fallback, work in place | | Tests fail during baseline | Report failures + ask | | No package.json/Cargo.toml | Skip dependency install | ## Common Mistakes ### Fighting the harness - **Problem:** Using `git worktree add` when the platform already provides isolation - **Fix:** Step 0 detects existing isolation. Step 1a defers to native tools. ### Skipping detection - **Problem:** Creating a nested worktree inside an existing one - **Fix:** Always run Step 0 before creating anything ### Skipping ignore verification - **Problem:** Worktree contents get tracked, pollute git status - **Fix:** Always use `git check-ignore` before creating project-local worktree ### Assuming directory location - **Problem:** Creates inconsistency, violates project conventions - **Fix:** Follow priority: existing > global legacy > instruction file > default ### Proceeding with failin