Skip to content
Skillpedia
Deploy & cloud (DevOps)33k Β· #8814

worktree-guide

What it does

This guide teaches you how to work on several tasks at once in one git project, using worktrees, terminal panels and Lazygit. It is for people who want a practical, step-by-step setup.

When to use it

  • βœ“When you want to set up several tasks in parallel without switching branches.
  • βœ“When you are new to git worktrees and want a guided walkthrough.
  • βœ“When you want a reference for keeping an eye on several worktrees with Lazygit.

Skill link

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/worktree-guide/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/worktree-guide/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œWalk me through setting up parallel worktrees so I can work on two features at once.”

5 new skills a week. 1 minute to read.

How it works

The guide first checks whether your folder is a git project, then explains a layout with terminal panels, and helps you create and manage worktrees one step at a time.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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.


Preflight

Before starting, detect the user's environment:

git 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:

git worktree list
pwd

Note the context for later guidance.


Phase 1: Welcome & Context Detection

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:

  • "Learn the full workflow" β€” Start from Phase 2
  • "Just show keybindings" β€” Jump to Quick Reference
  • "Create worktrees now" β€” Suggest /worktree-init
  • "Something else" β€” Ask what they need

If 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.


Phase 2: Ghostty Essentials

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)"


Phase 3: Lazygit Essentials

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                      β”‚
FAQ

Do I need Ghostty to use this?

The guide is built around Ghostty and Lazygit, so those are the tools it suggests for the setup.

What if I am not in a git project?

The guide tells you to open a git project first, then run it again.

Is it only a set of instructions?

No. It is interactive, so your agent can check your environment and guide you through each step.

Details

Original description by the author

Interactive guide for parallel development with Ghostty, git worktrees, and Lazygit. Use when setting up multi-task workflows or learning the worktree system.

repo: davila7/claude-code-templates

Popularity

GitHub stars
33k
Ranking position
#8814
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills