一键导入
domerge
Retry a deferred worktree merge — used when compact-prep's merge couldn't complete
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Retry a deferred worktree merge — used when compact-prep's merge couldn't complete
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Recover context from a dead or exhausted session
Resolve PR review comments in parallel
Check plugin version status — source vs installed vs release
Enhance plans with parallel research agents
Execute work plans using subagent dispatch
Manage session worktrees — resume, cleanup, rename, switch, create
基于 SOC 职业分类
| name | do:merge |
| description | Retry a deferred worktree merge — used when compact-prep's merge couldn't complete |
| argument-hint | [branch-name (optional)] |
Merge an unmerged session worktree branch into main. Used when compact-prep's merge step couldn't complete (dirty main, retry exhaustion, user aborted conflict resolution).
<branch_name> #$ARGUMENTS </branch_name>
Run git worktree list and filter for entries whose path contains .worktrees/session- (session worktrees use the session- prefix). For each session worktree, check if its branch has unmerged commits:
git worktree list
# Filter output: only lines containing .worktrees/session-
# For each matching worktree, extract branch name and check:
git log main..<branch> --oneline | head -1
Worktrees whose branch has unmerged commits (non-empty git log output) are candidates.
<name> into main."Verify CWD is the main repo (not inside a worktree). If inside a worktree, warn: "Cannot merge from inside a worktree. Exit the worktree first." Stop.
To check: git rev-parse --show-toplevel should NOT contain .worktrees/session-.
Extract the session worktree name from the branch. For session worktrees, the branch name
IS the worktree name (e.g., branch session-hb4a = worktree .worktrees/session-hb4a).
Store this for metadata cleanup in Step 5.
Capture the Claude PID for concurrent-session safety, then run the merge:
# In a separate Bash call first:
echo $PPID
# Read the output as <claude-pid>
CALLER_PID=<claude-pid> bash ${CLAUDE_SKILL_DIR}/../../scripts/session-merge.sh <branch>
Replace <branch> with the selected branch name from Step 2 and <claude-pid> with the PID captured above.
git add . then git commit --no-edit to finalize the merge.
Then clean up session metadata:
rm -rf .worktrees/.metadata/<session-name> (where <session-name> is from Step 4).
If aborted: git merge --abort and announce "Worktree preserved. Run /do:merge to retry."
Skip metadata cleanup — the worktree still exists and may be resumed./do:merge again."--skip-overlap: CALLER_PID=<claude-pid> bash ${CLAUDE_SKILL_DIR}/../../scripts/session-merge.sh <branch> --skip-overlap
(lets git attempt the merge; may still result in conflicts handled by exit 2)