using-git-worktrees

Automate isolated Git worktree setup with safety checks and automatic project setup.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/tusosos/manus-knowledge-base --skill using-git-worktrees-tusosos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/tusosos/manus-knowledge-base/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/tusosos/manus-knowledge-base --skill using-git-worktrees-tusosos

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables safe and isolated feature development by automatically creating and selecting suitable Git worktrees and verifying safety constraints before work.

Core Features & Use Cases

  • Automated discovery of existing worktree directories (.worktrees or worktrees) and safe selection.
  • Strict safety verification to ensure directories are ignored by git before creating project-local worktrees, with automatic fallback to global locations when appropriate.
  • Flexible location strategy and automatic project setup, enabling rapid isolation for new feature work.

Quick Start

Create an isolated worktree for the new feature branch with safety checks and automatic project setup.

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 for feature development without contaminating my main workspace?

You can create isolated git worktrees by automatically discovering existing directories or selecting safe fallback locations. This prevents workspace contamination by keeping new feature branches separated from your main project directory during experimentation.

What is the best way to ensure a directory is ignored by git before creating a project-local worktree?

The best way to ensure a directory is ignored by git is through strict safety verification checks. If the target directory is not properly ignored, the system automatically falls back to global worktree locations to maintain isolation and safety.

How does worktree isolation handle dynamic location selection between local and global directories?

Worktree isolation handles dynamic location selection by validating baseline cleanliness and applying optional CLAUDE.md preferences. It automatically routes to project-local directories if gitignore checks pass, otherwise defaulting to safe global locations.

Can I use this worktree workflow for local experimentation that requires safety verification?

Yes, you can use this workflow for local experimentation requiring safety verification. It validates a clean baseline before work begins and ensures directories are properly ignored by git, enabling safe and isolated feature development.

What happens if my preferred worktree directory fails the gitignore checks?

If your preferred worktree directory fails gitignore checks, the system automatically falls back to global worktree locations. This ensures feature development remains isolated and prevents accidental contamination of your main workspace.