using-git-worktrees

Create isolated Git worktrees with safety checks and automated setup.

19|4|Updated Feb 1, 2026
One-click install
npx skills add https://github.com/jarredkenny/agency-ai --skill using-git-worktrees-jarredkenny
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/jarredkenny/agency-ai/tree/main/roles/orchestrator/skills/using-git-worktrees
Command: npx skills add https://github.com/jarredkenny/agency-ai --skill using-git-worktrees-jarredkenny

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktrees create isolated workspaces sharing the same repository, enabling parallel branch work without switching contexts or risking accidental commits to the wrong branch.

Core principle: Systematic directory selection + safety verification = reliable isolation.

Announce at start: "I'm using the using-git-worktrees skill to set up an isolated workspace."

Core Features & Use Cases

  • Directory discovery and prioritization (project-local .worktrees, local worktrees, global config, CLAUDE.md preferences).
  • Safety verification to ensure the worktree directory is ignored by git, preventing accidental commits of worktree contents.
  • Automated setup: detect project type (Node, Rust, Python, Go) and run the appropriate install commands.
  • Use Case: Work on feature branches in isolation for experiments, bug fixes, or parallel development.

Quick Start

Create a new Git worktree for a feature branch and let the skill detect the project type, install dependencies, and verify a clean baseline.

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 workspaces for parallel branch work?

You can create isolated Git workspaces by generating Git worktrees, which allow you to work on multiple branches simultaneously without switching context or risking accidental commits to the wrong branch.

What is the best way to manage dependencies when setting up a new Git worktree?

Managing dependencies in a Git worktree is automated by detecting the project type, such as Node, Rust, Python, or Go, and running the appropriate package manager install commands to establish a clean baseline.

How does directory discovery work for Git worktrees across different projects?

Directory discovery for Git worktrees prioritizes project-local configurations like a .worktrees folder, a local worktrees directory, global settings, or CLAUDE.md preferences to systematically select the correct location.

Why do I need to verify .gitignore before creating a Git worktree?

Verifying .gitignore before creating a Git worktree is a safety check ensuring the worktree directory is ignored, which prevents accidentally committing worktree contents into your main repository history.

Can I use Git worktrees for bug fixes and feature experiments without disrupting my main workspace?

Yes, Git worktrees provide safe isolation for feature development, experiments, and bug fixes across multiple branches within the same repository, allowing you to experiment without disrupting your main workspace.

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

Git worktrees require careful .gitignore configuration to prevent accidental commits, and you must run dependency installation steps for each newly created workspace to ensure a functional development environment.