From dm-work
Use when creating a worktree, setting up a worktree, starting feature work that needs isolation, or before executing implementation plans. Covers git worktree creation under .worktrees/, gitignore setup, beads integration, and merge guardrails.
npx claudepluginhub rbergman/dark-matter-marketplace --plugin dm-workThis skill uses the workspace's default tool permissions.
Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
Primary tool: bd worktree — handles git worktree + beads integration automatically.
/merge when ready to integrate — it enforces the pre-flight checklist.Before creating any worktrees, ensure .worktrees/ is in .gitignore. This is a one-time setup that covers all future worktrees:
# Check if .worktrees/ is already ignored
git check-ignore -q .worktrees/ || echo '.worktrees/' >> .gitignore
If you added the line, commit it:
git add .gitignore && git commit -m "Ignore .worktrees/ directory"
Why this matters: Without this, beads adds each worktree individually to .gitignore, creating noise. With .worktrees/ ignored, all worktrees underneath are automatically covered.
All worktrees go under .worktrees/ in the repo root. This is the standard location.
bd worktree create .worktrees/feature-auth
What it does automatically:
.beads/redirect pointing to main repo's databaseWith custom branch name:
bd worktree create .worktrees/bugfix --branch fix-123
CLAUDE.local.md only exists in one worktree. To share personal preferences across all worktrees, use a home-directory import in each worktree's CLAUDE.local.md:
# CLAUDE.local.md
@~/.claude/my-project-instructions.md
This way all worktrees load the same personal preferences from a single source. The @~/... import syntax resolves to your home directory regardless of which worktree you're in.
cd .worktrees/feature-auth
# Node.js
[ -f package.json ] && npm install
# Rust
[ -f Cargo.toml ] && cargo build
# Go
[ -f go.mod ] && go mod download
npm test # or cargo test, go test ./...
If tests fail: Report failures, ask whether to proceed.
bd ready # Should show same beads as main workspace
bd worktree list
Or standard git:
git worktree list
Use bd worktree remove — includes safety checks:
bd worktree remove feature-auth
Safety checks (automatic):
Skip checks (not recommended):
bd worktree remove feature-auth --force
Check current worktree status:
bd worktree info
| Task | Command |
|---|---|
| Ensure .worktrees/ ignored | git check-ignore -q .worktrees/ || echo '.worktrees/' >> .gitignore |
| Create worktree | bd worktree create .worktrees/<name> |
| Create with branch | bd worktree create .worktrees/<name> --branch <branch> |
| List worktrees | bd worktree list |
| Remove worktree | bd worktree remove .worktrees/<name> |
| Check status | bd worktree info |
| Verify beads sync | bd ready (in worktree) |
| Manual git worktree | bd worktree |
|---|---|
| Separate commands for git + beads | Single command |
| No beads redirect setup | Automatic redirect to main DB |
| No safety checks on remove | Checks for uncommitted/unpushed |
# One-time: ensure .worktrees/ is ignored
git check-ignore -q .worktrees/ || echo '.worktrees/' >> .gitignore
# Create isolated workspace
bd worktree create .worktrees/feature-auth
# Enter and setup
cd .worktrees/feature-auth
npm install
npm test # ✓ 47 passing
# Verify beads shared
bd ready # Shows same issues as main
# Work on feature...
bd claim auth-001
# When done
cd ../..
bd worktree remove .worktrees/feature-auth
Worktrees created with bd worktree create share the main repo's Dolt database via .beads/redirect. This is the correct behavior — all worktrees see the same beads data.
If a worktree was created with git worktree add instead, it gets an independent empty Dolt DB. Fix by deleting the worktree's .beads/dolt/ and creating a .beads/redirect file pointing to the main repo's .beads/.
If beads isn't installed, use manual git worktree:
# Verify ignored
git check-ignore -q .worktrees/ || echo '.worktrees/' >> .gitignore
# Create
git worktree add .worktrees/feature-auth -b feature-auth
# Remove
git worktree remove .worktrees/feature-auth
But you lose: automatic redirect setup and safety checks.