worktrunk
Worktrunk is a CLI that streamlines git worktree management, making it as straightforward as branching. Launch multiple AI agents in parallel across isolated branches, each with its own environment, and automate setup through hooks for dev servers, databases, and dependencies. Features include LLM-generated commit messages, Claude Code integration, and Zellij support for seamless agent handoffs.
Worktrunk lets you run multiple AI agents in parallel across isolated git branches with simplified worktree management.
AI-generated summary based on this skill's SKILL.md
Install
jjmartres/opencode/worktrunk · repository language: Python
git clone https://github.com/jjmartres/opencode
cp -r opencode/opencode/skills/worktrunk ~/.claude/skills/worktrunkFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I use worktrunk to run multiple AI agents in parallel?
Worktrunk enables parallel AI agent execution by creating isolated git worktrees for each agent session. Each worktree operates on its own branch with a dedicated environment, preventing conflicts. Launch agents simultaneously across these isolated branches, and worktrunk manages their lifecycle—setup, execution, and cleanup—through automated hooks and deterministic port allocation via hash-based addressing.
What are the main worktrunk CLI commands?
Worktrunk provides streamlined commands: `wt switch` creates and switches to feature branches, `wt list` shows worktree status, `wt step commit` generates LLM commit messages from staged changes, and `wt remove` cleans up worktrees. These commands make git worktree management as easy as git branch operations, with simplified syntax replacing verbose git worktree calls.
How do I set up wt hooks for dev server and database automation?
Worktrunk supports lifecycle hooks (post-create, pre-merge) configured in wt.toml. Define post-create hooks to auto-start dev servers or run database migrations per worktree. Pre-merge hooks handle cleanup. This automation eliminates cold starts and ensures each worktree has its own isolated environment with deterministic port allocation, enabling seamless parallel development.
Can worktrunk integrate with Claude Code and generate commit messages?
Yes. Worktrunk integrates with Claude Code for worktree-aware agent sessions and activity tracking. Use `wt step commit` to generate LLM commit messages directly from staged changes. The Claude Code plugin leverages worktrunk's branch isolation and environment management, enabling agents to work autonomously within their worktree context with automatic commit generation.
What is the wt merge and cleanup workflow?
Worktrunk's merge workflow integrates pre-merge hooks to run cleanup tasks before integration. After merging changes back to main, use `wt remove` to clean up the worktree. This ensures deterministic teardown of isolated environments, port releases, and database cleanup. The workflow maintains repository hygiene while preserving agent session history and commit integrity.
Does worktrunk support Zellij integration for agent handoffs?
Yes. Worktrunk integrates with Zellij to enable seamless agent handoffs across worktree sessions. This allows agents to coordinate work across isolated branches within a unified terminal multiplexer, improving visibility and control over parallel AI agent execution while maintaining environment isolation per worktree.
SKILL.md
rendered from the published skill — quoted content, verbatim
Worktrunk Skill
Worktrunk (wt) is a CLI for git worktree management designed to run AI agents
(like Claude Code) in parallel across isolated branches. Think of it as making
git worktree as easy as git branch.
Quick Reference
| Task | Command |
|---|---|
| Create worktree + switch | wt switch --create feat |
| Create worktree + launch Claude | wt switch --create feat -x claude |
| List all |
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 3 files
opencode/skills/worktrunk/SKILL.md
opencode/skills/worktrunk/references/commands.md
opencode/skills/worktrunk/references/hooks.md