worktreelisted
Install: claude install-skill oprogramadorreal/optimus-claude
# Worktree
Create a git worktree for isolated parallel development. Sets up a new branch in a separate directory (`.worktrees/`) with project setup and test baseline, so the main workspace stays untouched. Each worktree can host an independent Claude Code session.
## Workflow
### 1. Multi-repo Detection
Read `$CLAUDE_PLUGIN_ROOT/skills/init/references/multi-repo-detection.md` for workspace detection. If a multi-repo workspace is detected:
- Run the git commands below inside each child repo (the workspace root has no `.git/`, so git commands must target individual repos)
- If the user specified a target repo (inline or in conversation), use it
- If ambiguous, use `AskUserQuestion` — header "Target repo", question "Which repo should the worktree be created for?": list each repo as an option
### 2. Worktree Detection Guard
Read `$CLAUDE_PLUGIN_ROOT/skills/worktree/references/worktree-setup.md` and run the **worktree detection guard** from that reference. If the guard detects you are already inside a linked worktree, inform the user:
```
Already running inside a worktree (`<worktree-path>`).
To create another worktree, run this skill from the main workspace instead.
```
Then **stop** — do not create recursive worktrees.
### 3. Gather Context and Branch Name
Record the current branch:
```bash
git rev-parse --abbrev-ref HEAD
```
Determine a meaningful description for the branch from the **first source that provides enough signal** (check in this priority order):
1. **I