worktree

Launch tasks in new git worktrees using workmux with generated prompt files.

2|Updated Oct 16, 2021
One-click install
npx skills add https://github.com/pattobrien/dotfiles --skill worktree-pattobrien
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: worktree
Source: https://github.com/pattobrien/dotfiles/tree/main/claude/skills/worktree
Command: npx skills add https://github.com/pattobrien/dotfiles --skill worktree-pattobrien

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running multiple coding tasks in parallel on the same repository causes branch conflicts and context switching overhead. This Skill dispatches each task into its own isolated git worktree via workmux, so agents can work independently without touching your current checkout. ## Core Features & Use Cases - Parallel task dispatch: Write a detailed prompt file per task and create a worktree for each with workmux add <name> -b -P <prompt-file>. - Skill delegation: Pass skill references like /auto or /plan-review (including flags such as --gemini) through to the worktree agent instead of writing manual implementation steps. - Merge automation: Use the --merge flag to instruct the worktree agent to commit, rebase, and merge the branch with the /merge skill when finished. - Use Case: You have three independent bug fixes from a planning session. Invoke this Skill with all three tasks, and it creates three worktrees branching from your current branch, each with its own implementation prompt. ## Quick Start Ask the assistant to launch these tasks in separate worktrees using the worktree skill, listing each task you want implemented.

Frequently Asked Questions about worktree

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

FAQPage Schema
How do I run multiple coding tasks in parallel git worktrees?▼

Pass the tasks to the worktree skill, which writes a prompt file per task and runs workmux add for each one. Each worktree branches from the branch checked out in your current directory, keeping implementations isolated.

What is workmux and how does it create git worktrees?▼

workmux is a CLI tool that creates git worktrees with new branches. The command workmux add <name> -b -P <prompt-file> creates a worktree, branches it, and attaches a prompt file for the agent working inside it.

Can I pass another skill like /auto to a worktree agent?▼

Yes, skill references such as /auto or /plan-review can be included in the task, and the generated prompt instructs the worktree agent to use that skill. Flags like --gemini are passed through to the skill invocation.

How do I automatically merge a worktree branch after implementation?▼

Pass the --merge flag when invoking the skill. The prompt file then includes an instruction for the worktree agent to use the /merge skill to commit, rebase, and merge the branch at the end.

Why should workmux add run from the current directory?▼

The new worktree branches from whatever branch is checked out in the current directory. Running workmux add elsewhere, such as the main repo root, would branch from an unintended base and produce incorrect worktrees.