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.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
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.
Popularity
- GitHub stars
- 33k
- Ranking position
- #8814
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
owasp-security
33kTeaches your agent OWASP security guidance for web apps, APIs, mobile, containers and AI agents, so it can spot common weaknesses and suggest fixes.
agent-management
33kLets your agent create, list, hibernate, wake, rename and delete AI agents using the AI Maestro command line, managing each agent's lifecycle.
agent-messaging
33kLets your agent send, receive and reply to signed messages between AI agents, using the Agent Messaging Protocol, mostly on your own machine.
docs-search
33kLets your agent search auto-generated code documentation for function signatures, class definitions and comments, so it checks the real API before changing code.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.