worktrees

Orchestrates Git worktrees as isolated coding lanes for parallel and risky development work.

Updated Feb 25, 2026
One-click install
npx skills add https://github.com/voiddreamz/dotfiles --skill worktrees-voiddreamz
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: worktrees
Source: https://github.com/voiddreamz/dotfiles/tree/main/.config/opencode/skills/worktrees
Command: npx skills add https://github.com/voiddreamz/dotfiles --skill worktrees-voiddreamz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing parallel branches, risky refactors, or background agent work in a single Git checkout leads to context switching, half-committed states, and broken working environments. This Skill provides a safe, structured protocol for creating and managing Git worktrees as isolated coding lanes. ## Core Features & Use Cases - Isolated Lane Creation: Creates worktrees under .slim/worktrees/<slug>/ with branch naming conventions and a JSON manifest (.slim/worktrees.json) for tracking lane state. - Safety Guardrails: Enforces pre-flight checks, mandatory user confirmation before destructive Git operations, and managed .gitignore/.ignore blocks for lane artifacts. - Full Lifecycle Workflow: Covers planning, delegation to sub-agents, diff-based integration review, and cleanup/pruning of finished lanes. - Use Case: You need to refactor an authentication flow while keeping your main checkout stable. The Orchestrator creates a worktree lane, delegates edits to sub-agents inside it, validates the diff against the base branch, and merges only after your approval. ## Quick Start Ask the AI to create a new worktree lane for your feature, for example: set up an isolated worktree for the auth refactor based on the main branch.

Frequently Asked Questions about worktrees

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

FAQPage Schema
How do I create a Git worktree for parallel development?▼

Run git worktree add -b <branch> .slim/worktrees/<slug> <base> after confirming the repository state and branch name availability. This Skill automates the pre-flight checks, ignore file setup, and manifest registration around that command.

When should I use Git worktrees instead of branches?▼

Use worktrees for risky refactors, parallel tasks, background agents, or exploratory spikes that would disrupt your active checkout. Avoid them for simple single-file changes, documentation updates, or minor bug fixes.

Can multiple AI agents work in separate worktrees at once?▼

Yes. Each sub-agent runs with its working directory set to its own worktree path, keeping builds and edits isolated. File ownership should be tracked per lane to avoid merge conflicts between parallel agents.

Does this workflow delete branches or worktrees automatically?▼

No. Worktree removal, branch deletion, merges, rebases, and any destructive Git command require explicit user confirmation for that exact operation before execution.

Why does git worktree add fail with branch or path conflicts?▼

Failures occur when the branch already exists locally or on remote, or the target path is already registered. Inspect git worktree list and existing branches before creating a lane to avoid these conflicts.