worktree-guide
できること
このガイドは、1つのGitプロジェクトで複数の作業を同時に進める方法を、worktree、ターミナルパネル、Lazygitを使って教えます。実践的で段階を追った環境づくりをしたい人向けです。
使う場面
- ✓ブランチを切り替えずに、複数のタスクを並行して進めたいとき。
- ✓Git worktreeに初めて取り組み、手引きが欲しいとき。
- ✓Lazygitで複数のworktreeを確認する際の参考にしたいとき。
スキルのリンク
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/worktree-guide/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“2つの機能を同時に進められるように、並行worktreeの設定を一緒に進めてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このガイドはまず、フォルダーがGitプロジェクトかどうかを確認します。次にターミナルパネルの構成を説明し、worktreeを1つずつ作成・管理する手順を支援します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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 │
よくある質問
これを使うにはGhosttyが必要ですか?
このガイドはGhosttyとLazygitを前提にしているため、セットアップにはそれらのツールを勧めています。
Gitプロジェクトの中にいない場合はどうなりますか?
まずGitプロジェクトを開いてから、もう一度実行するよう案内されます。
ただの手順書ですか?
いいえ。対話型なので、エージェントが環境を確認し、各手順を進められます。
詳細
作者による元の説明
Interactive guide for parallel development with Ghostty, git worktrees, and Lazygit. Use when setting up multi-task workflows or learning the worktree system.
人気
- GitHubのスター
- 33k
- ランキング
- #8814
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
owasp-security
33kエージェントがWebアプリ、API、モバイル、コンテナ、AIエージェント向けの OWASP のセキュリティ指針を理解し、よくある弱点を見つけて修正案を出せるよう支援します。
agent-management
33kエージェントが、AI Maestro のコマンドラインを使って AI エージェントを作成、一覧表示、休止、再開、名前変更、削除できるよう支援します。各エージェントのライフサイクルを管理します。
agent-messaging
33kエージェントが、主に自分のマシン上で Agent Messaging Protocol を使い、AIエージェント同士の署名付きメッセージを送信、受信、返信できるよう支援します。
docs-search
33kエージェントが、自動生成されたコードのドキュメントから関数の署名、クラスの定義、コメントを検索できるよう支援します。コードを変更する前に、実際のAPIを確認できます。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。