using-git-worktrees

Create isolated git worktrees on new branches with dependency installation and baseline test reporting.

115|54|Updated May 25, 2026
One-click install
npx skills add https://github.com/totvs/engpro-advpl-tlpp-skills --skill using-git-worktrees-totvs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/superpowers/using-git-worktrees
Command: npx skills add https://github.com/totvs/engpro-advpl-tlpp-skills --skill using-git-worktrees-totvs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Isolating feature work from your current workspace while avoiding accidental git pollution and commits.

Core Features & Use Cases

  • Deterministic directory selection: Prioritizes existing worktree directories, then reads CLAUDE.md preferences, and only then asks you.
  • Safety verification for project-local worktrees: Ensures .worktrees/ or worktrees/ is ignored via git check-ignore before creating the worktree, and if not ignored it instructs you to update .gitignore, commit, and then proceed.
  • End-to-end setup and baseline verification: Creates the worktree on a new branch, runs project-appropriate dependency install and baseline tests, and stops to report failures before continuing.
  • Use case: When you’ve approved a design and want to implement a feature without disturbing the current branch—create an isolated branch workspace, run baseline tests, and then proceed with implementation confidently.

Quick Start

Ask the AI to set up an isolated git worktree for your approved feature branch and verify that the baseline tests pass before you start implementing.

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 without polluting my main workspace?

Creating an isolated git worktree involves branch-based directory selection that verifies `.worktrees/` is gitignored before setup. This prevents accidental commits of worktree artifacts into your main workspace.

Why does git worktree setup require gitignore verification for project-local paths?

Gitignore verification for project-local paths is required because without it, git worktree artifacts inside `.worktrees/` can be accidentally committed. If `git check-ignore` fails, you must update `.gitignore` and commit before proceeding.

What's the best way to run baseline tests before starting feature implementation in a new worktree?

The best way to run baseline tests in a new worktree is to use an automated setup that creates the branch, installs dependencies, runs tests, and stops to report failures. This ensures a clean test baseline before implementation begins.

How does directory selection work when creating multiple git worktrees for parallel branch work?

Directory selection for git worktrees is deterministic: it prioritizes existing worktree directories, then reads `CLAUDE.md` preferences, and only asks you if no preference is found. This supports efficient parallel branch work.

Can I use automated worktree setup to detect and install dependencies before running tests?

Yes, automated worktree setup can auto-detect and run project-appropriate dependency installation. After creating the isolated branch workspace, it installs dependencies and executes baseline tests with pass/fail reporting.

What happens if baseline tests fail during automated git worktree creation?

When baseline tests fail during git worktree creation, the automated setup uses a stop-and-ask mechanism. It stops the process immediately to report the failures before allowing you to proceed with any feature implementation.