using-git-worktrees

Create isolated Git worktrees with automated setup and baseline testing.

Updated Aug 6, 2025
One-click install
npx skills add https://github.com/flosrn/.claude --skill using-git-worktrees-flosrn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/flosrn/.claude/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/flosrn/.claude --skill using-git-worktrees-flosrn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill creates isolated Git worktrees for feature development, ensuring your main workspace remains clean and stable.

Core Features & Use Cases

  • Isolated Workspaces: Work on multiple branches simultaneously without context switching.
  • Smart Directory Selection: Automatically finds or prompts for the best location for new worktrees.
  • Safety Verification: Ensures project-local directories are ignored by Git before creation.
  • Automated Setup: Runs project-specific setup commands (npm, cargo, pip, go) after worktree creation.
  • Baseline Testing: Verifies a clean state by running project tests.
  • Use Case: Start developing a new authentication feature by creating a dedicated, isolated worktree, ensuring your main development branch is unaffected.

Quick Start

Use the using-git-worktrees skill to create a new worktree for the 'feature/user-profile' branch.

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 development with git worktrees?

To isolate feature development with git worktrees, this Skill automates creating isolated workspaces for new branches. It manages smart directory selection and safety verification to ensure your main workspace remains clean and stable during feature work.

Why use git worktrees for branch isolation instead of standard branching?

Git worktrees allow you to work on multiple branches simultaneously without context switching. This approach isolates feature development in separate directories, ensuring your main development branch remains unaffected and stable while you test new features.

Does git worktree setup support Node.js, Rust, Python, and Go projects?

Yes, git worktree setup supports Node.js, Rust, Python, and Go projects. It automates project-specific setup commands like npm, cargo, pip, and go, running them automatically after worktree creation to prepare your isolated development environment.

How do I ensure git ignores project-local directories when creating worktrees?

To ensure git ignores project-local directories when creating worktrees, this Skill performs safety verification before creation. It automatically checks and prompts for the best location, verifying that local directories are properly ignored by Git to prevent conflicts.

Can I run baseline testing automatically after setting up a git worktree?

Yes, you can run baseline testing automatically after setting up a git worktree. This Skill verifies a clean state by running project tests immediately after worktree creation and automated setup, ensuring your isolated environment starts with a passing baseline.