create-worktree-skill
Use when the user explicitly asks for a SKILL to create a worktree. If the user does not mention "skill" or explicitly request skill invocation, do NOT trigger this. Only use when user says things like "use a skill to create a worktree" or "invoke the worktree skill". Creates isolated git worktrees with parallel-running configuration.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o create-worktree-skill.zip https://jpskill.com/download/18969.zip && unzip -o create-worktree-skill.zip && rm create-worktree-skill.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18969.zip -OutFile "$d\create-worktree-skill.zip"; Expand-Archive "$d\create-worktree-skill.zip" -DestinationPath $d -Force; ri "$d\create-worktree-skill.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
create-worktree-skill.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
create-worktree-skillフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Worktree Creator Skill
このスキルは、分離されたポート、データベース、および設定を持つ、完全に構成された Git ワークツリーを作成し、並行開発を可能にします。
このスキルを使用するタイミング
このスキルは、次の場合に使用してください。
- ユーザーが Git ワークツリーの作成を要求した場合
- ユーザーが並行開発環境のセットアップを希望した場合
- ユーザーが複数のインスタンスを同時に実行する必要がある場合
- ユーザーが複数のブランチで同時に作業することに言及した場合
- ユーザーが分離されたテスト環境を希望した場合
手順
ステップ 1: リクエストを理解する
ユーザーのリクエストから以下を抽出します。
- ブランチ名 (必須): ワークツリーを作成する Git ブランチ
- ブランチ名が提供されていない場合は、停止してユーザーにブランチ名の提供を依頼してください。
- ポートオフセット (オプション): カスタムポートオフセット (提供されていない場合は自動計算されます)
ステップ 2: スラッシュコマンドを呼び出す
SlashCommand ツールを使用して、以下を実行します。
/create_worktree_prompt <branch-name> [port-offset]
例:
/create_worktree_prompt feature-auth- 自動計算されたポートでワークツリーを作成します/create_worktree_prompt fix-bug 2- ポートオフセット 2 (ポート 4020, 5193) でワークツリーを作成します
ステップ 3: 結果を共有する
/create_worktree_prompt コマンドは以下を実行します。
trees/<branch-name>に Git ワークツリーを作成します- 分離されたポートを設定します (競合を避けるために自動インクリメントされます)
- 適切な設定で環境ファイルをセットアップします
- サーバーとクライアントの依存関係をインストールします
- 両方のサービスを自動的に起動します
- アクセス URL と管理手順を提供します
コマンド出力をユーザーと共有し、以下を強調してください。
- ダッシュボードのアクセス URL
- 使用されているポート
- ワークツリーの停止/再起動方法
- 後で削除する方法
例
例 1: シンプルなワークツリー作成
ユーザー: "feature-dashboard ブランチのワークツリーを作成してください"
あなたの応答: SlashCommand を使用して /create_worktree_prompt feature-dashboard を実行します
例 2: 特定のポートオフセットを持つワークツリー
ユーザー: "hotfix-security ブランチにポートオフセット 5 で並行環境をセットアップしてください"
あなたの応答: SlashCommand を使用して /create_worktree_prompt hotfix-security 5 を実行します
例 3: 複数のワークツリー
ユーザー: "feature-a、feature-b、feature-c のブランチのワークツリーが必要です"
あなたの応答:
- SlashCommand を使用して
/create_worktree_prompt feature-aを実行します - SlashCommand を使用して
/create_worktree_prompt feature-bを実行します - SlashCommand を使用して
/create_worktree_prompt feature-cを実行します
それぞれが自動的に一意のポート (4010/5183, 4020/5193, 4030/5203) を取得します。
関連機能
- 作成されたワークツリーは、分離されたポート、データベース、および設定で自動的に実行されます
- 各ワークツリーは完全に独立しており、他のワークツリーと同時に実行できます
トラブルシューティング
コマンドが失敗した場合の一般的な問題:
- ブランチ名がワークツリーとして既に存在している
- ポートが使用中である (コマンドは自動的にそれらを終了させます)
- 依存関係が不足している (bun がインストールされていることを確認してください)
- Git ワークツリーのエラー (コミットされていない変更を最初に処理してください)
スラッシュコマンドは、詳細なエラーメッセージと提案を提供します。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Worktree Creator Skill
This skill enables creating fully configured git worktrees for parallel development with isolated ports, databases, and configuration.
When to use this skill
Use this skill when:
- User asks to create a git worktree
- User wants to set up parallel development environments
- User needs to run multiple instances simultaneously
- User mentions working on multiple branches at once
- User wants isolated testing environments
Instructions
Step 1: Understand the request
Extract from the user's request:
- Branch name (required): The git branch to create the worktree from
- If the branch name is not provided, stop and ask the user to provide a branch name
- Port offset (optional): Custom port offset (if not provided, auto-calculated)
Step 2: Invoke the slash command
Use the SlashCommand tool to run:
/create_worktree_prompt <branch-name> [port-offset]
Examples:
/create_worktree_prompt feature-auth- Creates worktree with auto-calculated ports/create_worktree_prompt fix-bug 2- Creates worktree with port offset 2 (ports 4020, 5193)
Step 3: Share results
The /create_worktree_prompt command will:
- Create the git worktree in
trees/<branch-name> - Configure isolated ports (auto-incremented to avoid conflicts)
- Set up environment files with proper configuration
- Install dependencies for server and client
- Start both services automatically
- Provide access URLs and management instructions
Share the command output with the user, highlighting:
- Access URLs for the dashboard
- Ports being used
- How to stop/restart the worktree
- How to remove it later
Examples
Example 1: Simple worktree creation
User: "Create a worktree for the feature-dashboard branch"
Your response: Use SlashCommand to run /create_worktree_prompt feature-dashboard
Example 2: Worktree with specific port offset
User: "Set up a parallel environment on branch hotfix-security with port offset 5"
Your response: Use SlashCommand to run /create_worktree_prompt hotfix-security 5
Example 3: Multiple worktrees
User: "I need worktrees for branches: feature-a, feature-b, and feature-c"
Your response:
- Use SlashCommand to run
/create_worktree_prompt feature-a - Use SlashCommand to run
/create_worktree_prompt feature-b - Use SlashCommand to run
/create_worktree_prompt feature-c
Each will automatically get unique ports (4010/5183, 4020/5193, 4030/5203).
Related capabilities
- The created worktree will run automatically with isolated ports, database, and configuration
- Each worktree is completely independent and can run simultaneously with others
Troubleshooting
If the command fails, common issues:
- Branch name already exists as a worktree
- Ports are in use (command kills them automatically)
- Missing dependencies (ensure bun is installed)
- Git worktree errors (handle uncommitted changes first)
The slash command provides detailed error messages and suggestions.