skills/golem-powers/worktrees/SKILL.md
Create and manage git worktrees for isolated feature development. Prevents branch cross-contamination by giving each feature its own working directory with shared git history. Includes workflows for creating worktrees from scratch or from Linear issues, listing active worktrees, switching between them, and cleaning up completed ones. Use when starting a new feature that needs isolation from current work, running parallel implementations, or preventing uncommitted changes from leaking between tasks. Triggers on 'worktree', 'isolated branch', 'parallel feature', 'branch isolation', 'new worktree', 'feature isolation'. NOT for: simple branch switching (use git checkout), Linear-only operations (use linear), or temporary experiments (just use a branch).
npx skillsauth add etanhey/golems worktreesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create isolated working directories for each task. Worktrees share git history but have separate working files, preventing cross-contamination between branches.
| What you want to do | Workflow | |---------------------|----------| | Create new worktree from branch name | workflows/create.md | | Create worktree from Linear issue | workflows/from-linear.md | | List active worktrees | workflows/list.md | | Switch to a worktree | workflows/switch.md | | Clean up completed worktrees | workflows/cleanup.md |
Worktrees are created at: ~/worktrees/<repo>/<branch>
Example:
/Users/me/projects/my-app~/worktrees/my-app/feature-logingit worktree remove --force unless the user explicitly confirms that uncommitted work can be discarded.Worktrees automatically handle:
op inject if .env.template exists, else copies .env*.local from source| Condition | Action |
|-----------|--------|
| .env.template + op available | op inject -i .env.template -o .env.local |
| op inject fails | Fallback: copy from source repo |
| No .env.template | Copy all .env*.local from source |
# List all worktrees
git worktree list
# Create worktree with new branch
git worktree add ~/worktrees/$(basename "$PWD")/feature-name -b feature-name
# Parallel branches require separate worktrees. Do not multiplex one checkout.
git worktree add ~/worktrees/$(basename "$PWD")/feat-pr-loop-audit -b feat-pr-loop-audit
git worktree add ~/worktrees/$(basename "$PWD")/fix-commit-trailer -b fix-commit-trailer
# Check if branch is merged before removal. If not merged, stop.
BRANCH_NAME=feature-name
git branch --merged main | grep -Fxq "$BRANCH_NAME" || {
echo "STOP: '$BRANCH_NAME' is not merged into main. Do not remove this worktree."
exit 1
}
# Remove merged worktree
git worktree remove ~/worktrees/$(basename "$PWD")/$BRANCH_NAME
# Prune stale references
git worktree prune
"fatal: 'path' already exists"
"branch already exists"
-b flag: git worktree add <path> <existing-branch>"Cannot create worktree from detached HEAD"
git checkout main firstdevelopment
Create, edit, and verify golem-powers skills using the standard SKILL.md structure, workflow files, adapters, templates, and eval fixtures. Use for new skills, structural edits, workflows/adapters, and pre-deploy validation. NOT for invoking existing skills, superpowers skills, or skill-creator agent workflows.
testing
Extract structured knowledge from any video source — YouTube URLs or local screen recordings. YouTube → gems workflow (yt-dlp transcript → keyword hotspots → frame extract → brain_digest → structured gems). Screen recordings → QA workflow (reuses /qa-video stalker pipeline). Use when user shares a YouTube link wanting deep extraction with frames, shares a .mov/.mp4 for QA processing, says "extract from video", "video gems", "process this recording", or mentions gem extraction from video content.
testing
Use when running or reviewing any recurring monitor loop for merge queues, worker queues, collab tails, or agent completion. Enforces drive-to-completion ticks: every tick must query live state with `!`, classify whether real progress happened, and then dispatch, verify-and-decrement, or escalate-park. Triggers on: monitor loop, /loop, recurring tick, keep monitoring, silent autonomous, merge gate, blocked review, no-progress loop.
tools
MeHayom freelance client management — daily updates, decision tracking, time logging. Use when drafting Yuval updates, logging scope changes, tracking hours, or any MeHayom client communication. Triggers: 'draft Yuval update', 'client update', 'daily update', 'log decision', 'track time', 'mehayom'.