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.
Best use case
iterm-worktree is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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.
Teams using iterm-worktree should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/iterm-worktree/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How iterm-worktree Compares
| Feature / Agent | iterm-worktree | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# iTerm2 Worktree Manager Automate git worktree management with iTerm2 tab/window integration for parallel feature development. ## Quick Reference | Command | Description | |---------|-------------| | `create <branch>` | Create worktree + branch, open in iTerm2 | | `close <worktree>` | Safely remove worktree after validation | | `list` | Show all worktrees with iTerm2 tab status | | `switch <worktree>` | Focus existing worktree tab | | `open <worktree>` | Open existing worktree in new tab | ## Usage Run the script at `scripts/worktree.py`: ```bash python3 scripts/worktree.py <command> [options] ``` ### Create Worktree Create a new worktree with feature branch: ```bash 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, -b`: Base branch (default: main/master) - `--from-current, -f`: Branch from current branch instead of main/master - `--path, -p`: Custom worktree path (default: sibling directory) - `--open-mode, -o`: `new_tab`, `new_window`, `new_pane_right`, `new_pane_below` - `--no-iterm`: Skip iTerm2 automation - `--claude, -c`: Launch Claude in the new tab - `--task, -t`: Task description for Claude ### Close Worktree Safely remove a worktree after validating clean state: ```bash 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, -f`: Force removal despite uncommitted/unpushed changes - `--delete-branch, -d`: Also delete the branch ### List Worktrees Show all worktrees with iTerm2 tab indicators: ```bash 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: ```bash python3 scripts/worktree.py switch feature-auth ``` ### Open Worktree Open existing worktree in iTerm2: ```bash 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 1. **Start feature**: `create feature-name` - Creates worktree + branch in new tab 2. **Work in isolation**: Each worktree has its own directory and git state 3. **Switch context**: `switch other-feature` - Jump between parallel features 4. **Complete feature**: Push changes, merge PR 5. **Cleanup**: `close feature-name --delete-branch` - Remove worktree and 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
Related Skills
@gw-git-worktree-workflows
Master Git worktrees and gw-tools workflows for parallel development. Use this skill when creating worktrees, managing multiple branches simultaneously, navigating between worktrees, troubleshooting worktree issues, or setting up feature branch workflows. Triggers on tasks involving git worktree commands, branch isolation, parallel development, or gw CLI usage.
worktree-wizard-integration
This skill should be used when the user asks to "set up worktree-wizard", "integrate worktree-wizard", "add worktree support", "create docker-compose for worktrees", "add wt labels", "configure hot-reload for Docker", "set up volume mounts", "isolate ports per worktree", "onboard project to worktree-wizard", or needs guidance on wt.base-port labels, WT_* env var patterns, slot-based port isolation, dev-mode Dockerfiles, or hot-reload configurations per framework.
worktree-setup
Automatically invoked after `git worktree add` to create data/shared symlink and data/local directory. Required before starting work in any new worktree.
worktree-tending
Manage git worktrees for parallel branch development using custom git scripts (git-newtree, git-killtree, git-maingulp). Use when creating new worktrees, listing active worktrees, or closing/merging worktrees back to main. All worktrees are stored in .tree/ subdirectories of the repository.
using-git-worktrees
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verifi...
git-worktree
Git Worktree 管理命令。提供 init、list、remove 三个子命令来管理项目 worktree。
agent-ops-git-worktree
Manage git worktrees for isolated development. Create, list, remove, and work in worktrees.
bgo
Automated Blender build-go workflow. Automatically builds, removes old version, installs, enables, and launches Blender with your extension/add-on. Use when you want to quickly test changes, execute complete build-to-launch cycle, or run custom packaging scripts with automatic Blender launch.
live-tests
Writes live integration tests that hit the real Copilot API and record responses as replayable fixtures. Use this skill when adding new agent behaviors, provider integrations, or tool interactions that need real-world API coverage.
lite-skill-generator
Lightweight skill generator with style learning - creates simple skills using flow-based execution and style imitation. Use for quick skill scaffolding, simple workflow creation, or style-aware skill generation.
listennotes-automation
Automate Listennotes tasks via Rube MCP (Composio). Always search tools first for current schemas.
listclean-automation
Automate Listclean tasks via Rube MCP (Composio). Always search tools first for current schemas.