git-worktrees

Create, manage, and clean up Git worktrees with Bash validation.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/amijadoamijado/sd003 --skill git-worktrees-amijadoamijado
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktrees
Source: https://github.com/amijadoamijado/sd003/tree/main/.claude/skills/git-worktrees
Command: npx skills add https://github.com/amijadoamijado/sd003 --skill git-worktrees-amijadoamijado

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git Worktreesを安全に作成・管理・削除するワークフローを提供し、メインリポジトリを汚さずに並行作業を可能にします。

Core Features & Use Cases

  • 安全な worktree の作成・削除・検証手順を自動化/ガイドします。
  • Phase 1-4 の実践的フローを通じて、衝突を避けつつ複数機能を同時進行で開発します。
  • Git のワークフローをチーム共有基盤として統合するケースをサポートします。

Quick Start

Create a new feature worktree, verify it builds locally, and prepare it for merge.

Frequently Asked Questions about git-worktrees

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage Git worktrees for parallel feature development without contaminating main branches?

Git worktrees can be managed safely by orchestrating creation, validation, and cleanup phases through automated Bash and Git commands. This approach enforces guardrails and phase-based checks, allowing you to run parallel features and experiments while keeping the main repository clean.

What is the best way to automate Git worktree cleanup and lifecycle management?

Automating Git worktree cleanup involves applying phase-based checks and automated validation using Bash and Git commands. This enforces safe lifecycle management by applying guardrails during creation and removal, ensuring obsolete worktrees are safely pruned without corrupting the main repository.

Can I run multiple Git branch experiments simultaneously using worktrees?

Yes, you can run multiple Git branch experiments simultaneously by creating separate worktrees for each task. This allows you to develop features, run experiments, and perform refactoring in parallel across isolated directories without switching branches or contaminating the main repository.

Does this Git worktree workflow require any special dependencies or environments?

This Git worktree workflow requires no special dependencies beyond standard Bash and Git command line environments. It operates using built-in Git commands and Bash scripts to enforce guardrails, making it immediately usable in existing development setups without additional package installations.

Why should I use Git worktrees instead of traditional branch switching for refactoring?

Git worktrees provide isolated directories for parallel work, eliminating the need to stash changes or switch branches constantly. This prevents context loss and contamination during refactoring, while phase-based checks ensure structural integrity before merging changes back into the main repository.

What are the limitations or precautions when automating worktree creation with Bash and Git?

When automating worktree creation with Bash and Git, you must enforce phase-based checks and guardrails to prevent path collisions and untracked file conflicts. Limitations arise if automated validation is skipped, potentially leaving orphaned worktree directories or corrupting branch references during cleanup.