using-git-worktrees

Create isolated Git worktrees in separate directories with automatic project setup.

Updated Jan 25, 2026
One-click install
npx skills add https://github.com/MINT-IA/MINT --skill using-git-worktrees-mint-ia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/MINT-IA/MINT/tree/main/.claude/skills/using-git-worktrees
Command: npx skills add https://github.com/MINT-IA/MINT --skill using-git-worktrees-mint-ia

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Starting feature work in a shared workspace can risk contaminating the main branch. This skill creates and manages isolated Git worktrees to prevent cross-branch interference and to provide deterministic work areas for experimentation.

Core Features & Use Cases

  • Directory priority-based worktree discovery (prefers existing local directories, then CLAUDE.md, then user prompts)
  • Safe creation: checks that new worktrees are ignored by Git and can be created without affecting the main repo
  • Automatic project setup: detects project type (Node, Rust, Python, Go) and runs appropriate setup commands
  • Multi-location options: supports project-local and global worktree locations for flexibility

Quick Start

Ask me to set up an isolated Git worktree for the current project following the priority rules and safety checks.

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 isolated Git worktrees to prevent branch contamination?

To create isolated Git worktrees, use directory discovery to find or prompt for a location, verify it is gitignored, and safely create the worktree without affecting the main repository. This prevents cross-branch interference during feature development.

How does Git worktree isolation work for feature development and hotfixes?

Git worktree isolation works by creating separate directories for feature development or hotfixes, keeping branch work physically separate. It applies directory priority rules, checks gitignore status, and automatically sets up the toolchain to ensure deterministic work areas.

Can I set up automatic toolchain configuration for Node, Rust, Python, or Go worktrees?

Yes, automatic toolchain setup detects your project type across Node, Rust, Python, and Go environments. After creating the isolated Git worktree, it runs the appropriate setup commands and performs baseline test verification to ensure the environment is ready.

Does Git worktree creation support both local and global directory locations?

Git worktree creation supports both project-local and global worktree locations. It uses priority-based directory discovery, preferring existing local directories, then checking CLAUDE.md preferences, and finally prompting the user to specify where the isolated worktree should be created.

What's the safest way to verify a new Git worktree won't affect the main repo?

The safest way to verify a new Git worktree is checking that the target directory is ignored by Git. The creation process validates gitignore compliance and ensures the isolated worktree is generated without contaminating the main repository's working state.

Why do I need to check gitignore rules before creating an isolated branch directory?

You need to check gitignore rules before creating an isolated branch directory to prevent the new worktree from being tracked by the main repository. Gitignore verification ensures the worktree remains isolated and avoids cross-branch file interference.