Awesome-omni-skill iterm-worktree
Manage git worktrees with iTerm2 integration. Use when user asks to create isolated development environments, work on features in parallel, manage worktrees, open worktrees in new tabs/windows, switch between worktrees, or close completed worktrees. Triggers on "create worktree", "new worktree", "feature branch with worktree", "open worktree", "switch worktree", "close worktree", "list worktrees", or mentions wanting to work on multiple features simultaneously.
git clone https://github.com/diegosouzapw/awesome-omni-skill
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/tools/iterm-worktree-chadboyda" ~/.claude/skills/diegosouzapw-awesome-omni-skill-iterm-worktree && rm -rf "$T"
skills/tools/iterm-worktree-chadboyda/SKILL.mdiTerm2 Worktree Manager
Automate git worktree management with iTerm2 tab/window integration for parallel feature development.
Quick Reference
| Command | Description |
|---|---|
| Create worktree + branch, open in iTerm2 |
| Safely remove worktree after validation |
| Show all worktrees with iTerm2 tab status |
| Focus existing worktree tab |
| Open existing worktree in new tab |
Usage
Run the script at
scripts/worktree.py:
python3 scripts/worktree.py <command> [options]
Create Worktree
Create a new worktree with feature branch:
python3 scripts/worktree.py create feature-auth python3 scripts/worktree.py create feature-auth --base develop python3 scripts/worktree.py create feature-auth --from-current # Branch from current branch python3 scripts/worktree.py create feature-auth --open-mode new_window python3 scripts/worktree.py create feature-auth --claude --task "Implement user authentication"
Options:
: Base branch (default: main/master)--base, -b
: Branch from current branch instead of main/master--from-current, -f
: Custom worktree path (default: sibling directory)--path, -p
:--open-mode, -o
,new_tab
,new_window
,new_pane_rightnew_pane_below
: Skip iTerm2 automation--no-iterm
: Launch Claude in the new tab--claude, -c
: Task description for Claude--task, -t
Close Worktree
Safely remove a worktree after validating clean state:
python3 scripts/worktree.py close feature-auth python3 scripts/worktree.py close feature-auth --delete-branch python3 scripts/worktree.py close feature-auth --force
Options:
: Force removal despite uncommitted/unpushed changes--force, -f
: Also delete the branch--delete-branch, -d
List Worktrees
Show all worktrees with iTerm2 tab indicators:
python3 scripts/worktree.py list python3 scripts/worktree.py list --json
Switch to Worktree
Focus an existing iTerm2 tab, or open new if not found:
python3 scripts/worktree.py switch feature-auth
Open Worktree
Open existing worktree in iTerm2:
python3 scripts/worktree.py open feature-auth python3 scripts/worktree.py open feature-auth --open-mode new_pane_right python3 scripts/worktree.py open feature-auth --force # Open new tab even if exists
Typical Workflow
- Start feature:
- Creates worktree + branch in new tabcreate feature-name - Work in isolation: Each worktree has its own directory and git state
- Switch context:
- Jump between parallel featuresswitch other-feature - Complete feature: Push changes, merge PR
- Cleanup:
- Remove worktree and branchclose feature-name --delete-branch
Safety Features
- Validates no uncommitted changes before closing
- Checks for unpushed commits before closing
- Auto-detects default branch (main/master)
- Prevents duplicate branch/path creation