git-worktree

Create isolated git worktrees with safe directory selection and dependency setup.

Updated Nov 29, 2025
One-click install
npx skills add https://github.com/thimslugga/agent-skills --skill git-worktree-thimslugga
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/thimslugga/agent-skills/tree/main/skills/git/git-worktree
Command: npx skills add https://github.com/thimslugga/agent-skills --skill git-worktree-thimslugga

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Facilitates starting feature work in an isolated environment to avoid disturbing the main workspace by creating git worktrees with smart directory selection and safety verification.

Core Features & Use Cases

  • Smart directory selection between project-local and global options, with preference handling via CLAUDE.md when specified
  • Safety verification to ensure the chosen directory is ignored by git, with steps to fix and commit changes if needed
  • Automatic project setup after creating the worktree, auto-detecting the project's toolchain (Node.js, Rust, Python, Go) and installing dependencies
  • Verification of a clean baseline by running project-specific tests to confirm readiness
  • Real-world use: isolate feature development without impacting the main branch, then switch back when ready

Quick Start

Create a new git worktree for your feature branch, verify the worktree directory is ignored, install dependencies if needed, and confirm a clean baseline by running tests.

Frequently Asked Questions about git-worktree

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

FAQPage Schema
How do I create an isolated git worktree for feature development?

To create an isolated git worktree, use a skill that identifies and sets up a new workspace with smart directory selection and safety verification. It ensures the chosen directory is ignored by git and automatically installs project dependencies before use.

What is a git worktree and when do I need one for multi-branch workflows?

A git worktree is an isolated workspace linked to a single repository that enables concurrent feature work without disturbing the main directory. You need one for multi-branch workflows to preserve repository integrity while switching contexts.

Does git worktree setup work with Node.js, Rust, Python, and Go projects?

Yes, git worktree setup auto-detects the project toolchain for Node.js, Rust, Python, and Go. After creating the worktree, it automatically installs and validates the necessary dependencies to ensure a clean baseline.

What's the best way to ensure my git worktree directory is safely ignored?

The best way to ensure a git worktree directory is safely ignored is by using a setup skill that verifies ignore rules during creation. If the directory is not ignored, it prompts you to fix and commit the necessary changes.

How do I verify a clean baseline after creating a git worktree?

To verify a clean baseline after creating a git worktree, the setup process runs project-specific tests automatically. This confirms readiness and validates that the installed dependencies and isolated environment are functioning correctly.

Why does my git worktree setup prompt me to choose between project-local and global locations?

Git worktree setup prompts for location to apply smart directory selection between project-local and global options. This ensures safe placement based on preference handling specified in CLAUDE.md, preventing accidental repository disturbance.