using-git-worktrees

Creates isolated Git worktrees with dependency setup and baseline tests.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the creation and setup of isolated Git worktrees, preventing conflicts and ensuring a clean development environment for new features or tasks.

Core Features & Use Cases

  • Isolated Workspaces: Creates separate directories for concurrent development branches using Git worktrees.
  • Smart Directory Selection: Prioritizes .worktrees/, then worktrees/, checks CLAUDE.md for preferences, or prompts the user.
  • Safety Verification: Ensures project-local worktree directories are ignored by Git before creation to prevent accidental commits.
  • Automated Setup: Detects and runs project-specific setup commands (npm, cargo, pip, poetry, go).
  • Baseline Testing: Runs project tests to confirm a clean starting state.
  • Use Case: When starting a new feature, this skill will set up a dedicated, clean directory for that feature's development, run npm install and npm test, and report the worktree's location.

Quick Start

Use the using-git-worktrees skill to set up an isolated workspace for the 'new-feature' 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 branch development?

To create an isolated git worktree, use this skill to automate directory selection in .worktrees/ or worktrees/, verify ignore files, and run dependency installation. It sets up a clean workspace for your feature branch automatically.

What is the best way to manage concurrent feature branches without conflicts in git?

Git worktrees provide isolated workspaces for concurrent feature branches by creating separate directories. This skill automates worktree creation, enforces ignore file verification, and runs baseline tests to ensure a clean starting state.

Does this automated worktree setup work with my project's dependency manager?

Yes, the automated worktree setup detects and runs project-specific dependency installation commands for npm, cargo, pip, poetry, and go. It identifies your environment and executes the appropriate install command automatically.

How are worktree directories chosen and secured to prevent accidental commits?

Worktree directory selection prioritizes .worktrees/, then worktrees/, checks CLAUDE.md, or prompts you. It enforces git ignore verification for project-local directories to prevent accidental commits of worktree folders.

Can I run baseline tests automatically after setting up a new git worktree?

Yes, baseline testing runs automatically after worktree creation and dependency installation. The skill executes your project tests to confirm a clean starting state before you begin feature development.