using-git-worktrees

Creates isolated git worktrees with directory selection, ignore verification, and baseline test validation.

1|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/mst-software-vn/mst-checkscam --skill using-git-worktrees-mst-software-vn
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/mst-software-vn/mst-checkscam/tree/main/.claude/skills/using-git-worktrees
Command: npx skills add https://github.com/mst-software-vn/mst-checkscam --skill using-git-worktrees-mst-software-vn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working on a new feature often requires switching branches or stashing changes, which disrupts your current workspace. This Skill creates isolated git worktrees so you can develop on separate branches without touching your main working directory. ## Core Features & Use Cases - Smart Directory Selection: Follows a priority order—existing .worktrees/ or worktrees/ directories, then CLAUDE.md preferences, then asks the user—so worktrees land in a consistent location. - Safety Verification: Checks with git check-ignore that project-local worktree directories are gitignored before creation, and fixes the .gitignore automatically if not. - Automated Setup and Baseline Validation: Auto-detects project type (Node.js, Rust, Python, Go), installs dependencies, and runs the test suite to confirm a clean baseline before work begins. - Use Case: You are mid-review on one branch and need to start a feature implementation immediately. The Skill creates .worktrees/feature-auth, installs dependencies, runs tests, and reports a ready workspace without disturbing your current checkout. ## Quick Start Ask the AI to set up an isolated git worktree for your new feature branch before starting implementation.

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 a git worktree for a new feature branch?▼

Run git worktree add with a target path and the -b flag to create a new branch, for example git worktree add .worktrees/auth -b feature/auth. This Skill automates that plus directory selection, dependency installation, and test verification.

Where should git worktrees be stored in a project?▼

Worktrees can live in a project-local directory like .worktrees/ or worktrees/, or in a global location outside the repository. This Skill checks existing directories first, then CLAUDE.md preferences, then asks the user.

Why must worktree directories be added to .gitignore?▼

Project-local worktree directories must be gitignored, otherwise their contents appear in git status and risk being committed to the repository. The Skill verifies this with git check-ignore and fixes the .gitignore before creating the worktree.

What happens if tests fail in a new worktree?▼

If baseline tests fail in the new worktree, the Skill reports the failures and asks whether to proceed or investigate. This prevents confusing pre-existing bugs with issues introduced by new work.

Does git worktree setup work with Python or Rust projects?▼

Yes, the Skill auto-detects project type from marker files like package.json, Cargo.toml, requirements.txt, pyproject.toml, and go.mod, then runs the appropriate dependency installation and test commands.