using-git-worktrees

Create isolated git worktrees with safety checks and automatic project setup.

2|1|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/passionseed/ps_app --skill using-git-worktrees-passionseed
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/passionseed/ps_app/tree/main/.agent/skills/using-git-worktrees
Command: npx skills add https://github.com/passionseed/ps_app --skill using-git-worktrees-passionseed

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Starting feature work in a dedicated, isolated space to avoid polluting the main workspace and to keep experiments separate from the current branch.

Core Features & Use Cases

  • Directory priority-based setup (prefers .worktrees, then worktrees) to ensure a predictable workspace.
  • Safety verification to ensure the chosen directory is ignored by git, preventing accidental commits of worktree contents.
  • Automatic project setup and baseline verification after creating the worktree for supported project types (Node, Rust, Python, Go).

Quick Start

Set up an isolated git worktree for the current project and verify it is ignored by gitignore rules.

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 work?

The tool creates an isolated git worktree by applying directory priority, preferring a project-local .worktrees folder, and running safety checks to ensure the workspace remains clean.

Why should I use git worktrees to isolate feature work instead of branching in the main workspace?

Using git worktrees prevents feature work from polluting the main workspace, keeping experiments and new features separate from your current branch without stashing uncommitted changes.

Does the worktree setup support automatic project setup for Node, Rust, Python, and Go?

Yes, the worktree setup automatically detects project files and runs project setup commands for supported types including Node, Rust, Python, and Go, followed by baseline test validation.

How do I verify my git worktree directory is ignored to prevent accidental commits?

The tool performs safety verification by checking the chosen worktree directory against gitignore rules to ensure it is ignored by git, preventing accidental commits of worktree contents.

What happens if the preferred .worktrees directory is not available for git worktree setup?

The git worktree setup enforces directory priority, preferring .worktrees first, then falling back to a global worktrees location or alternative project-local directories to ensure a predictable workspace.