worktree

Dispatches tasks into new git worktrees using workmux with generated prompt files.

4|Updated Sep 30, 2024
One-click install
npx skills add https://github.com/okm321/dotfiles --skill worktree-okm321
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: worktree
Source: https://github.com/okm321/dotfiles/tree/main/claude/skills/worktree
Command: npx skills add https://github.com/okm321/dotfiles --skill worktree-okm321

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 acts as a thin dispatcher that creates isolated git worktrees via workmux, each with its own detailed implementation prompt, so tasks run independently without manual setup. ## Core Features & Use Cases - Parallel Task Dispatch: Write prompt files and run workmux add for each task, creating named worktrees (2-4 word kebab-case names) in one batch. - Skill Delegation: Pass skill references like /auto --gemini through to the worktree agent instead of writing manual implementation steps. - Cross-Project Dispatch: Detect tasks targeting other repositories and run workmux inside the correct tmux session for that project. - Fork and Merge Flags: Use --fork to copy conversation context into the new worktree, or --merge to have the agent commit, rebase, and merge when done. - Use Case: You have three independent bug fixes from a planning session. Invoke the skill with all three tasks and it creates three worktrees, each with a self-contained prompt, ready for agents to implement in parallel. ## Quick Start Ask the assistant to launch your listed tasks in new git worktrees using the worktree skill, optionally with --fork or --merge flags.

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?▼

List the tasks when invoking the worktree skill, and it writes a detailed prompt file per task then runs workmux add for each one. Each worktree gets a short kebab-case name and branches from the current directory's checked-out branch.

How do I pass a skill like /auto to a worktree agent?▼

Include the skill reference in your task, such as /auto --gemini, and the dispatcher writes a prompt instructing the worktree agent to use that skill with its flags. Manual implementation steps are not written when a skill is specified.

Can workmux dispatch tasks to a different repository?▼

Yes, cross-project dispatch is supported. The skill derives a tmux session from the target project's directory basename, creates the session if missing, and runs workmux add in a window rooted at that project path.

What does the --fork flag do in workmux worktrees?▼

The --fork flag copies the current conversation into the new worktree so the agent resumes with full context. The prompt is prepended with instructions preventing the forked agent from recursively dispatching more worktrees.

When should I not use the worktree dispatch approach?▼

Avoid it when the task needs immediate interactive exploration in the current session, since the dispatcher never reads or searches the codebase itself. It only writes prompts and creates worktrees, so ambiguous requests require clarification first.