git-worktrees

Create isolated git worktrees for feature development with baseline tests.

9|1|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/CarbeneAI/Forge --skill git-worktrees-carbeneai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktrees
Source: https://github.com/CarbeneAI/Forge/tree/main/.claude/skills/GitWorktrees
Command: npx skills add https://github.com/CarbeneAI/Forge --skill git-worktrees-carbeneai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Facilitates safe, isolated feature development by creating separate worktrees that share history but keep work isolated, preventing accidental commits to main.

Core Features & Use Cases

  • Isolated worktrees for feature development with automatic safety verification and setup.
  • Enforces project-local ignores to prevent cross-worktree contamination.
  • Provides a guided workflow for creating, testing, and cleaning up worktrees during feature work.

Quick Start

Create a new worktree for a feature and verify project-local ignores before starting work.

Frequently Asked Questions about 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?

Git worktrees allow parallel feature development by creating separate working directories that share repository history. This prevents accidental commits to the main branch while enabling simultaneous experiments and isolated feature implementations.

Why should I use git worktrees instead of branches for parallel experiments?

Git worktrees provide isolated working directories for each branch, allowing you to run parallel experiments without switching branches or risking cross-worktree contamination. Unlike standard branching, worktrees keep your main branch safe from accidental changes during feature development.

Does setting up a git worktree automatically install dependencies and run tests?

Yes, this skill performs automatic safety verification by checking .gitignore for project-local directories, setting up the worktree branch, installing dependencies if needed, and running baseline tests to ensure a safe starting point for isolated feature development.

When do I need to use isolated git worktrees?

You need isolated git worktrees when starting a new feature, preparing parallel experiments, or isolating development before implementing from a plan. Worktrees prevent accidental changes to your main branch and enforce project-local ignores to avoid cross-contamination.

What's the best way to prevent accidental commits to main during feature work?

The best way to prevent accidental commits is using isolated git worktrees with automatic safety verification. This approach separates your feature branch physically, enforces project-local ignores, and sets up a clean environment with baseline tests before you begin coding.