git-worktree-isolation

Create isolated Git worktrees and auto-install dependencies for common ecosystems.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/huanlongAI/tzh-Harness --skill git-worktree-isolation-huanlongai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree-isolation
Source: https://github.com/huanlongAI/tzh-Harness/tree/main/cowork-skills/git-worktree-isolation
Command: npx skills add https://github.com/huanlongAI/tzh-Harness --skill git-worktree-isolation-huanlongai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Isolate new feature workspaces to prevent interference with the current workspace, ensuring deterministic setup and safe collaboration across parallel agents.

Core Features & Use Cases

  • Directory selection priority: .worktrees (hidden) or worktrees (visible) with CLAUDE.md preferences.
  • Safety verification: ensure the selected directory is ignored by git, and automatically fix and commit .gitignore if needed.
  • Auto-setup across ecosystems: detect and set up dependencies for common languages (Node.js, Rust, Python, Go) before starting work.
  • Multi-agent isolation: support parallel agents each operating in their own dedicated worktree during feature development.

Quick Start

Create an isolated Git worktree for a new feature by following the priority checks and safety verifications outlined.

Frequently Asked Questions about git-worktree-isolation

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

FAQPage Schema
How do I isolate feature work in a Git worktree without polluting the main repository?

To isolate feature work, the Skill auto-creates a Git worktree by selecting a project-local or global directory, verifying gitignore safety, and installing dependencies for Node.js, Rust, Python, or Go ecosystems.

How does gitignore safety verification work when setting up a workspace?

Gitignore safety verification ensures the selected worktree directory is ignored by Git, automatically fixing and committing the .gitignore file if needed to prevent workspace pollution and ensure safe collaboration.

Can I use Git worktree isolation for multi-agent parallel development?

Yes, Git worktree isolation supports multi-agent workflows by providing each parallel agent with its own dedicated worktree, ensuring deterministic setup and preventing interference during feature development.

Do I need to manually install dependencies when creating a worktree for Python or Rust projects?

No, you do not need to manually install dependencies because the Skill auto-detects matching files for Node.js, Rust, Python, and Go, automatically setting up the required dependencies before starting work.

What is the directory selection priority for setting up an isolated Git worktree?

Directory selection priority checks for a hidden .worktrees folder or a visible worktrees folder, while also respecting any CLAUDE.md preferences to determine the optimal project-local or global location.

What are the limitations of using Git worktrees for workspace isolation?

Git worktree isolation requires an existing Git repository context to function and relies on matching files being present to auto-detect and install dependencies for the specified programming language ecosystems.