worktree-dev

Launch per-worktree development servers in persistent tmux sessions.

Updated Jan 26, 2013
One-click install
npx skills add https://github.com/boxp/dotfiles --skill worktree-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-dev
Source: https://github.com/boxp/dotfiles/tree/main/.claude/skills/worktree-dev
Command: npx skills add https://github.com/boxp/dotfiles --skill worktree-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers increasingly work with per-feature git worktrees and need long-running development servers that survive branch switches. This Skill automates starting a development server inside a named tmux session bound to a specific worktree, enabling seamless background execution and easy log access.

Core Features & Use Cases

  • Per-worktree dev servers: Launch a development server in a dedicated tmux session tied to a worktree.
  • Deterministic session control: Use a configurable session ID, optional detach, and automatic cleanup after completion.
  • Simple session management: List, attach to, and monitor running sessions while switching contexts across worktrees or branches.
  • Use Case: Start a frontend server for feature/ui in its own worktree and keep it running while you work on other features, then reattach to verify logs.

Quick Start

Use gwq tmux run with a worktree pattern and a command, then verify with gwq tmux list and attach using gwq tmux attach <pattern>. Examples: gwq tmux run -w feature/ui "npm run dev" gwq tmux run -w feature/api "go run main.go" gwq tmux list gwq tmux attach feature/ui

Frequently Asked Questions about worktree-dev

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

FAQPage Schema
How do I run a dev server in a git worktree without it stopping when I switch branches?

To run a dev server in a git worktree without interruption, launch it inside a dedicated tmux session. This binds the long-running process to the specific worktree, keeping it alive in the background during branch switches.

What is the best way to manage multiple development servers across different git worktrees?

The best way to manage multiple development servers across git worktrees is using tmux session control. You can launch servers with specific worktree patterns, list active sessions, and attach to them to inspect logs seamlessly.

Can I start a background process in a specific worktree and reattach later to check logs?

Yes, you can start a background process in a specific worktree using a named tmux session. You can detach from the session immediately and reattach later to verify logs and monitor the running development server.

Do I need tmux to run long-running development servers tied to git worktrees?

Yes, tmux is required to run long-running development servers tied to git worktrees. It provides the persistent session environment necessary to maintain background execution and enable deterministic session control across worktrees.

How to clean up tmux sessions automatically after a worktree development server finishes?

To clean up tmux sessions automatically after a development server finishes, use tmux run commands with optional detach behavior. This enforces automatic cleanup of the session once the long-running process completes its execution.