using-git-worktrees

Create isolated Git worktrees for new branches and run baseline tests.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of safely isolating new feature work from an existing Git workspace so you can work on multiple branches without accidental cross-contamination or committing worktree contents.

Core Features & Use Cases

  • Smart worktree directory selection: Chooses a project-local worktree directory (preferring .worktrees/) or a CLAUDE.md-specified preference before asking the user.
  • Safety verification for project-local worktrees: Verifies the chosen directory is ignored via git check-ignore, and if not ignored, instructs you to update .gitignore and commit before proceeding.
  • Automated project setup and baseline verification: Runs common dependency installation based on detected project files, then verifies a clean test baseline before you continue implementation.

Use case example: Before implementing a new feature, create an isolated branch worktree under .worktrees/, run the appropriate install and test commands, and only proceed when you confirm the baseline is clean.

Quick Start

Tell me: "Use the using-git-worktrees skill to create an isolated worktree for my feature branch, verify the directory is ignored if project-local, install dependencies if needed, run baseline tests, and report the ready path."

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 an isolated Git worktree for a new feature branch?

Run `git worktree add` with a new branch name, selecting a project-local directory like `.worktrees/` or a global path to isolate feature work and prevent accidental repository pollution.

How do I prevent my Git worktree directory from being accidentally committed?

Verify your worktree directory is ignored by running `git check-ignore`; if it is not ignored, update your `.gitignore` file and commit that change before proceeding with worktree creation.

What is the best way to set up a clean baseline before starting feature work in a worktree?

Set up a clean baseline by detecting project files to run dependency installation, then execute a baseline test run with explicit failure handling to verify the worktree environment is ready.

Does Git worktree creation handle dependency installation automatically?

Git worktree creation can include automated dependency installation by detecting project files and running the appropriate install commands before verifying a clean test baseline for the new branch.

Why do I need to verify a clean test baseline before implementing features in a worktree?

Verifying a clean test baseline ensures your isolated worktree environment is properly configured with dependencies installed, preventing pre-existing test failures from masking issues during new feature implementation.