using-git-worktrees

Create isolated git worktree workspaces with baseline test validation.

9|2|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/DmitriyPolukhin/antigravity-superpower --skill using-git-worktrees-dmitriypolukhin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/DmitriyPolukhin/antigravity-superpower/tree/main/modules/using-git-worktrees
Command: npx skills add https://github.com/DmitriyPolukhin/antigravity-superpower --skill using-git-worktrees-dmitriypolukhin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents developer workflow disruption and accidental repo pollution by creating isolated git workspaces for feature work.

Core Features & Use Cases

  • Workspace isolation with git worktrees: Creates a dedicated branch-backed worktree without switching your main workspace.
  • Smart, consistent directory selection: Prefers existing project-local directories, otherwise respects CLAUDE.md preference, otherwise prompts the user.
  • Safety verification guardrails: Verifies project-local worktree directories are ignored via git check-ignore, and if not, instructs you to fix .gitignore and commit before continuing.
  • Baseline test validation: Runs an appropriate “clean” test command for the detected stack to confirm the worktree starts in a healthy state.
  • Auto dependency setup by ecosystem: Installs Node/Rust/Python/Go dependencies when the relevant project files are detected.

Quick Start

Tell Antigravity: "Use the using-git-worktrees skill to set up an isolated workspace for the feature I’m about to implement."

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 development without switching branches?

Git worktrees create a dedicated branch-backed directory without switching your main workspace, preventing accidental repo pollution and workflow disruption. The worktree is automatically set up with an isolated directory per branch for safe feature implementation.

What happens if my git worktree directory is not ignored in .gitignore?

If the project-local worktree directory is not ignored, the setup verifies via git check-ignore and instructs you to fix .gitignore and commit before continuing. This safety guardrail prevents the isolated workspace from polluting your main repository.

Does git worktree setup automatically install project dependencies for Node, Rust, Python, or Go?

Yes, worktree setup auto-detects relevant project files and installs dependencies for Node, Rust, Python, and Go ecosystems. This ensures the isolated branch-backed workspace is fully prepared for immediate feature implementation.

How do I validate a clean test baseline before starting feature work in a new git worktree?

Worktree setup runs an appropriate clean test command for the detected stack to confirm the workspace starts in a healthy state. If baseline tests fail, the setup handles the failure so you can resolve issues before implementing features.

How does git worktree directory selection work when setting up an isolated workspace?

Directory selection prefers existing project-local directories, otherwise respects CLAUDE.md preference, and finally prompts the user if no preference is found. This priority-based selection ensures consistent and predictable worktree placement.