using-git-worktrees

Create isolated Git worktrees with safety checks and automated project setup.

4|1|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/shichengwuyu/PaiJiPlus --skill using-git-worktrees-shichengwuyu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/shichengwuyu/PaiJiPlus/tree/main/.trae/skills/using-git-worktrees
Command: npx skills add https://github.com/shichengwuyu/PaiJiPlus --skill using-git-worktrees-shichengwuyu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Isolate feature work from the current workspace by creating and managing Git worktrees with smart directory selection and safety verification.

Core Features & Use Cases

  • Directory selection with safety checks: prioritizes existing directories, CLAUDE.md preferences, or user input to choose a safe worktree location.
  • Safety verification: ensures the chosen local worktree directory is ignored by gitignore to prevent accidental commits.
  • Automated setup: auto-detects project types (Node.js, Rust, Python, Go) and runs the appropriate setup commands.
  • Use Case: Start a feature in an isolated worktree, install dependencies, run tests, and avoid polluting the main repository.

Quick Start

Create a new feature worktree in the preferred location, run project setup automatically, and verify tests pass before implementing the feature.

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?

An isolated Git workspace is created by setting up a Git worktree with smart directory selection and safety verification to prevent workspace contamination. This Skill automates the setup process and runs project-specific configurations for you.

How does Git worktree safety verification prevent accidental commits?

Git worktree safety verification ensures the chosen local directory is ignored by gitignore. This mechanism prevents the worktree directory from being accidentally committed to the main repository, maintaining a clean baseline.

Can I automatically run project setup commands for Node.js, Rust, Python, and Go in a Git worktree?

Yes, automated worktree setup auto-detects project types including Node.js, Rust, Python, and Go. It automatically runs the appropriate setup commands and verifies that tests pass before you begin implementing your feature.

What is the best way to avoid polluting my main repository when starting new feature work?

The best way to avoid polluting your main repository is isolating feature work in a Git worktree. This approach uses directory detection and gitignore checks to ensure a clean baseline across different languages.

Does Git worktree setup respect CLAUDE.md preferences for directory selection?

Yes, directory selection for Git worktree setup prioritizes existing directories, CLAUDE.md preferences, or user input. This ensures the worktree location is safely chosen and verified before proceeding with project setup.