using-git-worktrees

Create isolated git worktrees with .gitignore safety checks and baseline test verification.

264|11|Updated Apr 25, 2026
One-click install
npx skills add https://github.com/coco-research/coco --skill using-git-worktrees-coco-research
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/coco-research/coco/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/coco-research/coco --skill using-git-worktrees-coco-research

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you create a clean, isolated git worktree for feature work so you can develop in parallel without disturbing the current workspace.

Core Features & Use Cases

  • Workspace Selection: Chooses the right worktree location by checking existing directories, honoring CLAUDE.md preferences, or asking the user when needed.
  • Safety Verification: Confirms that project-local worktree directories are ignored before creation and repairs .gitignore when they are not.
  • Setup and Validation: Creates a new branch, runs the right dependency setup for the project type, and verifies the baseline test state.
  • Use Case: Start implementation on a new branch in an isolated checkout, validate the environment, and avoid polluting the main repository with work-in-progress changes.

Quick Start

Ask the assistant to use the using-git-worktrees skill to create an isolated worktree for your feature and confirm the baseline tests are passing.

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 parallel branch development?

To create an isolated git worktree, the skill selects an appropriate directory, validates .gitignore safety, sets up the new branch, and runs baseline test verification to ensure workspace separation without disrupting your current checkout.

What is the best way to work on a new feature branch without disrupting my current git checkout?

The best way to avoid disrupting your current checkout is using a git worktree. This skill isolates feature work by creating a separate working directory, applying project setup, and verifying baseline tests before you begin development.

Why does git worktree setup require .gitignore safety checks for project-local directories?

Git worktree setup requires .gitignore safety checks to prevent project-local worktree directories from being tracked by the main repository. This safety verification ensures repository isolation and automatically repairs .gitignore configurations when necessary.

Can I run dependency setup and baseline test verification automatically when creating a new git worktree?

Yes, you can run dependency setup and baseline test verification automatically. The skill detects the project type, applies the correct setup for the new worktree branch, and validates the baseline test state before proceeding with implementation.

How do I choose the right directory location for a new git worktree?

Choosing the right git worktree directory involves checking existing locations, honoring CLAUDE.md preferences, and prompting the user when needed. This directory selection precedence ensures the worktree is placed in the correct isolated workspace.

When should I use a git worktree instead of switching branches in my main repository?

You should use a git worktree instead of switching branches when you need workspace separation for parallel development, implementation planning, or test verification tasks that must avoid polluting the main repository with work-in-progress changes.