using-git-worktrees

Create isolated git worktrees with dependency installation and baseline tests.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktrees provide isolated workspaces that share the same repository, enabling concurrent feature development without switching branches or duplicating clones.

Core Features & Use Cases

  • Directory selection priority: prefer .worktrees (hidden) or worktrees, then CLAUDE.md preferences, otherwise prompt the user.
  • Safety verification: ensure the selected worktree directory is ignored by git, fix .gitignore if needed, and commit changes to enforce isolation.
  • Auto-setup and validation: auto-detect the project name, create the worktree, install dependencies based on project files (npm, cargo, pip/poetry, etc.), and run a clean baseline test.
  • Clear reporting: provide the worktree location and readiness status after setup.

Quick Start

Set up an isolated worktree for the current project and verify a clean baseline.

Frequently Asked Questions about using-git-worktrees

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

FAQPage Schema
How do I set up git worktrees for isolated feature development?

Git worktrees provide isolated workspaces sharing the same repository, enabling concurrent feature development. The system creates them by detecting preferred locations, verifying gitignore safety, installing dependencies, and running baseline tests.

What is the best way to manage per-branch experiments without switching branches?

Git worktrees provide isolated workspaces sharing the same repository, enabling concurrent feature development. The system creates them by detecting preferred locations, verifying gitignore safety, installing dependencies, and running baseline tests.

How do I ensure my worktree directory is safely ignored by git?

To ensure worktree isolation, the system performs safety verification to check if the selected directory is ignored by git, automatically fixes the .gitignore file if needed, and commits changes to enforce isolation.

Can I auto-configure project dependencies when creating a git worktree?

Yes, when creating a git worktree, the system auto-detects the project name and installs dependencies based on project files such as npm, cargo, pip, or poetry to ensure the environment is fully configured.

Does git worktree setup support projects using cargo or poetry?

Yes, git worktree setup supports projects using cargo or poetry. It auto-detects project files and installs dependencies for various package managers to configure the isolated workspace correctly.

Why do I need to run baseline tests after creating a worktree?

Running baseline tests after creating a worktree verifies a clean state before starting feature work. The system performs this automatically and reports the readiness status of the isolated environment.