worktrunk-worktrees

Manages git worktrees using Worktrunk commands for branch creation, switching, merging, and cleanup.

Updated May 18, 2026
One-click install
npx skills add https://github.com/blalor/pi-dot-dev --skill worktrunk-worktrees-blalor
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: worktrunk-worktrees
Source: https://github.com/blalor/pi-dot-dev/tree/main/agent/skills/worktrunk-worktrees
Command: npx skills add https://github.com/blalor/pi-dot-dev --skill worktrunk-worktrees-blalor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing git worktrees with raw git worktree commands is error-prone and inconsistent, especially in agent workflows where parallel branches, status tracking, and cleanup rules matter. This Skill standardizes worktree operations through Worktrunk (wt), ensuring branches are created in configured locations, hooks run correctly, and removal follows branch-deletion rules. ## Core Features & Use Cases - Worktree Lifecycle Management: Create, switch, list, merge, and remove worktrees using wt switch, wt list, wt merge, and wt remove instead of raw Git commands. - Agent Workflow Guidance: Provides a step-by-step pattern for isolated task branches, including status reporting via Worktrunk markers and safe cleanup practices. - Fallback Handling: Defines when raw git worktree is acceptable (diagnosis, Worktrunk unavailable) and requires stating the reason when deviating. - Use Case: An agent needs to fix a bug on an isolated branch. It runs wt list to inspect state, creates the branch with wt switch --create fix-login --base ^, works in the Worktrunk-managed path, and later integrates with wt merge or cleans up with wt remove. ## Quick Start Ask the agent to create a new worktree branch for your task using Worktrunk, for example by saying "create a worktree for the login fix branch with wt".

Frequently Asked Questions about worktrunk-worktrees

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

FAQPage Schema
How do I create a git worktree with Worktrunk?▼

Use `wt switch --create <branch-name>` to create a new branch and worktree in one step. Add `--base <branch>` to start from a specific base, such as `wt switch --create fix-login --base ^` where `^` means the default branch.

What is the difference between wt and git worktree?▼

Worktrunk wraps git worktree with configured paths, hooks, branch-deletion rules, and status markers, while raw git worktree requires manual path management. Prefer `wt` commands for normal workflows and reserve raw Git for low-level diagnosis.

How do I remove a worktree without deleting the branch?▼

Run `wt remove --no-delete-branch <branch-name>` to remove the worktree while keeping the branch. Plain `wt remove` deletes both the worktree and its branch according to Worktrunk's cleanup rules.

When should I use raw git worktree instead of wt?▼

Use raw git worktree only when diagnosing low-level Git metadata problems, when Worktrunk is unavailable or errors block the task, or when a script needs Git's raw porcelain output. State the reason briefly when deviating from wt.

What does wt merge do to my branch?▼

The `wt merge` command merges the current branch into a target branch, defaulting to the repository default branch. Depending on configuration it may squash, rebase, run hooks, fast-forward the target, and remove the worktree, so avoid running it casually.