julianobarbosa/claude-code-skills/git-worktree
Claude Code and agent skill by julianobarbosa/claude-code-skills
- community
Checking that the SKILL.md file is still in the repository.
Git worktree management with tmux and iTerm2 integration. Use when creating isolated dev environments, managing parallel feature branches, switching contexts without stashing, or running multiple Claude instances. Covers worktree creation, tmux window management, iTerm2 tabs, and cleanup workflows.
Install
npx vskill@latest install julianobarbosa/claude-code-skills/git-worktreeSKILL.md
Git Worktree Skill
Manage parallel development environments using git worktrees with seamless terminal integration.
Overview
Git worktrees enable multiple working directories from a single repository:
- Isolated feature development without branch switching
- Run multiple Claude Code instances in parallel
- Context switching without stashing uncommitted changes
- Clean separation of experimental work
Quick Commands
wt - Worktree Manager
The wt command creates worktrees with automatic terminal integration:
tmux Integration
Workflow: Create Worktree + tmux Window
tmux Session Management
iTerm2 Integration
AppleScript for iTerm2 Tabs
iTerm2 Profile Integration
Create a dedicated iTerm2 profile for worktrees:
Configuration
Environment Variables
Worktree Location
Worktrees are stored inside the project directory:
Shell Configuration
Functions are defined in ~/.zsh/functions.zsh (already loaded by your zshrc):
Git Worktree Commands Reference
Creating Worktrees
Managing Worktrees
Advanced Operations
Parallel Claude Development
Running Multiple Instances
Port Management
Cleanup Workflows
Merge and Cleanup
Bulk Cleanup
Troubleshooting
Common Issues
Worktree already exists:
Branch already checked out:
tmux window naming conflicts:
iTerm2 AppleScript errors:
References
- references/tmux-config.md - tmux configuration for worktrees
- references/iterm2-config.md - iTerm2 profile setup
- Shell functions:
~/.zsh/functions.zsh
External Links
- Git Worktree Documentation: https://git-scm.com/docs/git-worktree
- tmux Manual: https://man.openbsd.org/tmux
- iTerm2 Documentation: https://iterm2.com/documentation.html
Gotchas
- Worktree paths inside the main repo's working tree confuse the outer `git status` — files in the inner worktree show as untracked in the parent.
- A branch checked out in any worktree refuses `git branch -d` — must remove the worktree first.
- Worktrees share `.git/config` — per-worktree config needs explicit
git config --worktree. - `git worktree prune` removes orphaned records but does NOT delete the directory — clean up the dir manually after pruning.
- Locking a worktree doesn't prevent fs operations —
git worktree lockonly blocksgit worktree remove;rm -rfstill works. - macOS case-insensitive fs + worktrees: two worktrees with case-only-different paths cause unpredictable git behavior.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/git-worktree/SKILL.md
Popularity
- Repository stars
- 84
- Repository forks
- 18
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. 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/julianobarbosa/claude-code-skills/git-worktree)