Create isolated Git workspaces for parallel development and safer task switching.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "using-git-worktrees" skill from askskill: 1. Download https://raw.githubusercontent.com/microsoft/FluidFramework/main/.agency/plugins/nori/skills/using-git-worktrees/SKILL.md 2. Save it as ~/.claude/skills/using-git-worktrees/SKILL.md 3. Reload skills and tell me it's ready
I need to build a new feature without affecting my current branch. Show me how to use git worktree to create an isolated workspace, including the full commands.
Step-by-step commands to create a new worktree, switch branches, and start development.
I am in the middle of major changes, but I need to fix a production bug urgently. Use a git worktree workflow to create a separate directory for a hotfix and explain how to clean it up afterward.
Instructions for creating a hotfix worktree, committing changes, merging them, and removing the directory.
I want to open the main branch and a review branch at the same time for comparison. Explain how to manage two separate working directories with git worktree and avoid branch conflicts.
Guidance for creating separate directories for multiple branches, with safe usage tips.
ls -d .worktrees 2>/dev/null.worktrees.# Check if directory pattern in .gitignore
grep -q "^\.worktrees/$" .gitignore || grep -q "^worktrees/$" .gitignore
cd $path# Node.js
if [ -f package.json ]; then npm install; fi
# Rust
if [ -f Cargo.toml ]; then cargo build; fi
# Python
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f pyproject.toml ]; then poetry install; fi
# Go
if [ -f go.mod ]; then go mod download; fi
# Examples - use project-appropriate command
npm test
cargo test
pytest
go test ./...
If tests fail: Report failures, ask whether to proceed or investigate.
If tests pass: Report ready.
New working directory: <full-path>
Tests passing (<N> tests, 0 failures)
All commands and tools will now refer to: <full-path>
CRITICAL: Once you create and enter a worktree, you must stay within it for the entire session.
Rules:
pwd # Should show .worktrees/branch-name in path
git branch # Should show * on your feature branch, not main
Red Flags:
| Situation | Action |
|---|---|
.worktrees/ exists | Use it (verify .gitignore) |
| `.worktree/s does not exist | Check CLAUDE.md → Ask user |
| Directory not in .gitignore | Add it immediately |
| Tests fail during baseline | Report failures + ask |
| No package.json/Cargo.toml | Skip dependency install |
Skipping .gitignore verification
Assuming directory location
Missing project installation
…
Capture screen context so AI can better understand your current interface.
Build and refine UI/UX with design exploration, frontend setup, and integration.
Create a custom skill with structure, documentation, and optional bundled scripts.
Trace errors backward through execution paths to identify the true root cause.
Update technical documentation after code changes are completed.
Generate Fluid-style PR content, push branches, and open GitHub pull requests.
Create isolated Git worktrees safely with smart directory selection.
Create isolated workspaces for feature development without disturbing current code.
Create, switch, and verify Git branches before starting implementation work.
Run interactive CLI sessions safely via tmux for editors, REPLs, and Git flows.
Run Codex CLI tasks in parallel with isolated worktrees and live monitoring.
Programmatically rewrite non-top Git commits without needing an interactive editor.