using-git-worktrees

Create isolated Git worktrees and run baseline tests before feature work.

1|Updated May 16, 2026
One-click install
npx skills add https://github.com/enigmaicon-eng/AI-Enterprise-OS --skill using-git-worktrees-enigmaicon-eng
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/enigmaicon-eng/AI-Enterprise-OS/tree/main/examples/superpowers/skills/using-git-worktrees
Command: npx skills add https://github.com/enigmaicon-eng/AI-Enterprise-OS --skill using-git-worktrees-enigmaicon-eng

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents accidentally disrupting your current branch by ensuring feature work runs in an isolated Git workspace when you start implementation plans.

Core Features & Use Cases

  • Detects existing isolation first: Identifies whether you are already in a linked worktree and avoids creating nested/duplicate worktrees.
  • Creates isolation safely: Uses native worktree tooling when available, otherwise falls back to git worktree add with a sandbox-aware flow.
  • Prepares and validates a clean baseline: Runs project-appropriate setup (Node/Rust/Python/Go) and verifies tests so you don’t start from a broken state.
  • Use case: Starting a risky refactor or feature branch while keeping your main workspace clean, then running baseline checks before implementing.

Quick Start

Use the using-git-worktrees skill to set up an isolated worktree for safe feature development and verify the project baseline tests are passing.

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 system detects existing linked worktrees and submodules, then uses native worktree tooling or falls back to `git worktree add` with correct directory selection and ignore-safety to establish a sandbox workspace.

Does git worktree setup run dependency installation and baseline tests?▼

Yes, git worktree setup runs project-appropriate dependency installation for Node, Rust, Python, and Go repositories, then executes baseline tests to verify a clean state before you begin implementation.

What is the best way to prevent branch changes from affecting my current checkout?▼

Using git worktrees is the best way to prevent branch changes from affecting your current checkout, providing an isolated development workspace that avoids disrupting your main branch state.

Can I use git worktree add if my repository has submodules?▼

Yes, you can use `git worktree add` with submodules because the setup process explicitly detects existing linked worktrees and submodules to prevent nested or duplicate worktree creation issues.

When do I need an isolated git workspace for running implementation plans?▼

You need an isolated git workspace when starting risky refactors or new feature branches, ensuring your main workspace remains clean while preparing a verified baseline before development.

How does git worktree handle nested worktrees in existing repositories?▼

Git worktree handles nested worktrees by detecting if you are already inside a linked worktree, actively avoiding the creation of nested or duplicate worktrees to maintain repository integrity.