using-git-worktrees

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working on a new feature often requires switching branches, which disrupts your current workspace, stashes uncommitted changes, and risks mixing unrelated work. This Skill sets up isolated git worktrees so you can develop on a separate branch in a separate directory without touching your main checkout. ## Core Features & Use Cases - Smart Directory Selection: Follows a priority order (existing .worktrees/ or worktrees/ directory, then CLAUDE.md preference, then asks the user) to pick a consistent worktree location. - Safety Verification: Checks with git check-ignore that project-local worktree directories are gitignored before creation, and fixes the .gitignore if not, preventing accidental commits of worktree contents. - Automated Setup and Baseline Validation: Auto-detects project type (Node.js, Rust, Python, Go) to install dependencies, then runs the test suite to confirm a clean baseline before implementation begins. - Use Case: You are about to implement an approved feature design and need isolation from your current workspace. The Skill creates .worktrees/feature-auth on a new branch, runs npm install, verifies all 47 tests pass, and reports the worktree is ready. ## Quick Start Set up an isolated git worktree for my new feature branch and verify the tests pass before I start implementing.

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. Then change into that directory and install project dependencies before starting work.

Where should git worktrees be stored in a project?▼

Use an existing .worktrees or worktrees directory if one exists, with .worktrees taking priority. Otherwise check CLAUDE.md for a stated preference, or choose between a project-local .worktrees directory and a global location like ~/.config/superpowers/worktrees.

Do git worktree directories need to be in .gitignore?▼

Yes, project-local worktree directories must be gitignored, otherwise their contents appear in git status and risk being committed. Verify with git check-ignore before creating the worktree, and add the directory to .gitignore if it is not already ignored.

Why run tests before starting work in a new worktree?▼

Running the test suite establishes a clean baseline so you can distinguish new bugs from pre-existing failures. If tests fail at baseline, report the failures and get explicit confirmation before proceeding with implementation.

Can git worktrees be used with Node.js, Python, Rust, or Go projects?▼

Yes, worktrees work with any git repository. After creation, auto-detect the project type from files like package.json, requirements.txt, Cargo.toml, or go.mod and run the matching dependency installation command.