using-git-worktrees

Creates isolated git worktrees with directory selection, ignore verification, and baseline test validation.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/whatswithavi/Ecchelon_project --skill using-git-worktrees-whatswithavi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/whatswithavi/Ecchelon_project/tree/main/.agent/skills/using-git-worktrees
Command: npx skills add https://github.com/whatswithavi/Ecchelon_project --skill using-git-worktrees-whatswithavi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working on a new feature often requires switching branches or stashing changes, which disrupts your current workspace. This Skill creates isolated git worktrees so you can work on multiple branches simultaneously without touching your main checkout, while preventing common mistakes like committing worktree contents to the repository. ## Core Features & Use Cases - Smart Directory Selection: Follows a priority order (existing .worktrees/ or worktrees/ directories, then CLAUDE.md preferences, then asking the user) to pick a consistent worktree location. - Safety Verification: Checks that project-local worktree directories are git-ignored before creation, and automatically fixes the .gitignore if they are not. - Automated Setup and Baseline Testing: Auto-detects the project type (Node.js, Rust, Python, Go), installs dependencies, and runs the test suite to confirm a clean baseline before work begins. - Use Case: Before implementing an approved feature design, use this Skill to spin up an isolated worktree at .worktrees/feature-auth with dependencies installed and all 47 tests passing, so new bugs are never confused with pre-existing failures. ## Quick Start Set up an isolated git worktree for the new authentication feature branch and verify the test baseline is clean.

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 a git worktree for a new feature branch?▼

Run git worktree add with a target path and the -b flag to create a new branch, for example git worktree add .worktrees/auth -b feature/auth. This Skill automates path selection, branch creation, dependency installation, and baseline testing.

Where should git worktrees be stored in a project?▼

Worktrees can live in a project-local directory like .worktrees/ or worktrees/, or in a global location such as ~/.config/superpowers/worktrees/<project-name>/. This Skill checks existing directories first, then CLAUDE.md preferences, then asks the user.

Why must worktree directories be added to .gitignore?▼

Project-local worktree directories must be git-ignored so their contents are never tracked or committed to the repository. This Skill verifies ignore status with git check-ignore and commits a .gitignore fix before creating the worktree if needed.

What happens if tests fail in a new git worktree?▼

Failing baseline tests indicate pre-existing issues in the branch, not problems caused by your new work. This Skill reports the failures and asks whether to proceed or investigate rather than continuing silently.

Does git worktree setup work with Python or Rust projects?▼

Yes, setup is auto-detected from project files: npm install for package.json, cargo build for Cargo.toml, pip or poetry install for Python files, and go mod download for go.mod. Projects without these files skip dependency installation.