本文へスキップ
Skillpedia
デプロイとクラウド(DevOps)33k · #8814

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がスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/worktree-guide/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

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.

repo: davila7/claude-code-templates

人気

GitHubのスター
33k
ランキング
#8814
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル