Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Interactive guide for parallel development with Ghostty, git worktrees, and Lazygit. Use when setting up multi-task workflows or learning the worktree system.
.claude/skills/davila7-worktree-guide/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 121% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 50% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 113% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 86% | 0% |
| case-22 | ✗→✓ | ▲ Improved | 92% | 0% |
Guide the user through parallel development workflows using Ghostty terminal panels, git worktrees, and Lazygit. This is both a teaching experience and a practical reference.
Before starting, detect the user's environment:
bashgit rev-parse --is-inside-work-tree 2>&1 && echo "GIT_OK" || echo "NOT_GIT"
If not a git repo: > This isn't a git repository. Navigate to a git project first, then come back to /worktree-guide.
Check if we're in a worktree or main repo:
bashgit worktree list pwd
Note the context for later guidance.
Display based on environment:
If in main repo:
## Worktree Parallel Development Guide
Welcome! I'll guide you through setting up and using parallel worktrees for multi-task development.
┌─────────────────────────────────────────────────────────────┐
│ Ghostty Terminal │
│ ┌──────────────────────┬──────────────────────┐ │
│ │ │ │ │
│ │ Claude (Task 1) │ Claude (Task 2) │ │
│ │ claude/login-page │ claude/fix-auth-bug │ │
│ │ │ │ │
│ ├──────────────────────┴──────────────────────┤ │
│ │ Lazygit (monitoring) │ │
│ └─────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
**Your workflow:**
1. Create worktrees → `/worktree-init`
2. Open Ghostty panels → `Cmd+D` / `Cmd+Shift+D`
3. Run Claude in each panel → `cd <worktree> && claude`
4. Deliver when done → `/worktree-deliver`
5. Clean up → `/worktree-cleanup`
What would you like to do?Use AskUserQuestion:
/worktree-initIf already in a worktree:
## Worktree Status
You're already inside a worktree! Let me check your status.Then run the equivalent of /worktree-check and provide contextual guidance.
EXPLAIN:
## Ghostty Panel Management
Ghostty's panel system is perfect for parallel development. Here are the essential keybindings:SHOW:
┌─────────────────────────────────────────────────────────────┐
│ GHOSTTY KEYBINDINGS │
├─────────────────────────────────────────────────────────────┤
│ │
│ SPLITTING │
│ ───────── │
│ Cmd+D Split panel to the right │
│ Cmd+Shift+D Split panel below │
│ │
│ NAVIGATION │
│ ───────── │
│ Cmd+Alt+←/→/↑/↓ Move focus between panels │
│ Cmd+[/] Cycle through panels │
│ │
│ SIZING │
│ ───────── │
│ Cmd+Shift+E Equalize all panel sizes │
│ Cmd+Shift+F Toggle zoom (fullscreen current panel) │
│ │
│ CLOSING │
│ ───────── │
│ Cmd+W Close current panel │
│ │
└─────────────────────────────────────────────────────────────┘
**Pro tip:** Use Cmd+Shift+F to zoom into a panel when you need focus, then press it again to return to the multi-panel view.PAUSE - "Ready to learn about Lazygit? (Or skip to workflow)"
EXPLAIN:
## Lazygit for Monitoring Worktrees
Lazygit gives you a visual overview of all your worktrees and their changes. Run it from your main repo to monitor everything.SHOW:
┌─────────────────────────────────────────────────────────────┐
│ LAZYGIT KEYBINDINGS │
├─────────────────────────────────────────────────────────────┤
│ │
│ WORKTREES (navigate to Worktrees panel) │
│ ───────── │
│ w Switch to worktree panel (or create new) │
│ Enter Switch to selected worktree │
│ n Create new worktree │
│ d Delete worktree (with confirmation) │
│ │
│ FILES & STAGING │
│ ───────── │
│ Space Stage/unstage file │
│ a Stage all files │
│ Enter View file diff (with Delta highlighting) │
│ │
│ COMMITS │
│ ───────── │
│ c Commit staged changes │
│ C Commit with editor │
│ A Amend last commit │
│ │
│ SYNC │
│ ───────── │
│ P Push │
│ p Pull │
│ f Fetch │
│ │
│ GENERAL │
│ ───────── │
│ ? Help (context-sensitive) │
│ q Quit / go back │
│ Tab Switch panels │
│ │
└─────────────────────────────────────────────────────────────┘
**Monitoring workflow:**
1. Open lazygit in the main repo (or a dedicated Ghostty panel)
2. Press `w` to see all worktrees
3. Use Enter to dive into any worktree's changes
4. Press `q` to go back to the worktree listPAUSE - "Ready for the full workflow walkthrough?"
EXPLAIN:
## Full Parallel Development Workflow
Let me walk you through the complete cycle. We'll go step by step.EXPLAIN:
### Step 1: Create Worktrees
First, define the tasks you want to work on in parallel. The `/worktree-init` command creates a worktree for each task.DO: Show example command:
Example usage:
/worktree-init add user authentication | fix login bug | improve dashboard performance
This creates:
├── ../worktrees/<repo>/claude-add-user-authentication/
├── ../worktrees/<repo>/claude-fix-login-bug/
└── ../worktrees/<repo>/claude-improve-dashboard-performance/EXPLAIN:
### Step 2: Open Ghostty Panels
Now split your terminal into panels—one for each task, plus optionally one for Lazygit monitoring.DO:
1. Press Cmd+D to split right (first worktree)
2. Press Cmd+D again (second worktree)
3. Optionally press Cmd+Shift+D on any panel for Lazygit below
Resulting layout:
┌──────────┬──────────┬──────────┐
│ Task 1 │ Task 2 │ Task 3 │
│ claude │ claude │ claude │
├──────────┴──────────┴──────────┤
│ lazygit │
└────────────────────────────────┘EXPLAIN:
### Step 3: Work Independently
In each panel:
1. cd to the worktree path (from the commands output)
2. Run `claude` to start a Claude session
3. Use `/worktree-check` anytime to verify which task you're working on
4. Work normally—Claude doesn't know about other panelsEXPLAIN:
### Step 4: Deliver When Done
When you finish a task in any panel, use `/worktree-deliver` to:
1. Review your changes
2. Create a commit
3. Push to remote
4. Create a pull requestEXPLAIN:
### Step 5: Clean Up After Merging
After your PRs are merged on GitHub:
1. Go back to the main repo (not a worktree)
2. Run `/worktree-cleanup --all`
3. It removes merged worktrees and branchesSHOW:
## Troubleshooting
### "I'm not sure which worktree I'm in"
Run `/worktree-check` — it shows your branch, task, and status.
Alternatively:
$ git branch --show-current # Shows claude/<name>
$ pwd # Shows the worktree path
---
### "I have uncommitted changes and want to switch tasks"
**Option 1:** Commit work-in-progress
$ git add . && git commit -m "wip: progress on feature"
**Option 2:** Stash changes (temporary)
$ git stash push -m "wip: parking changes"
Then in the other panel, continue working. Come back later with:
$ git stash pop
---
### "I accidentally started working in the wrong worktree"
1. Stash your changes: `git stash push -m "work done in wrong place"`
2. Navigate to the correct worktree
3. Apply the stash: `git stash pop`
---
### "My worktree has merge conflicts"
1. Run `git fetch origin` to get latest
2. Run `git rebase origin/main` (or merge if you prefer)
3. Resolve conflicts in your editor
4. `git add .` then `git rebase --continue`
---
### "I want to abandon a worktree"
From the main repo:
$ git worktree remove ../worktrees/repo/claude-<name> --force
$ git branch -D claude/<name>
Note: Force is needed if there are uncommitted changes.
---
### "/worktree-deliver failed on push"
Usually means the remote branch doesn't exist yet or there's a conflict.
Try:
$ git push -u origin HEAD
If there's a conflict with remote, pull first:
$ git pull --rebase origin claude/<name>
---
### "The worktree path doesn't exist anymore"
The worktree was probably deleted manually. Clean up the git state:
$ git worktree pruneSHOW:
┌─────────────────────────────────────────────────────────────────────────────┐
│ WORKTREE QUICK REFERENCE │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ COMMANDS │
│ ───────── │
│ /worktree-init <task1> | <task2> Create worktrees for parallel tasks │
│ /worktree-check Show current worktree status & task │
│ /worktree-deliver Commit, push, and create PR │
│ /worktree-cleanup --all Remove merged worktrees and branches │
│ /worktree-cleanup --dry-run Preview what would be cleaned up │
│ │
│ GHOSTTY │
│ ───────── │
│ Cmd+D Split right │ Cmd+Shift+E Equalize panels │
│ Cmd+Shift+D Split down │ Cmd+Shift+F Zoom toggle │
│ Cmd+Alt+Arrows Navigate │ Cmd+W Close panel │
│ │
│ LAZYGIT │
│ ───────── │
│ w Worktrees panel │ Space Stage/unstage │
│ Enter View diff │ c Commit │
│ P Push │ ? Help │
│ │
│ GIT (manual) │
│ ───────── │
│ git worktree list List all worktrees │
│ git worktree add -b claude/name path Create worktree manually │
│ git worktree remove path Remove a worktree │
│ git worktree prune Clean up stale worktree refs │
│ │
│ WORKFLOW │
│ ───────── │
│ 1. /worktree-init tasks... Create worktrees │
│ 2. Cmd+D (split panels) Open Ghostty panels │
│ 3. cd <path> && claude Start Claude in each │
│ 4. /worktree-deliver PR when done │
│ 5. /worktree-cleanup Clean up after merge │
│ │
└─────────────────────────────────────────────────────────────────────────────┘/worktree-check first| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 14,719 | 10,064 | -32% | 1 | 1 | 0% | 2,925 | 3,420 | +17% | 0 | 0 | — |
case-02 | fail→fail | 9,747 | 6,781 | -30% | 1 | 1 | 0% | 1,904 | 4,361 | +129% | 0 | 0 | — |
case-03 | fail→fail | 11,824 | 7,268 | -39% | 1 | 1 | 0% | 2,364 | 4,542 | +92% | 0 | 0 | — |
case-04 | pass→fail | 8,503 | 5,250 | -38% | 1 | 1 | 0% | 1,788 | 3,384 | +89% | 0 | 0 | — |
case-05 | pass→fail | 9,443 | 4,489 | -52% | 1 | 1 | 0% | 1,889 | 3,384 | +79% | 0 | 0 | — |
case-06 | pass→pass | 9,222 | 7,640 | -17% | 1 | 1 | 0% | 1,971 | 4,285 | +117% | 0 | 0 | — |
case-07 | fail→pass | 9,704 | 4,005 | -59% | 1 | 1 | 0% | 1,747 | 3,864 | +121% | 0 | 0 | — |
case-08 | fail→fail | 8,228 | 4,180 | -49% | 1 | 1 | 0% | 1,626 | 3,333 | +105% | 0 | 0 | — |
case-09 | pass→fail | 9,327 | 4,218 | -55% | 1 | 1 | 0% | 1,764 | 3,351 | +90% | 0 | 0 | — |
case-10 | pass→pass | 4,710 | 3,944 | -16% | 1 | 1 | 0% | 898 | 3,611 | +302% | 0 | 0 | — |
case-11 | pass→pass | 4,712 | 3,931 | -17% | 1 | 1 | 0% | 915 | 3,934 | +330% | 0 | 0 | — |
case-12 | pass→pass | 5,517 | 3,390 | -39% | 1 | 1 | 0% | 976 | 3,659 | +275% | 0 | 0 | — |
case-13 | pass→pass | 4,859 | 3,197 | -34% | 1 | 1 | 0% | 880 | 3,632 | +313% | 0 | 0 | — |
case-14 | fail→pass | 13,779 | 6,296 | -54% | 1 | 1 | 0% | 2,551 | 3,831 | +50% | 0 | 0 | — |
case-15 | pass→pass | 10,110 | 7,796 | -23% | 1 | 1 | 0% | 1,934 | 4,133 | +114% | 0 | 0 | — |
case-16 | fail→fail | 7,289 | 8,490 | +16% | 1 | 1 | 0% | 1,342 | 3,427 | +155% | 0 | 0 | — |
case-17 | fail→pass | 9,052 | 3,202 | -65% | 1 | 1 | 0% | 1,639 | 3,491 | +113% | 0 | 0 | — |
case-18 | fail→pass | 11,201 | 2,917 | -74% | 1 | 1 | 0% | 1,951 | 3,625 | +86% | 0 | 0 | — |
case-19 | pass→pass | 9,579 | 8,744 | -9% | 1 | 1 | 0% | 1,984 | 3,750 | +89% | 0 | 0 | — |
case-20 | pass→pass | 9,023 | 3,575 | -60% | 1 | 1 | 0% | 1,743 | 3,664 | +110% | 0 | 0 | — |
case-21 | pass→pass | 2,301 | 1,989 | -14% | 1 | 1 | 0% | 404 | 3,431 | +749% | 0 | 0 | — |
case-22 | fail→pass | 11,086 | 4,630 | -58% | 1 | 1 | 0% | 1,940 | 3,731 | +92% | 0 | 0 | — |
case-23 | pass→pass | 10,595 | 6,261 | -41% | 1 | 1 | 0% | 1,596 | 4,133 | +159% | 0 | 0 | — |
case-24 | pass→fail | 3,748 | 5,366 | +43% | 1 | 1 | 0% | 674 | 3,438 | +410% | 0 | 0 | — |
case-25 | pass→pass | 2,981 | 2,233 | -25% | 1 | 1 | 0% | 456 | 3,365 | +638% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted, and 19 counted toward the lift figure. The other 6 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +4 percentage points is the difference between those two pass rates over the 19 comparable cases. 6 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.