using-git-worktrees

Create an isolated Git worktree for feature development.

Updated May 13, 2026
One-click install
npx skills add https://github.com/kimprobably/maestro-os --skill using-git-worktrees-kimprobably
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/kimprobably/maestro-os/tree/main/hermes/distribution/maestro-operator/skills/using-git-worktrees
Command: npx skills add https://github.com/kimprobably/maestro-os --skill using-git-worktrees-kimprobably

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents feature work from contaminating your current branch by ensuring you work in an isolated directory using native worktree support (or a safe git fallback).

Core Features & Use Cases

  • Detects existing isolation: Recognizes when you are already inside a linked worktree and avoids creating nested worktrees.
  • Prefers native tooling: Uses a harness or platform “native worktree” mechanism when available instead of calling git directly.
  • Safe git worktree fallback: Creates a project-local worktree directory only after verifying it is ignored, then runs project setup and baseline tests.
  • Use Case: Starting a new feature from an existing branch while guaranteeing the current workspace stays clean and changes remain isolated.

Quick Start

Use this Skill when you want isolated feature work so your current workspace is protected from changes.

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 from my current Git branch?

To isolate feature development, use Git worktrees to create a separate working directory. This allows you to work on a new feature branch without contaminating your current checkout, keeping your main workspace clean.

What happens if I am already inside a linked Git worktree?

If you are already inside a linked Git worktree, the Skill detects the existing isolation and avoids creating nested worktrees. It recognizes the current state and skips creating a redundant directory to prevent workspace conflicts.

How do I safely create a project-local Git worktree fallback?

To safely create a project-local Git worktree fallback, the process verifies the target directory is ignored before creating it. It then runs dependency setup and baseline tests to confirm the isolated environment has a clean starting point.

Does Git worktree creation handle submodules correctly?

Git worktree creation requires safe handling of submodule detection during directory selection. It verifies ignore rules for project-local worktrees to ensure submodules and existing configurations do not cause conflicts during feature branch preparation.

When should I use an isolated Git worktree for feature development?

Use an isolated Git worktree for feature development when starting implementation from an existing branch. It guarantees your current workspace stays protected and changes remain isolated, which is critical when running baseline tests and dependency setup.