worktrunk

Manage Git worktrees for parallel AI agent workflows with Worktrunk CLI. Use when: running multiple AI coding agents simultaneously on different branches, parallelizing feature development with AI, managing concurrent git worktrees.

26 stars

Best use case

worktrunk is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Manage Git worktrees for parallel AI agent workflows with Worktrunk CLI. Use when: running multiple AI coding agents simultaneously on different branches, parallelizing feature development with AI, managing concurrent git worktrees.

Teams using worktrunk should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/worktrunk/SKILL.md --create-dirs "https://raw.githubusercontent.com/TerminalSkills/skills/main/skills/worktrunk/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/worktrunk/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How worktrunk Compares

Feature / AgentworktrunkStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Manage Git worktrees for parallel AI agent workflows with Worktrunk CLI. Use when: running multiple AI coding agents simultaneously on different branches, parallelizing feature development with AI, managing concurrent git worktrees.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Worktrunk

## Overview

Worktrunk is a CLI for git worktree management, designed for running AI coding agents in parallel. AI agents like Claude Code and Codex can handle longer tasks without supervision, making it possible to manage 5-10+ agents simultaneously. Git worktrees give each agent its own working directory so they don't step on each other's changes.

The problem: git worktree UX is clunky — starting a new worktree requires typing the branch name three times. Worktrunk makes worktrees as easy as branches with three core commands.

## Instructions

### Installation

```bash
# From crates.io
cargo install worktrunk

# Or download pre-built binary from GitHub releases
# https://github.com/max-sixty/worktrunk/releases
```

### Core Commands

**Switch** — create or move to a worktree:

```bash
wt switch feat              # Switch to existing worktree
wt switch -c feat            # Create new worktree + switch
wt switch -c -x claude feat  # Create + launch Claude Code in it
wt switch -c -x "npm test" feat  # Create + run any command
```

**List** — show all worktrees with status:

```bash
wt list  # Shows branch names, paths, dirty status, ahead/behind
```

**Remove** — clean up worktree and branch:

```bash
wt remove        # Remove current worktree
wt remove feat   # Remove specific worktree
```

### Workflow Automation with Hooks

```toml
# .worktrunk.toml
[hooks]
on_create = "npm install"
pre_merge = "npm test"
post_merge = "git push origin main"
```

### Copy Build Caches

Avoid redundant dependency installs:

```toml
[create]
copy = ["node_modules", ".next", "dist"]
```

### Path Templates

```toml
[paths]
template = "../{repo}.{branch}"  # Default naming pattern
```

## Examples

### Example 1: Parallel Feature Development on a SaaS App

A developer needs to build three independent features for a Node.js SaaS application. They use Worktrunk to run three Claude Code agents in parallel:

```bash
cd ~/projects/saas-app

# Configure hooks for automatic setup
cat > .worktrunk.toml << 'EOF'
[hooks]
on_create = "npm install && npm run build"
pre_merge = "npm test && npm run lint"

[create]
copy = ["node_modules", ".next"]

[paths]
template = "../saas-app.{branch}"
EOF

# Create 3 worktrees, each launching Claude Code with a task
wt switch -c -x "claude --prompt 'Implement Stripe subscription billing with webhooks for plan upgrades/downgrades'" feat/billing
wt switch -c -x "claude --prompt 'Add role-based access control: admin, editor, viewer roles with middleware guards'" feat/rbac
wt switch -c -x "claude --prompt 'Build CSV/JSON export for analytics dashboard with date range filtering'" feat/export

# Monitor progress across all worktrees
wt list
# feat/billing    ../saas-app.feat/billing    [dirty, ahead 3]
# feat/rbac       ../saas-app.feat/rbac       [dirty, ahead 5]
# feat/export     ../saas-app.feat/export     [clean, ahead 2]

# Merge completed features (pre_merge hook runs tests automatically)
wt switch feat/export && wt merge
wt switch feat/rbac && wt merge
wt switch feat/billing && wt merge
```

### Example 2: Bug Fix Sprint with Multiple Agents

A team lead triages 4 bug reports and assigns each to a separate agent working in its own worktree:

```bash
cd ~/projects/api-server

# Spin up one worktree per bug
wt switch -c -x "claude --prompt 'Fix: POST /api/users returns 500 when email contains + character. Add input sanitization and test.'" fix/email-plus
wt switch -c -x "claude --prompt 'Fix: Rate limiter counts OPTIONS preflight requests. Exclude CORS preflight from rate limit middleware.'" fix/rate-limit-cors
wt switch -c -x "claude --prompt 'Fix: Pagination returns duplicate items when records are inserted during traversal. Use cursor-based pagination.'" fix/pagination-dupes
wt switch -c -x "claude --prompt 'Fix: WebSocket connections leak when clients disconnect without close frame. Add heartbeat and cleanup.'" fix/ws-leak

# Check which fixes are done
wt list

# Merge fixes one by one, running tests each time
wt switch fix/email-plus && wt merge
wt switch fix/rate-limit-cors && wt merge
wt switch fix/pagination-dupes && wt merge
wt switch fix/ws-leak && wt merge

# Push all fixes
git push origin main
```

## Guidelines

- Break work into independent, self-contained tasks to avoid merge conflicts
- Branch all worktrees from the same commit to minimize divergence
- Use `on_create` hooks to automatically install dependencies in new worktrees
- Configure `copy` for `node_modules` and build caches to speed up worktree creation
- Use `pre_merge` hooks to run tests before merging each feature
- Merge completed features promptly to keep the base branch fresh
- Clean up worktrees after merging with `wt remove` to keep your workspace tidy
- Run `wt list` regularly to monitor progress across all active agents
- See [worktrunk.dev](https://worktrunk.dev) and [GitHub](https://github.com/max-sixty/worktrunk) for full docs

Related Skills

zustand

26
from TerminalSkills/skills

You are an expert in Zustand, the small, fast, and scalable state management library for React. You help developers manage global state without boilerplate using Zustand's hook-based stores, selectors for performance, middleware (persist, devtools, immer), computed values, and async actions — replacing Redux complexity with a simple, un-opinionated API in under 1KB.

zoho

26
from TerminalSkills/skills

Integrate and automate Zoho products. Use when a user asks to work with Zoho CRM, Zoho Books, Zoho Desk, Zoho Projects, Zoho Mail, or Zoho Creator, build custom integrations via Zoho APIs, automate workflows with Deluge scripting, sync data between Zoho apps and external systems, manage leads and deals, automate invoicing, build custom Zoho Creator apps, set up webhooks, or manage Zoho organization settings. Covers Zoho CRM, Books, Desk, Projects, Creator, and cross-product integrations.

zod

26
from TerminalSkills/skills

You are an expert in Zod, the TypeScript-first schema declaration and validation library. You help developers define schemas that validate data at runtime AND infer TypeScript types at compile time — eliminating the need to write types and validators separately. Used for API input validation, form validation, environment variables, config files, and any data boundary.

zipkin

26
from TerminalSkills/skills

Deploy and configure Zipkin for distributed tracing and request flow visualization. Use when a user needs to set up trace collection, instrument Java/Spring or other services with Zipkin, analyze service dependencies, or configure storage backends for trace data.

zig

26
from TerminalSkills/skills

Expert guidance for Zig, the systems programming language focused on performance, safety, and readability. Helps developers write high-performance code with compile-time evaluation, seamless C interop, no hidden control flow, and no garbage collector. Zig is used for game engines, operating systems, networking, and as a C/C++ replacement.

zed

26
from TerminalSkills/skills

Expert guidance for Zed, the high-performance code editor built in Rust with native collaboration, AI integration, and GPU-accelerated rendering. Helps developers configure Zed, create custom extensions, set up collaborative editing sessions, and integrate AI assistants for productive coding.

zeabur

26
from TerminalSkills/skills

Expert guidance for Zeabur, the cloud deployment platform that auto-detects frameworks, builds and deploys applications with zero configuration, and provides managed services like databases and message queues. Helps developers deploy full-stack applications with automatic scaling and one-click marketplace services.

zapier

26
from TerminalSkills/skills

Automate workflows between apps with Zapier. Use when a user asks to connect apps without code, automate repetitive tasks, sync data between services, or build no-code integrations between SaaS tools.

zabbix

26
from TerminalSkills/skills

Configure Zabbix for enterprise infrastructure monitoring with templates, triggers, discovery rules, and dashboards. Use when a user needs to set up Zabbix server, configure host monitoring, create custom templates, define trigger expressions, or automate host discovery and registration.

yup

26
from TerminalSkills/skills

Validate data with Yup schemas. Use when adding form validation, defining API request schemas, validating configuration, or building type-safe validation pipelines in JavaScript/TypeScript.

yt-dlp

26
from TerminalSkills/skills

Download video and audio from YouTube and other platforms with yt-dlp. Use when a user asks to download YouTube videos, extract audio from videos, download playlists, get subtitles, download specific formats or qualities, batch download, archive channels, extract metadata, embed thumbnails, download from social media platforms (Twitter, Instagram, TikTok), or build media ingestion pipelines. Covers format selection, audio extraction, playlists, subtitles, metadata, and automation.

youtube-transcription

26
from TerminalSkills/skills

Transcribe YouTube videos to text using OpenAI Whisper and yt-dlp. Use when the user wants to get a transcript from a YouTube video, generate subtitles, convert video speech to text, create SRT/VTT captions, or extract spoken content from YouTube URLs.