Use git worktrees when running multiple Claude Code instances in parallel for different features - creates isolated workspaces with separate branches and virtual environments
Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching. This is essential when running multiple Claude Code instances in parallel.
Core principle: One worktree per Claude Code instance ensures isolation and prevents conflicts.
Announce at start: "I'm using the git-worktrees skill to set up an isolated workspace."
# Create worktrees for parallel development
git worktree add ../dropkit-feature-a feature-a
git worktree add ../dropkit-feature-b feature-b
# Each worktree gets its own directory with full codebase
# Run Claude Code in each directory independently
uv sync - Run uv sync in each worktree (creates separate .venv)# List all worktrees
git worktree list
# Remove a worktree when done
git worktree remove ../dropkit-feature-a
# Prune stale worktree entries
git worktree prune
| Resource | Risk | Mitigation |
|----------|------|------------|
| ~/.config/dropkit/ | User config is shared | Don't modify during parallel dev |
| ~/.ssh/config | SSH config is shared | Coordinate droplet names |
| DigitalOcean API | Creating droplets with same name | Use unique droplet names per worktree |
| Situation | Action |
|-----------|--------|
| Starting parallel work | Create new worktree with feature branch |
| New worktree created | Run uv sync to create isolated venv |
| Feature complete | Merge to main, remove worktree |
| Stale worktrees | Run git worktree prune |
You: I'm using the git-worktrees skill to set up an isolated workspace.
[Create worktree: git worktree add ../dropkit-auth feature/auth]
[Run uv sync]
[Run uv run pytest - all passing]
Worktree ready at ../dropkit-auth
Tests passing
Ready to implement auth feature
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer