using-git-worktrees

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

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/AarushiShah/coding-agents-databricks-apps --skill using-git-worktrees-aarushishah
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/AarushiShah/coding-agents-databricks-apps/tree/main/.claude/skills/using-git-worktrees
Command: npx skills add https://github.com/AarushiShah/coding-agents-databricks-apps --skill using-git-worktrees-aarushishah

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 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 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: You are mid-review on one branch and need to start a feature branch immediately. The Skill creates .worktrees/feature-auth on a new branch, runs npm install, verifies all 47 tests pass, and reports the ready workspace path. ## Quick Start Use the using-git-worktrees skill to set up an isolated workspace for my new feature branch.

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 install, and baseline tests.

Where should git worktrees be stored in a project?

This Skill checks for an existing .worktrees or worktrees directory first, then any CLAUDE.md preference, then asks you to choose between a project-local .worktrees/ folder or a global ~/.config/superpowers/worktrees/<project>/ location.

Why must the worktree directory be in .gitignore?

If a project-local worktree directory is not ignored, its contents appear in git status and can be accidentally committed. The Skill verifies this with git check-ignore and adds the entry to .gitignore before creating the worktree.

What happens if tests fail in a new worktree?

The Skill runs the project's test suite after setup to establish a clean baseline. If tests fail, it reports the failures and asks whether to proceed or investigate, so pre-existing issues are not confused with new bugs.

Does git worktree setup support Node, Rust, Python, and Go projects?

Yes. The Skill auto-detects the project type from marker files like package.json, Cargo.toml, requirements.txt, pyproject.toml, and go.mod, then runs the matching install command such as npm install, cargo build, or go mod download.