using-git-worktrees

Create isolated git worktrees with dependency setup and baseline test verification.

Updated Feb 23, 2026
One-click install
npx skills add https://github.com/rishikanthc/ml-superpowers --skill using-git-worktrees-rishikanthc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/rishikanthc/ml-superpowers/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/rishikanthc/ml-superpowers --skill using-git-worktrees-rishikanthc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a repeatable, safe way to create isolated development workspaces so feature work does not contaminate the main repository or confuse collaborators, and ensures a verified clean baseline before implementation begins.

Core Features & Use Cases

  • Directory discovery with priority (hidden project-local, visible project-local, global) to respect project conventions.
  • Safety verification that enforces gitignore for project-local worktree directories, automatic remediation (add and commit .gitignore changes), and clear reporting to avoid accidental commits of worktree contents.
  • Automated worktree creation tied to branch names, project-aware setup (detects Node, Python, Rust, Go and runs installs/builds), and baseline test verification to confirm a clean starting point for feature development.
  • Ideal for developers starting feature branches, subagent-driven execution environments, or any workflow that requires isolated, reproducible workspaces before running implementation plans.

Quick Start

Use the using-git-worktrees skill to create a new isolated worktree for branch feature/auth, run the project setup, and verify tests before implementing the feature.

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 workspace for feature branches without contaminating the main repository?

Use git worktrees to create isolated feature workspaces that prevent main repository contamination. The process performs prioritized directory selection, creates worktrees tied to branch names, runs project setup, and verifies a clean test baseline.

How does git worktree directory selection respect project conventions?

Git worktree directory selection respects project conventions by using a priority system: hidden project-local locations first, then visible project-local locations, and finally global locations. This ensures worktrees are placed according to existing project structure.

How do I ensure gitignored worktree directories are not accidentally committed?

To ensure worktree directories are not accidentally committed, safety verification enforces gitignore rules for project-local worktree directories. It provides automatic remediation by adding and committing .gitignore changes, along with clear reporting to prevent accidental commits.

Can I automatically run project setup and dependency installation when creating a git worktree?

Yes, when creating a git worktree, the setup process is project-aware and auto-detects dependencies. It automatically runs installs and builds for Node, Python, Rust, and Go environments within the newly created isolated workspace.

Does baseline test verification work with isolated git worktrees before starting feature implementation?

Yes, baseline test verification runs within the isolated git worktree to confirm a clean starting point before feature implementation begins. This ensures the newly created workspace has a verified, reproducible environment prior to development.

What is the best way to manage parallel feature workspaces using git branching?

The best way to manage parallel feature workspaces is using git worktrees for workspace isolation. This allows developers to create separate branches, run project setup in parallel worktrees, and keep feature work completely separated from the main repository.