using-git-worktrees

Create isolated git worktrees with new branches and setup steps.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/hetsheth-droid/toolbox-template --skill using-git-worktrees-hetsheth-droid
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/hetsheth-droid/toolbox-template/tree/main/incubating/superpowers-skills/using-git-worktrees
Command: npx skills add https://github.com/hetsheth-droid/toolbox-template --skill using-git-worktrees-hetsheth-droid

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Starting feature work in a repository often risks polluting the main workspace with partial changes. This skill creates isolated git worktrees that share the same repository, enabling safe experimentation without affecting the primary branch.

Core Features & Use Cases

  • Create isolated workspaces for feature branches while preserving a clean main working directory.
  • Respect existing project conventions (local .gitignore and CLAUDE.md preferences) when selecting a worktree location.
  • Auto-detect the project name and run lightweight setup steps to bring the new worktree to a usable baseline.

Quick Start

Create an isolated worktree for your current repository and start feature work immediately.

Frequently Asked Questions about using-git-worktrees

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I isolate feature work in a git repository without affecting my main branch?

Git worktrees create isolated working directories linked to the same repository, enabling safe feature development and experimentation without polluting the primary branch. This skill automates creating that isolated workspace and sets up a new branch.

What is the best way to manage multiple feature branches in a single git repository?

Using git worktrees is the best way to manage multiple branches, as it creates separate directory instances for each feature. This prevents partial changes from interfering with your primary workspace while sharing the same repository history.

Does the git worktree creation process respect existing project conventions?

Yes, the worktree creation process respects existing project conventions by verifying local .gitignore rules and checking CLAUDE.md preferences to select an appropriate directory location for the isolated workspace.

How do I set up a new git worktree for context switching?

To set up a git worktree, this skill auto-detects the project name, selects an appropriate directory, creates the worktree with a new branch, and runs optional lightweight setup steps to bring the workspace to a usable baseline.

When should I use git worktrees instead of cloning a repository?

You should use git worktrees instead of cloning when you need safe isolation for feature work or experiments within a single repository, avoiding the disk space overhead and separate history management required by a full clone.