using-git-worktrees

Create isolated git worktrees for feature development without altering the current workspace.

Updated Dec 9, 2025
One-click install
npx skills add https://github.com/h4v1d/extension-collection-geminicli --skill using-git-worktrees-h4v1d
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/h4v1d/extension-collection-geminicli/tree/main/using-git-worktrees
Command: npx skills add https://github.com/h4v1d/extension-collection-geminicli --skill using-git-worktrees-h4v1d

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the safe setup of isolated git worktrees to enable feature work without altering the current workspace, improving isolation and safety before implementing changes.

Core Features & Use Cases

  • Directory priority: detects existing local worktree directories, CLAUDE.md preferences, or prompts, ensuring predictable placement.
  • Safety verification: checks .gitignore for project-local worktrees and suggests fixes to prevent accidental commits.
  • Creation & setup: creates the worktree, switches context, and auto-runs project setup steps (e.g., install dependencies) when appropriate.
  • Use Case: when starting a new feature on a multi-branch repo, spin up a dedicated worktree and begin work in isolation.

Quick Start

Use the using-git-worktrees skill to set up an isolated workspace.

Frequently Asked Questions about using-git-worktrees

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

FAQPage Schema
How do I set up git worktrees for isolated feature development?

Setting up git worktrees for isolated feature development is automated by this skill, which detects your project name, creates the worktree, switches context, and optionally runs basic setup commands or tests when available.

What is a git worktree and when do I need isolation for branching?

A git worktree provides isolation for branching by allowing you to work on a new feature in a separate directory without affecting your current workspace. You need it for concurrent feature development or isolated experimentation in multi-branch repositories.

Can I use global storage for git worktrees instead of project-local directories?

Yes, you can use global storage for git worktrees instead of project-local directories. The skill supports both global and project-local storage, applying safety checks and suggesting .gitignore fixes to prevent accidental commits for either placement.

How do I prevent accidental commits when creating project-local worktrees?

Preventing accidental commits with project-local worktrees is handled by the skill's safety verification, which checks your .gitignore file and suggests fixes to ensure worktree directories are ignored before you begin isolated feature work.

Do I need git installed to automate worktree creation and setup?

You need git installed to automate worktree creation and setup. The skill requires git to detect the project name, create the isolated worktree, adjust .gitignore, and run basic setup commands or tests when available in your repository.

What's the best way to manage concurrent feature branches without workspace conflicts?

Managing concurrent feature branches without workspace conflicts is best achieved with isolated git worktrees. This skill safely creates dedicated worktrees, allowing you to run project setup steps and experiment independently without altering your main workspace.