worktree

Create and clean up isolated git worktrees for parallel tasks.

1|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/jamesaphoenix/tx-agent-kit --skill worktree-jamesaphoenix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree
Source: https://github.com/jamesaphoenix/tx-agent-kit/tree/main/.codex/skills/worktree
Command: npx skills add https://github.com/jamesaphoenix/tx-agent-kit --skill worktree-jamesaphoenix

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Use git worktrees to isolate parallel agent changes, preventing cross-task interference and enabling faster iteration without polluting the main branch.

Core Features & Use Cases

  • Create isolated worktrees per task to avoid branch contention and merge conflicts.
  • Enforce standardized worktree naming conventions for easy maintenance and cleanup.
  • Enable parallel experimentation and task isolation within a single repository lifecycle.

Quick Start

Create a new worktree for your task and start making isolated changes there.

Frequently Asked Questions about worktree

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

FAQPage Schema
How do I run parallel tasks in the same git repository without branch conflicts?

Git worktrees isolate parallel agent changes by creating separate working directories for each task within a single repository. This prevents cross-task interference and branch contention while enabling faster iteration without polluting the main branch.

How do I create an isolated worktree for a specific task?

Create a new worktree for your task to start making isolated changes there. The skill supports per-task worktree creation with standardized naming conventions, ensuring easy maintenance and automated cleanup of stale worktrees when tasks are complete.

What is the best way to manage multiple parallel branches in git?

The best way to manage multiple parallel branches is using git worktrees to isolate each task or experiment. This approach enforces standardized naming conventions and supports automated cleanup of stale worktrees, reducing merge conflicts and maintenance overhead.

Can I use git worktrees for parallel experimentation within a single repository?

Yes, git worktrees enable parallel experimentation within a single repository lifecycle by isolating each task in its own working directory. This prevents branch contention and allows multiple experiments to run safely without polluting the main branch.

How do I clean up stale worktrees from completed tasks?

Stale worktrees from completed tasks are handled through automated cleanup supported by the skill. Standardized naming conventions make it easy to identify and remove worktrees that are no longer needed, keeping the repository maintained.

When should I avoid using git worktrees for branch isolation?

Git worktrees may not be necessary for simple, sequential single-branch workflows where parallel task isolation is not required. They are best suited for scenarios involving multiple concurrent tasks or experiments that need isolated branches and safe merges.