git-worktrees

Create isolated git worktrees in gitignored directories for parallel tasks.

33|Updated Jan 5, 2026
One-click install
npx skills add https://github.com/lvlup-sw/exarchos --skill git-worktrees-lvlup-sw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktrees
Source: https://github.com/lvlup-sw/exarchos/tree/main/skills-src/git-worktrees
Command: npx skills add https://github.com/lvlup-sw/exarchos --skill git-worktrees-lvlup-sw

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Parallel agent teams and delegated subagents can accidentally modify the main repository, cause merge conflicts, and interfere with each other's builds and tests; this Skill provides an isolated, gitignored workspace per task to prevent those issues and enforce safe workflows.

Core Features & Use Cases

  • Create isolated worktrees in a gitignored directory following a predictable naming convention so each task has its own branch and filesystem scope.
  • Environment setup and baseline verification that auto-detects project type (Node, Rust, .NET, Python, Go) and runs dependency installation and baseline tests before implementation.
  • Lifecycle management including safe creation, verification hooks that must pass before changes, and cleanup commands to remove worktrees and prune refs after merge.
  • Delegation integration for spawning per-group worktrees during parallel dispatch, tracking progress, and enforcing pre-change verification for subagents.

Quick Start

Create a gitignored worktree for task 001-api, install dependencies, and verify baseline tests before dispatching subagents.

Frequently Asked Questions about git-worktrees

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

FAQPage Schema
How do I create isolated git worktrees for parallel development tasks?

Create isolated git worktrees by generating gitignored directories with predictable naming conventions, giving each parallel task its own branch and filesystem scope to prevent merge conflicts and interference.

What's the best way to prevent subagents from modifying the main repository?

Prevent subagents from modifying the main repository by dispatching them into isolated git worktrees, which confine file changes to task-specific branches and enforce pre-change verification before any edits occur.

Does git worktree environment setup support Node, Python, and Rust projects?

Git worktree environment setup supports Node, Python, Rust, .NET, and Go projects by auto-detecting the project type to run dependency installation and baseline tests before implementation begins.

How do I clean up git worktrees and prune refs after merging a task?

Clean up git worktrees and prune refs after merging by running lifecycle management commands that safely remove the worktree directories and delete the associated task branches.

Why do parallel agent teams cause merge conflicts and interfere with each other's builds?

Parallel agent teams cause merge conflicts and build interference when operating in the main repository; isolated git worktrees solve this by providing each task an independent filesystem scope and environment.

Can I run baseline tests in a worktree before dispatching subagents?

Run baseline tests in a worktree before dispatching subagents by using verification hooks that check worktree context and execute project dependency installation and tests prior to any file changes.