git-worktrees

Create isolated git worktrees with dependency setup and baseline tests.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/duylinhdang1998/claude-template-agent --skill git-worktrees-duylinhdang1998
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktrees
Source: https://github.com/duylinhdang1998/claude-template-agent/tree/main/plugins/vfm-agent-company/skills/git-worktrees
Command: npx skills add https://github.com/duylinhdang1998/claude-template-agent --skill git-worktrees-duylinhdang1998

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a reliable, repeatable way to create isolated git worktrees so developers can work on feature branches in parallel without switching or contaminating the main workspace, and prevents accidental commits of worktree contents.

Core Features & Use Cases

  • Directory selection priority that prefers hidden project-local directories and respects explicit preferences when present.
  • Safety verification that ensures the worktree directory is listed in .gitignore and commits the ignore change if needed to prevent accidental tracking.
  • Automated creation and initialization of a new branch worktree, automatic dependency setup for common ecosystems (Node, Python, Go, Rust), and baseline test verification before starting work.
  • Use cases: starting feature work in isolation, running tests on alternate branches, experimenting without affecting main code, and assigning parallel tasks to multiple specialists.

Quick Start

Create a new worktree under .worktrees named feature/my-feature, run the project's dependency setup, and verify tests pass before beginning development.

Frequently Asked Questions about git-worktrees

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

FAQPage Schema
How do I create an isolated git worktree for parallel branch development?

To create an isolated git worktree, the process selects a hidden project-local directory, enforces .gitignore safety, initializes the branch, runs dependency setup, and verifies tests. This enables parallel branch development without contaminating the main workspace.

What's the best way to prevent accidental commits of git worktree directories?

To prevent accidental commits of git worktree directories, safety verification ensures the worktree path is listed in .gitignore and automatically commits the ignore change if needed. This prevents accidental tracking of worktree contents in the main repository.

Does this git worktree automation handle dependency setup for Node, Python, Go, and Rust?

Yes, git worktree creation includes automated dependency setup for common ecosystems including Node, Python, Go, and Rust. It initializes the new branch worktree and runs ecosystem-specific setup to prepare the environment before baseline test verification.

Why do I need a clean baseline test verification before starting work in a git worktree?

Clean baseline test verification is needed to ensure the new worktree branch starts from a stable state. After creating the worktree and running dependency setup, tests are executed to verify the baseline before beginning feature development or running experiments.

Can I use git worktrees to coordinate multiple specialists working concurrently on the same project?

Yes, git worktrees support coordinating multiple specialists working concurrently by providing isolated workspaces. Each specialist gets a separate worktree branch for parallel task assignment without switching or contaminating the main workspace.

When should I not use git worktrees for feature branching?

You should avoid git worktrees if your project lacks proper .gitignore safety enforcement, since the automation commits ignore changes to prevent accidental tracking. Worktrees are also unnecessary overhead for simple, sequential single-branch workflows.