merge-branch

Installation
SKILL.md

This skill is invoked when the user wants to merge an issue branch into the current branch and clean up its worktree/branch. Helper scripts under <SKILL_DIR>/scripts/ handle plan and issue resolution; you handle the git commands and the user confirmation step. <SKILL_DIR> is the directory containing this SKILL.md.

Hard rules — never violate:

  • Never use --squash or --ff-only. Always git merge --no-ff.
  • Never push, rebase, reset, amend, skip hooks, or skip signing.
  • Never run git merge --abort without explicit user approval — conflicts are resolved in place when possible (see Step 4).
  • Never force-delete (git branch -D) or --force a worktree removal without explicit user approval.
  • Never delete the branch before removing its worktree — git branch -d refuses a branch that is checked out elsewhere.
  • Never take a raw branch name from the prompt — always resolve it from plans/<plan>/issues/index.json via the helper script.
  • Always ask the user for explicit approval before running the merge.
  • When resolving conflicts autonomously, never guess at semantic intent — if you cannot tell which side is correct from surrounding context, stop and surface the specific conflict to the user.
  1. Resolve the plan and issue.

    Run node <SKILL_DIR>/scripts/resolve-plan.mjs [--plan <name>]. Stdout = plan name. Exit 2 with a list = multiple plans; ask the user.

    The user's prompt should include the issue id (e.g. "merge branch 6"). If missing, ask. Then run node <SKILL_DIR>/scripts/resolve-issue.mjs --plan <plan> --id <id>. Stdout = JSON { id, slug, status, worktreePath }. The script normalises 6"006" and errors with available ids if no match. If slug equals the current branch, stop — can't merge into itself.

Related skills

More from rodrigooslp/skills

Installs
4
First Seen
3 days ago