Worktree Parallel Init
Description
Create multiple git worktrees for parallel development: $ARGUMENTS
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
Repository README
This is the README for davila7/claude-code-templates, shared by 7 entries
in this directory. It describes the repository, not this entry specifically.
allowed-tools: Bash(git:*), Bash(mkdir:*), Bash(ls:*), Bash(cat:*), Bash(basename:*), Bash(pwd:*), Bash(sed:*) argument-hint: task 1 | task 2 | task 3 description: Create parallel worktrees for multi-task development with Ghostty panels
Worktree Parallel Init
Create multiple git worktrees for parallel development: $ARGUMENTS
Instructions
You are setting up parallel worktrees so the user can work on multiple tasks simultaneously in separate Ghostty terminal panels, each running its own Claude instance.
Step 1: Validate Environment
- Check this is a git repository:
git rev-parse --is-inside-work-tree - Get the repo name:
basename $(git rev-parse --show-toplevel) - Get the main branch name (check for
mainormaster):git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@'— if that fails, default tomain - Ensure working tree is clean:
git status --porcelain. If dirty, warn the user and ask if they want to continue. - Fetch latest:
git fetch origin
Step 2: Parse Tasks
Parse tasks from `$ARGUMENTS`. Tasks are separated by `|` (pipe character).
If `$ARGUMENTS` is empty, use AskUserQuestion to ask the user to describe their tasks (they can provide multiple separated by `|`).
For each task description:
- Trim whitespace
- Generate a kebab-case branch name:
wt/(max 50 chars, alphanumeric and hyphens only) - Generate a worktree directory path:
../worktrees//wt-
Step 3: Create Worktrees
For each task:
- Create the parent directory if needed:
mkdir -p ../worktrees/ - Create the worktree:
git worktree add -b wt/ ../worktrees//wt- origin/ - Write a
.worktree-task.mdfile inside the new worktree with this content:# Worktree Task **Branch:** wt/ **Task:** **Created:** **Source repo:**
Step 4: Check for Dependencies
If a `package.json` exists in the repo root, note that each worktree may need `npm install` (or the appropriate package manager).
Check for:
package-lock.json→ npm installyarn.lock→ yarn installpnpm-lock.yaml→ pnpm installbun.lockb→ bun install
Step 5: Output Summary
Display a clear summary table:
| # | Task | Branch | Path |
|---|------|--------|------|
| 1 | ... | wt/... | ../worktrees/repo/wt-... |
Then display ready-to-copy commands for Ghostty panels. For each worktree:
# Panel :
cd && claude
If dependencies were detected, add a note:
# Note: Run install in each worktree before starting
Finally, remind the user:
- Open a new Ghostty panel with
Cmd+D(split right) orCmd+Shift+D(split down) - When done with a task, use
/worktree-deliverto commit, push, and create a PR - After merging all PRs, u
Related Skills
Epic Sync
Sync epic issue bodies, labels, and local coordination snapshots from GitHub.
Git 使用 Git Worktrees
创建孤立的 Git worktrees,带有智能目录选择与安全验证。
Git Claude skills github
[Building agent skills blog](https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-ag
Git #148
, [#161](https://github.com/affaan-m/everything-claude-code/pull/161))
Git GitHub MCP
| Token | Repos, issues, PRs, workflows |
Git GitHub MCP Server
Official first-party server to read repos, manage issues/PRs, and automate workflows.
Git