using-git-worktrees

Create isolated git worktrees and run project setup steps.

1|Updated May 29, 2026
One-click install
npx skills add https://github.com/simorgh3196/tsuzulint --skill using-git-worktrees-simorgh3196
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/simorgh3196/tsuzulint/tree/main/.agents/skills/using-git-worktrees
Command: npx skills add https://github.com/simorgh3196/tsuzulint --skill using-git-worktrees-simorgh3196

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables developers to start feature work in an isolated git worktree, preventing disruption to the current workspace and simplifying branch management.

Core Features & Use Cases

  • Directory selection priority: Prefer an existing local worktree directory (.worktrees > worktrees); fall back to CLAUDE.md guidance; otherwise prompt the user for location.
  • Safety verification: Ensure project-local worktrees are ignored by git, adding to .gitignore if needed, to avoid accidentally committing worktree contents.
  • Auto-setup and run tasks: Auto-create the worktree, switch to the new branch, and run project setup commands (npm, cargo, pip, etc.) based on detected project files.
  • Use Case: When starting a feature in a multi-branch workflow, this skill creates an isolated workspace that can be cleaned up after the feature is done.

Quick Start

Create an isolated worktree for your feature branch and initialize the project environment as needed.

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 branch work?

To create an isolated git worktree, the skill discovers the target directory, verifies gitignore safety, runs git worktree add, and executes project setup commands like npm or cargo based on detected files.

Why do I need to add git worktrees to .gitignore?

Adding local git worktrees to .gitignore prevents accidentally committing the worktree contents into your main repository, ensuring isolation safety and keeping your feature branch clean.

How does git worktree directory selection work when starting feature work?

Git worktree directory selection prefers an existing local directory like .worktrees, falls back to CLAUDE.md guidance, and finally prompts the user for a location if no preference is found.

Can I auto-run project setup commands after creating a git worktree?

Yes, after creating an isolated git worktree, the skill auto-detects your project environment and runs appropriate setup commands such as npm, cargo, or pip to initialize the workspace.

What is the best way to manage multiple branches without disrupting my current workspace?

Using git worktrees is the best way to isolate feature work across multiple branches, allowing you to switch contexts without affecting your main workspace and simplifying branch cleanup.

Does git worktree isolation work with any project environment?

Git worktree isolation works with any project environment detected through project files, automatically applying the correct setup steps for tools like npm, cargo, or pip.