create-git-worktree

Create isolated Git worktrees with environment setup and npm dependencies.

11|Updated Oct 16, 2025
One-click install
npx skills add https://github.com/getty104/claude-code-marketplace --skill create-git-worktree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-git-worktree
Source: https://github.com/getty104/claude-code-marketplace/tree/main/getty104/skills/create-git-worktree
Command: npx skills add https://github.com/getty104/claude-code-marketplace --skill create-git-worktree

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires git, npm, and includes scripts (resource) components.

What problem does it solve?

Switching between multiple development tasks on different branches can lead to messy local environments and conflicts. This Skill creates isolated git worktree environments, keeping your main branch clean and your tasks separate.

Core Features & Use Cases

  • Isolated Development: Creates a new, clean working directory for a specified branch, preventing interference with other ongoing work.
  • Environment Setup: Automatically copies .env files and Serena memories, and installs npm dependencies if package.json is present.
  • Use Case: When starting a new feature or bug fix, use this Skill to quickly set up a dedicated, pre-configured environment without manually managing branches or dependencies.

Quick Start

Create a new git worktree for the branch named 'feature/my-new-feature'.

Frequently Asked Questions about create-git-worktree

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I isolate development work on different git branches without switching back and forth?

Git worktrees create separate working directories for each branch, keeping your main workspace clean. This Skill automates worktree setup, copying environment files and installing dependencies so you can work on multiple branches simultaneously without interference.

Can I set up a new git worktree with npm dependencies already installed?

Yes. This Skill creates a git worktree and automatically installs npm dependencies from package.json, copies .env files, and provisions the development environment in one step, eliminating manual setup.

What happens if a git worktree already exists for a branch?

The Skill reuses existing worktrees instead of recreating them, preventing duplicate setups and preserving your current work state in that isolated environment.

Do I need to manually manage branch names when creating worktrees?

No. The Skill automatically converts branch names by replacing forward slashes with hyphens, so feature/my-task becomes a valid worktree directory without manual renaming.

What git repository setup is required to use this Skill?

Your repository must have a valid base branch configured and use origin as the remote. The Skill works with repositories that support standard git and npm workflows.

Can this Skill copy configuration files besides .env to the worktree?

The Skill copies .env files and Serena memories automatically. For other configuration files, you can manage them separately or extend the setup after worktree creation.