using-git-worktrees

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

Updated Jul 10, 2026
One-click install
npx skills add https://github.com/AvaTar-ArTs/.Agent-skills --skill using-git-worktrees-avatar-arts
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/AvaTar-ArTs/.Agent-skills/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/AvaTar-ArTs/.Agent-skills --skill using-git-worktrees-avatar-arts

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 sets up isolated git worktrees so you can develop on separate branches simultaneously without touching your main checkout. ## Core Features & Use Cases - Smart Directory Selection: Follows a priority order of existing .worktrees/ or worktrees/ directories, then AGENTS.md preferences, then asks the user. - Safety Verification: Confirms project-local worktree directories are git-ignored before creation, and fixes the .gitignore if they are not. - Automated Project Setup: Auto-detects Node.js, Rust, Python, or Go projects and runs the appropriate dependency install, then verifies a clean test baseline. - Use Case: You are mid-review on one branch and need to start a feature branch immediately. The Skill creates .worktrees/feature-auth, installs dependencies, runs the test suite, and reports a ready workspace. ## Quick Start Ask the AI to set up an isolated git worktree for your new feature branch and verify the project tests pass before starting work.

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. The Skill automates this along with directory selection and dependency setup.

Where should git worktrees be stored in a project?▼

The Skill checks for existing .worktrees or worktrees directories first, then any AGENTS.md preference, then asks the user. Project-local directories must be git-ignored; a global location under ~/.config/superpowers/worktrees is also supported.

Why must the worktree directory be in .gitignore?▼

If a project-local worktree directory is not ignored, its contents can be accidentally tracked and pollute git status. The Skill verifies this with git check-ignore and commits a .gitignore fix before creating the worktree.

Does the worktree setup run dependency installation automatically?▼

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

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

The Skill reports the test failures and asks whether to proceed or investigate rather than continuing silently. This prevents confusing pre-existing failures with bugs introduced by new work.