Git Worktree Creator

VerifiedSafe

Automatically creates an isolated Git worktree for parallel feature development. Copies environment files (`.env`, `.envrc`) from the root directory and runs `make setup` to prepare the development environment. Useful after planning to work on a feature without interfering with the main branch.

Sby Skills Guide Bot
DevelopmentIntermediate
6/2/2026
Claude Code
#git#worktree#feature-development#environment-setup

Recommended for

Automated summary

Creates a Git worktree for parallel feature development, automatically copying necessary environment files.

Strengths

  • Full isolation for feature development
  • Automatic copying of environment configuration files (env, envrc)
  • Seamless integration with Claude Code planning workflow

Limitations

  • Requires prior understanding of Git worktrees
  • Does not handle inter-feature dependencies
  • Environment setup must be standardized
When to use it

Use this skill after planning a new feature to set up a clean, isolated development environment.

When not to use it

Avoid this skill for simple changes that don't require isolation or when working on a shared branch without worktrees.

Security analysis

Safe
Quality score88/100

The skill runs a bash script to create a git worktree and copy local environment files, with no network activity, destructive operations, or secret exfiltration. Allowed tools are for file management and project setup only.

No concerns found

How this analysis is made

Examples

Create worktree for user-auth feature
Create a git worktree for the 'user-auth' feature with all environment files.
Isolated environment for payment feature
Set up a new worktree for the 'add-payment' feature, copying .env and .envrc files.

name: create-worktree description: Creates a git worktree for parallel feature development. Use after planning to prepare an isolated development environment with all necessary environment files. allowed-tools: Bash(git:), Bash(mkdir:), Bash(cp:), Bash(chmod:), Bash(bash:), Bash(make:)

Git Worktree Creator

planモード終了後、feature開発用の独立したworktree環境を自動作成します。

概要

このSkillは以下を自動で実行します:

  1. .worktrees/<feature-name>/ ディレクトリにworktreeを作成
  2. feature/<feature-name> ブランチを新規作成
  3. 環境変数ファイル(.env, .envrc など)を自動コピー
  4. make setup で開発環境をセットアップ

使用方法

基本的な使い方

# スクリプトを実行
bash .claude/skills/create-worktree/scripts/create_worktree.sh <feature-name>

# 例: user-auth 機能を開発する場合
bash .claude/skills/create-worktree/scripts/create_worktree.sh user-auth

実行結果

.worktrees/user-auth/     # worktreeディレクトリ
├── .env                  # ルートからコピー
├── .envrc                # ルートからコピー
├── modules/
│   ├── frontend/.env*    # frontendの環境変数
│   ├── backend/.env      # backendの環境変数
│   └── agent/.env        # agentの環境変数(あれば)
└── ...(その他のファイル)

コピーされる環境変数ファイル

  • ルート: .env, .envrc
  • frontend: .env, .env.local, .env.dev, .env.prd, .env.test
  • backend: .env
  • agent: .env(存在する場合)

作業完了後

PR作成とworktree削除を同時に行う(推奨)

pr-and-cleanup スキルを使用すると、PR作成とworktree削除を自動で行えます:

cd .worktrees/<feature-name>
bash ../../.claude/skills/pr-and-cleanup/scripts/pr_and_cleanup.sh

詳細は pr-and-cleanup スキル を参照してください。

手動でworktreeを削除する場合

git worktree remove .worktrees/<feature-name>

詳細

詳細については REFERENCE.md を参照してください。

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/git-worktree-creator-mmio70s7/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/git-worktree-creator-mmio70s7' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/git-worktree-creator-mmio70s7/download' --output '.skill-downloads/git-worktree-creator-mmio70s7/SKILL.md.part' && mv '.skill-downloads/git-worktree-creator-mmio70s7/SKILL.md.part' '.skill-downloads/git-worktree-creator-mmio70s7/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Bash(git:*), Bash(mkdir:*), Bash(cp:*), Bash(chmod:*), Bash(bash:*), Bash(make:*)

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/git-worktree-creator-mmio70s7/SKILL.md' && test -s '.skill-downloads/git-worktree-creator-mmio70s7/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/create-worktree' && cp -R '.skill-downloads/git-worktree-creator-mmio70s7' '.claude/skills/create-worktree'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/git-worktree-creator-mmio70s7'

openskills read 'git-worktree-creator-mmio70s7'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/git-worktree-creator-mmio70s7/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills