using-git-worktrees

Create isolated git worktrees with safety checks and environment setup.

Updated Dec 2, 2025
One-click install
npx skills add https://github.com/m16khb/claude-integration --skill using-git-worktrees-m16khb
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/m16khb/claude-integration/tree/main/.claude/skills/superpowers/using-git-worktrees
Command: npx skills add https://github.com/m16khb/claude-integration --skill using-git-worktrees-m16khb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill creates and manages isolated git worktrees to safely begin feature work without polluting the main workspace.

Core Features & Use Cases

  • Directory prioritization: Uses .worktrees, worktrees, or CLAUDE.md preferences.
  • Safety verification: Ensures .gitignore is updated to avoid polluting the repo.
  • Environment setup: Detects project type and installs dependencies automatically.
  • Usage Scenario: Start a feature on a separate worktree, run tests, and merge after review.

Quick Start

Create a worktree for feature-x and verify the baseline tests pass.

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 without affecting my main workspace?▼

Git worktrees create isolated working directories for each branch, letting you develop features separately without switching branches in your primary workspace. Each worktree has its own checked-out branch and node_modules or dependencies, keeping work completely isolated.

What's the difference between using git worktrees and switching branches?▼

Worktrees let you work on multiple branches simultaneously in separate directories, while branch switching works on a single directory. Worktrees avoid stashing changes, dependency reinstalls, and context loss when toggling between tasks.

Do I need to configure .gitignore for worktrees to work safely?▼

Yes, .gitignore must be updated to exclude worktree directories and their artifacts (node_modules, build outputs) to prevent polluting the repository. The Skill verifies this before creating project-local worktrees.

Can I use git worktrees with npm, Python, and Go projects?▼

Yes, the Skill automatically detects your project type and installs dependencies for npm, cargo, pip, poetry, and Go mod environments in each new worktree after creation.

How do I verify a worktree is ready to use after creation?▼

The Skill runs baseline tests automatically after setting up the worktree to confirm the environment is correct and dependencies installed successfully before you begin feature work.