using-git-worktrees

Create isolated Git worktrees for feature branches with baseline tests.

8|1|Updated Mar 1, 2026
One-click install
npx skills add https://github.com/JoeCP17/LLM-Dot-files --skill using-git-worktrees-joecp17
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/JoeCP17/LLM-Dot-files/tree/main/claude/skills/superpowers/using-git-worktrees
Command: npx skills add https://github.com/JoeCP17/LLM-Dot-files --skill using-git-worktrees-joecp17

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents feature development from interfering with the current workspace by creating isolated Git worktrees while reducing the risk of accidentally tracking worktree contents in the main repository.

Core Features & Use Cases

  • Isolated workspaces for multiple branches: Creates a separate branch-backed directory via git worktree so you can work on features concurrently without frequent context switching.
  • Smart directory selection: Chooses an existing local worktrees directory first, otherwise respects any preference found in CLAUDE.md, and otherwise prompts you between project-local and global locations.
  • Safety verification for project-local isolation: Verifies the chosen project-local worktrees directory is ignored using git check-ignore and, if not ignored, instructs you to update .gitignore and commit before continuing.
  • Baseline setup and verification: Auto-runs common dependency installation and a project-appropriate test command to confirm a clean starting point before implementation.
  • Use Case: When implementing a feature (e.g., feature/auth) you can spin up a safe worktree, install dependencies, run baseline tests, and only then start coding.

Quick Start

Tell the AI to set up an isolated worktree for my feature branch and run the project’s baseline tests before I start implementing the feature.

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 feature development?

To create an isolated git worktree, the system selects a directory, verifies it is ignored by git check-ignore, creates the worktree, installs dependencies, and runs baseline tests to ensure a clean starting point for your feature branch.

Why do I need an isolated git worktree for concurrent branch work?

An isolated git worktree prevents feature development from contaminating your current workspace, allowing you to work on multiple branches concurrently without frequent context switching or risking unsafe file tracking in the main repository.

How do I ensure my project-local worktrees directory is safe from git tracking?

To ensure your project-local worktrees directory is safe, the system runs git check-ignore to verify it is ignored, and instructs you to update .gitignore and commit the change before continuing if the directory is not currently ignored.

Can I run baseline tests automatically after setting up a new git worktree?

Yes, you can run baseline tests automatically after setting up a new git worktree. The process executes a project-appropriate test command immediately after dependency installation to confirm a clean starting point before implementation begins.

What is the best way to manage worktree directory selection for multiple branches?

The best way to manage worktree directory selection is to use an existing local worktrees directory first, otherwise respect any preference found in CLAUDE.md, or prompt to choose between project-local and global locations.