using-git-worktrees

Create isolated Git worktrees with directory selection and baseline tests.

Updated Mar 5, 2026
One-click install
npx skills add https://github.com/Himanshu040604/codex-skills-setup --skill using-git-worktrees-himanshu040604
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/Himanshu040604/codex-skills-setup/tree/main/assets/codex/skills/claude-import/skills/plugins/superpowers%40claude-plugins-official/skills/using-git-worktrees
Command: npx skills add https://github.com/Himanshu040604/codex-skills-setup --skill using-git-worktrees-himanshu040604

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of creating isolated development environments using Git worktrees, ensuring a clean separation between feature development and the main codebase.

Core Features & Use Cases

  • Isolated Workspaces: Create separate directories for different branches, allowing simultaneous work without interference.
  • Smart Directory Selection: Automatically detects or prompts for the best location to create worktrees, prioritizing local hidden directories.
  • Safety Verification: Ensures project-local worktree directories are ignored by Git to prevent accidental commits.
  • Automated Setup: Detects and runs project-specific setup commands (npm, cargo, pip, poetry, go).
  • Baseline Testing: Verifies the new worktree is in a clean, testable state before development begins.
  • Use Case: Before starting a new feature, use this skill to create a dedicated worktree, install dependencies, and run initial tests, ensuring a stable starting point.

Quick Start

Use the using-git-worktrees skill to create a new worktree for the 'feature/new-login' branch in the '.worktrees' directory.

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, this skill automatically selects a project-local or global directory, ensures it is ignored by Git, runs project-specific setup commands, and verifies a clean baseline by executing tests.

What is the best way to manage git worktrees for parallel branch testing?

Managing git worktrees for parallel testing is streamlined by automatically creating isolated directories for different branches, detecting project setup tools like npm or cargo, and running initial tests to verify a stable starting state.

Why do I need to ignore git worktree directories before creating them?

You need to ignore git worktree directories to prevent accidental commits of local development environments. This skill performs safety verification to ensure project-local worktree paths are properly ignored before creation.

Does git worktree setup work with npm, cargo, pip, poetry, and go projects?

Yes, git worktree setup works with npm, cargo, pip, poetry, and go projects. The skill detects your project's specific package manager and automatically executes the corresponding setup commands during worktree creation.

Can I run project tests automatically when setting up a new git worktree?

Yes, you can run project tests automatically. The skill performs baseline testing immediately after creating the worktree and running setup commands, verifying the new isolated workspace is in a clean, testable state before development begins.

What are the limitations of using local hidden directories for git worktrees?

A key consideration when using local hidden directories for git worktrees is ensuring they do not interfere with the main codebase. The skill mitigates this by prioritizing local hidden directories and verifying they are ignored by Git.