using-git-worktrees

Create isolated git worktrees with safe directory selection and ignore validation.

1|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/firstsun-dev/yao-agent-skills --skill using-git-worktrees-firstsun-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/firstsun-dev/yao-agent-skills/tree/main/external/develop/devops/using-git-worktrees
Command: npx skills add https://github.com/firstsun-dev/yao-agent-skills --skill using-git-worktrees-firstsun-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Isolate feature work in dedicated git worktrees to avoid polluting the main workspace and to safely experiment with changes.

Core Features & Use Cases

  • Safe directory selection with project-local and global options.
  • Automated validation to ensure worktrees are ignored by Git and do not leak into the main repository.
  • Auto-setup orchestration that detects project tooling and initializes the workspace.

Quick Start

Ask me to create an isolated git worktree for your current project and I will select a safe directory, verify ignore rules, and initialize the 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 create an isolated git worktree for feature development?

To create an isolated git worktree, the skill selects a safe directory, validates ignore rules using git check-ignore, and bootstraps the workspace. This allows feature work in a separate workspace without altering the main repository.

Why do I need to ignore project-local git worktrees?

Project-local git worktrees must be ignored to prevent them from leaking into the main repository. The skill applies guardrails against accidental commits and verifies ignore rules with git check-ignore to ensure isolation.

Can I use existing git worktrees or CLAUDE.md preferences during setup?

Yes, the skill prioritizes existing worktrees or CLAUDE.md preferences when configuring the workspace. It uses these configurations to determine safe directory selection and apply guardrails against accidental commits.

How do I set up a new git worktree across local and global configurations?

Setting up a git worktree involves selecting a safe directory with project-local and global options. The skill auto-detects setup steps from project files, initializes the workspace, and ensures worktrees are ignored by Git.

Does git worktree setup auto-detect project tooling for workspace initialization?

Yes, the skill provides auto-setup orchestration that detects project tooling from project files. It bootstraps the workspace safely and initializes the environment for feature work or triage scenarios.