using-git-worktrees

Create isolated Git worktrees with safety checks and automatic branch setup.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/cookeyholder/django-devcontainer-template --skill using-git-worktrees-cookeyholder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/cookeyholder/django-devcontainer-template/tree/main/.agent/skills/using-git-worktrees
Command: npx skills add https://github.com/cookeyholder/django-devcontainer-template --skill using-git-worktrees-cookeyholder

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktrees enable isolated workspaces for feature development, allowing multiple branches without switching contexts and avoiding repository clutter.

Core Features & Use Cases

  • Directory selection with a priority approach (.worktrees, worktrees, CLAUDE.md preference)
  • Safety verification to ensure ignored directories and clean baseline setup before worktree creation
  • Automatic project setup steps (branch creation, setup checks, and environment readiness) before starting work

Quick Start

Create an isolated worktree for a new feature branch using the preferred location 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 an isolated git worktree for feature development?

To create an isolated git worktree, the skill automates safe directory selection, applies ignore rule verification, and sets up the correct branching to keep your feature work separate from the main repository.

What is the best way to keep feature branches separate from my main repository?

Using git worktrees is the best way to keep feature branches separate, allowing multiple isolated workspaces without switching contexts and avoiding repository clutter.

How does git worktree directory selection work with CLAUDE.md preferences?

Directory selection for a git worktree uses a priority approach, checking for a .worktrees folder, a generic worktrees directory, or a specified CLAUDE.md preference to ensure correct placement.

What safety checks are needed before creating a git worktree?

Before creating a git worktree, safety verification ensures target directories are properly ignored and establishes a clean baseline setup to prevent accidental repository clutter.

Can I automate git branch creation and environment setup in a worktree?

Yes, you can automate git branch creation and environment setup because the skill handles automatic project setup steps, verifies readiness, and reports when the isolated workspace is prepared.

When should I not use git worktrees for branching?

You should not use git worktrees if your project lacks proper ignore rules for the target directory, as safety verification depends on ignored directories to maintain a clean baseline.