worktrees

Create isolated git worktrees under .worktrees/ for parallel feature development.

11|5|Updated Jan 9, 2026
One-click install
npx skills add https://github.com/rbergman/dark-matter-marketplace --skill worktrees-rbergman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktrees
Source: https://github.com/rbergman/dark-matter-marketplace/tree/main/plugins/workflow/skills/worktrees
Command: npx skills add https://github.com/rbergman/dark-matter-marketplace --skill worktrees-rbergman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktrees create isolated workspaces sharing the same repository, enabling parallel feature development without disrupting the main workspace or switching contexts.

Core Features & Use Cases

  • Create isolated workspaces under .worktrees/ to keep feature work separate from mainline.
  • Automatically connect to beads via the main BD workflow for synchronized state.
  • Quick verification and removal of worktrees to maintain repo hygiene.

Quick Start

Use the workflow to set up isolated worktrees quickly:

  • Ensure .worktrees/ is ignored in .gitignore: git check-ignore -q .worktrees/ || echo '.worktrees/' >> .gitignore
  • Commit the ignore rule: git add .gitignore && git commit -m "Ignore .worktrees/ directory"
  • Create a worktree: bd worktree create .worktrees/feature-auth
  • Enter and set up: cd .worktrees/feature-auth
  • Verify beads sync: bd ready
  • Remove when done: bd worktree remove .worktrees/feature-auth

Frequently Asked Questions about worktrees

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

FAQPage Schema
How do I use git worktrees to isolate feature work without affecting the main workspace?

Git worktrees create isolated workspaces sharing the same repository, allowing parallel feature development. You can create a worktree under the .worktrees/ directory to sandbox changes without disrupting the mainline workspace or switching contexts.

What is the best way to manage multiple git worktrees for parallel experimentation?

Managing git worktrees involves creating isolated directories under .worktrees/ and using safety checks for creating, listing, or removing them. This approach keeps feature work separate from mainline while maintaining repo hygiene through quick verification and removal.

Does the bd worktree workflow integrate with beads for synchronized state management?

Yes, the bd worktree workflow automatically connects to beads via the main BD workflow. After creating a worktree, you can verify beads synchronization by running 'bd ready' within the isolated workspace directory.

How do I set up and remove a git worktree step by step?

To set up a git worktree, first ensure .worktrees/ is in .gitignore, commit the rule, then run 'bd worktree create .worktrees/feature-name'. When done, remove it using 'bd worktree remove .worktrees/feature-name' to maintain repository hygiene.

Why do I need to ignore the .worktrees/ directory in .gitignore before creating worktrees?

Ignoring the .worktrees/ directory in .gitignore prevents git from tracking the isolated worktree files in your main repository. This keeps the mainline workspace clean and avoids conflicts when sandboxing feature work across parallel branches.

When should I not use git worktrees for workspace isolation?

You should not use git worktrees if your development workflow does not require parallel experimentation or safe separation of changes across branches. Worktrees are designed for deterministic setup scenarios where isolated feature work is necessary without disrupting the main workspace.