ralph-merge-worktrees

Installation
SKILL.md

Ralph Merge Worktrees

Analyze completed Ralph worktree PRDs, build a dependency-aware merge queue, and sequentially squash-merge each branch into main — removing the worktree after each successful merge.

Overview

Ralph worktrees live at .claude/worktrees/ralph/<feature>/ with PRDs at scripts/ralph/prd.json inside each worktree. A worktree is "completed" when every user story in its PRD has passes: true. This skill finds all completed worktrees, determines the safest merge order, presents the plan for approval, and then executes it one branch at a time.

Step 1: Scan and Identify Completed Worktrees

Read every .claude/worktrees/ralph/*/scripts/ralph/prd.json file. For each PRD:

  1. Parse the JSON — extract branchName, description, and userStories[]
  2. A worktree is completed when ALL stories have passes: true
  3. Skip any worktree whose PRD has at least one story with passes: false
  4. Also skip worktrees that don't have a prd.json (malformed or empty)

If no completed worktrees are found, tell the user and stop.

Installs
28
First Seen
Mar 6, 2026
ralph-merge-worktrees — ralphcrisostomo/nuxt-development-skills