using-git-worktrees

Create isolated git worktrees and validate baseline tests.

Updated Feb 20, 2026
One-click install
npx skills add https://github.com/yearofthedan/weaver --skill using-git-worktrees-yearofthedan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/yearofthedan/weaver/tree/main/.claude/skills/using-git-worktrees
Command: npx skills add https://github.com/yearofthedan/weaver --skill using-git-worktrees-yearofthedan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktrees enable isolated workspaces that share the same repository, allowing teams to work on multiple branches in parallel without switching contexts, reducing merge conflicts and context switching.

Core Features & Use Cases

  • Directory selection priority: Reuses existing local worktree directories when available; respects CLAUDE.md preferences; prompts the user when ambiguous.
  • Safety verification: Verifies gitignore status for project-local worktrees and enforces ignore entries to prevent accidental commits of worktree contents.
  • End-to-end setup: Detects project name, creates the proper worktree path, runs project-specific setup (e.g., npm install, cargo build, pip install), and validates a clean baseline with tests.

Quick Start

Create an isolated git worktree for the current project and verify the baseline tests pass before implementing the feature.

Frequently Asked Questions about using-git-worktrees

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

FAQPage Schema
How do I create isolated git worktrees for parallel feature work?

To create isolated git worktrees, you can use a setup process that detects your project name, creates the proper worktree path, and runs project-specific setup like npm install or cargo build. This ensures a clean starting point for feature work.

What is the best way to prevent accidental commits of git worktree contents?

The best way to prevent accidental commits of git worktree contents is to enforce gitignore entries. Safety verification checks the gitignore status for project-local worktrees to ensure worktree directories are properly ignored.

How does git worktree directory selection work when multiple options exist?

Git worktree directory selection reuses existing local worktree directories when available, respects CLAUDE.md preferences, and prompts the user when the choice is ambiguous to ensure the correct workspace is used.

Can I validate my project baseline before starting feature work in a new worktree?

Yes, you can validate a clean baseline by running tests immediately after the worktree creation and project setup steps. This verifies the isolated environment is correctly configured before you implement features.

Why use git worktrees instead of switching branches in a single repository?

Git worktrees allow you to work on multiple branches in parallel without switching contexts. This reduces merge conflicts and context switching by providing isolated workspaces that share the same repository.

Does git worktree setup run project-specific dependency installation automatically?

Yes, the end-to-end git worktree setup runs project-specific dependency installation commands like npm install, cargo build, or pip install automatically after creating the worktree path to prepare the environment.