worktree-create

Creates git worktrees on separate branches with config, dependencies, and health checks via parallel subagents.

Updated Aug 28, 2026
One-click install
npx skills add https://github.com/az9713/claude-code-hooks-tutorial --skill worktree-create-az9713
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: worktree-create
Source: https://github.com/az9713/claude-code-hooks-tutorial/tree/main/skills/.claude/skills/worktree-create
Command: npx skills add https://github.com/az9713/claude-code-hooks-tutorial --skill worktree-create-az9713

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up isolated git worktrees for parallel development is repetitive and error-prone: fresh checkouts miss gitignored env files, dependencies, and runtime configuration, and doing it for several branches serially wastes time. ## Core Features & Use Cases - Parallel worktree provisioning: Fans out one setup subagent per branch so multiple worktrees are created, configured, and verified concurrently. - Repo-detected setup: Detects the package manager, gitignored env/config files, health-check command, and port assignments from the repository itself rather than hardcoding a stack. - Health verification and reporting: Runs a detected health check per worktree and reports a per-worktree summary with cleanup instructions. - Use Case: You need to run three PIV loops on separate feature branches at once; invoke the skill with the branch names and receive three ready-to-use worktrees, each with dependencies installed and a passing health check. ## Quick Start Ask the agent to set up worktrees for your feature branches, for example by saying "create worktrees for branches feature-a and feature-b".

Frequently Asked Questions about worktree-create

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create multiple git worktrees in parallel?▼

Invoke the skill with a list of branch names and it spawns one setup subagent per branch that runs concurrently. Each subagent creates the worktree, copies gitignored config, installs dependencies, and runs a health check before reporting back.

Why is my git worktree missing env files and dependencies?▼

A git worktree shares tracked files but none of the untracked or gitignored files like .env, credentials, or node_modules. The skill copies gitignored config from the main checkout and installs dependencies into each worktree so it is fully runnable.

Does this work with monorepos and different package managers?▼

Yes, the install command is detected from lockfiles and manifests such as uv.lock, package-lock.json, pnpm-lock.yaml, Cargo.toml, or go.mod. For monorepos, an install runs per package directory rather than assuming a single stack.

How are port conflicts avoided when running services in multiple worktrees?▼

Each worktree is assigned a distinct port computed as a base port plus its index, so parallel servers do not collide. Port assignment only applies when the health check actually starts a service.

How do I clean up git worktrees after branches are merged?▼

Remove each worktree with git worktree remove worktrees/<branch> once its branch is merged. The skill's final report includes this cleanup reminder so stale worktrees do not accumulate.