using-git-worktrees

Create isolated Git worktrees with directory selection and safety verification.

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/jf3096/personal-configs --skill using-git-worktrees-jf3096
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/jf3096/personal-configs/tree/main/.codex/superpowers/skills/using-git-worktrees
Command: npx skills add https://github.com/jf3096/personal-configs --skill using-git-worktrees-jf3096

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a systematic and safe way to create isolated development environments using Git worktrees, preventing conflicts and ensuring a clean starting point for new features.

Core Features & Use Cases

  • Isolated Workspaces: Create separate directories for different branches without duplicating the entire repository.
  • Smart Directory Selection: Automatically finds or prompts for the best location to create worktrees, prioritizing project-local hidden directories.
  • Safety Verification: Ensures project-local worktree directories are ignored in Git to prevent accidental commits.
  • Automated Setup: Detects and runs project-specific setup commands (e.g., npm install, cargo build).
  • Baseline Testing: Verifies a clean state by running project tests after setup.
  • Use Case: When starting a new feature like "user authentication," this Skill sets up a dedicated worktree, installs dependencies, and confirms tests pass, ensuring you begin implementation in a stable, isolated environment.

Quick Start

Use the using-git-worktrees skill to set up an isolated workspace for the 'feature/new-login' branch.

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?

Git worktrees allow you to manage multiple working directories from a single repository, preventing branch switching conflicts and ensuring an isolated, clean starting point for new feature development.

How do I manage project-local Git worktree directories safely?

You can manage project-local Git worktree directories safely by using this skill to automatically verify that the target hidden directory is properly ignored in Git, preventing accidental commits of worktree files.

Can I automatically run setup and baseline tests when creating a Git worktree?

Yes, when creating a Git worktree, the skill detects and executes project-specific setup commands such as cargo build or npm install, then automatically runs project tests to verify a clean, stable baseline state.

What is the best way to isolate feature branches without duplicating the entire repository?

Using Git worktrees is the best way to isolate feature branches, as it creates separate working directories linked to the same repository without duplicating files, saving disk space and preventing branch conflicts.

Does this Git worktree workflow support both global and project-local directory locations?

Yes, this Git worktree workflow supports smart directory selection by automatically finding or prompting for the best location, prioritizing project-local hidden directories while also managing global worktree locations.