using-git-worktrees

Create an isolated git worktree for feature work with safety verification.

14|2|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/pyinx/ceo-skills-plugin --skill using-git-worktrees-pyinx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/pyinx/ceo-skills-plugin/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/pyinx/ceo-skills-plugin --skill using-git-worktrees-pyinx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Isolate feature work in a separate git worktree to keep the main workspace clean and prevent cross-branch contamination.

Core Features & Use Cases

  • Directory priority and discovery: Detects existing worktrees, CLAUDE.md preferences, or prompts the user for a location, ensuring predictable isolation.
  • Safety verification: Validates the chosen directory is ignored by git before creation and updates .gitignore if needed to prevent accidental commits.
  • End-to-end workflow support: Creates the worktree, runs project setup steps, and validates a clean baseline for safe development.

Quick Start

Create an isolated git worktree to run feature work without impacting the current 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 isolate feature work in a git worktree without impacting my main workspace?

Git worktrees isolate feature work by creating separate working directories linked to the same repository, preventing cross-branch contamination and keeping your main workspace clean during development.

What is the best way to prevent accidental commits when creating a git worktree?

Preventing accidental commits requires safety verification: validate the chosen directory is ignored by git before creation, and automatically update .gitignore if needed to exclude worktree contents from being committed.

How do I set up a git worktree using CLAUDE.md directory preferences?

Setting up a git worktree follows directory priority by detecting existing worktrees, reading CLAUDE.md preferences, or prompting for a location, ensuring predictable isolation across project-local and global locations.

Can I run project setup and baseline tests after creating a git worktree?

Yes, the worktree workflow executes project setup steps and validates a clean baseline test after creation, ensuring the isolated environment is fully configured and safe for development.

When do I need a git worktree for isolated development?

You need a git worktree when running feature work that requires isolation from your current workspace, especially to avoid cross-branch contamination and maintain a clean main working directory during parallel development.

Does git worktree creation work across both project-local and global locations?

Yes, git worktree creation works across project-local and global locations, following directory discovery rules to detect existing worktrees, apply CLAUDE.md preferences, or prompt the user for a target path.