Claude Code skills for a frictionless git worktree workflow on macOS + iTerm2: every worktree opens as a Claude Code session in a split pane (never a new window or tab), with dependencies symlinked and permissions carried over — you never type a git worktree command.
| Command | What it does |
|---|---|
/wt-open <name> [task] |
Create a worktree (branch named per your repo's conventions, e.g. fix/ABC-123) and open a Claude session on it in a split pane. If the worktree already exists, resumes its previous Claude session with full history. |
/wt-review <branch | #PR | TICKET> [base] |
Check out a PR/branch in a disposable worktree and auto-launch a code review against the PR's own base (or a custom one). A PR on a stack is reviewed layer by layer, bottom-up, in one worktree and one session — only the layers you are a requested reviewer on, one verdict each. Re-running updates the branch and opens a fresh review. |
/wt-project <project URL | slug | name> |
Open a parent session for a whole tracker project: reads the project and its issues, opens a feat/<project>-requirements worktree and a pane whose first prompt is the project brief. Scoping and breakdown happen there; each issue then gets its own /wt-open worktree. Re-running resumes the session. |
/wt-list |
Readable list of worktrees: branch, dirty state, orphaned locks, merged status. |
/wt-clean [name] |
Safe removal. Without arguments, sweeps: auto-removes only trivially safe worktrees (clean + no local-only commits + no running session), asks before touching anything with real work in it. |
/my-review [fixed-point] |
Two-axis code review (Standards + Spec, via mattpocock/skills' code-review) reported as a verdict-first summary grouped by severity. This is what /wt-review launches in its pane. |
/post-review [blocking|all] [PR] |
Submit the findings of a review already in context as a GitHub review: bare Approve when nothing blocks, Comment otherwise (never request-changes), blocking points only by default. Cites what each finding contradicts; signs off as Claude. |
Each pane gets the worktree name as its title (claude -n) and as an iTerm2 badge — the watermark survives Claude Code's dynamic titles, so you always know which pane is which worktree.
skills/— the skills; copy each directory into~/.claude/skills/scripts/— two helpers the skills call; copy into~/.claude/scripts/andchmod +xthemwt-pane.sh <dir> <name> [claude args...] [--prompt-file <path>] [--horizontal]— iTerm2 split + badge +claude -n <name>;--prompt-filecarries an initial prompt longer than the TTY's 1024-byte typed-line limitwt-setup.sh <repo_root> <worktree>— symlinks (worktree.symlinkDirectoriesfrom your project settings), copies.claude/settings.local.json(permission allowlist) and.worktreeincludefiles into the worktree
git clone https://github.com/arnauddoub/skills
cp -R skills/skills/* ~/.claude/skills/
mkdir -p ~/.claude/scripts && cp skills/scripts/wt-*.sh ~/.claude/scripts/ && chmod +x ~/.claude/scripts/wt-*.shThen add these permission rules to ~/.claude/settings.json so the skills run without confirmation prompts (replace /Users/you with your actual home directory — rules don't expand ~):
{
"permissions": {
"allow": [
"Bash(git -C * worktree *)",
"Bash(git -C * status *)",
"Bash(git -C * branch *)",
"Bash(git -C * fetch *)",
"Bash(git -C * pull --ff-only*)",
"Bash(git -C * log *)",
"Bash(git -C * rev-parse *)",
"Bash(git rev-parse *)",
"Bash(gh pr view *)",
"Bash(gh pr list *)",
"Bash(pgrep *)",
"Bash(ps *)",
"Bash(lsof *)",
"Bash(/Users/you/.claude/scripts/wt-*)"
]
}
}- macOS + iTerm2 (split panes via AppleScript — allow the automation prompt on first use)
zshat/bin/zsh(ships with macOS) —wt-pane.shrequires it: theprintf %qof macOS's bash 3.2 mangles multibyte characters (accents, em-dashes) into invalid UTF-8 that AppleScript rejects with error -1700- Claude Code
jq,gh(authenticated)- For
/wt-project: an issue-tracker MCP (Linear) whose project/issue read tools are allowed - For
/my-review(and thus/wt-review): thecode-reviewskill from mattpocock/skills installed at~/.claude/skills/code-review/
In each repo's .claude/settings.local.json:
{
"worktree": {
"baseRef": "fresh",
"symlinkDirectories": ["node_modules"]
}
}And a .worktreeinclude file at the repo root listing gitignored files new worktrees need (e.g. .env, .claude/settings.local.json).
- Worktrees live under
<repo>/.claude/worktrees/<slug>(add.claude/worktrees/to.git/info/excludeto keepgit statusclean). - Closing a pane never deletes the worktree:
/wt-open <name>resumes the session where it left off;/wt-cleanis the only thing that deletes. - Skills honor repo branch conventions (
fix/TICKET/feat/TICKET) and can read your issue tracker to infer the branch type.