Files
skills/docs/engineering/resolving-merge-conflicts.md
Matt Pocock 3314257466 docs: drop the Quickstart block from all 25 pages
aihero.dev renders an install widget above every skill page. Each page
then repeated the same commands in its body, and the two copies had
drifted: the widget uses the current `npx skills@latest ...` wording
while the hand-written blocks mostly carried the older bare `npx skills
...`. Pages showed the right command and a stale one together.

Delete the block from all 25 pages and record the rule in
.agents/writing-docs.md: install wording belongs to the site, not the
page. The template no longer carries a Quickstart, and
.agents/install-block.md notes that docs pages are not one of its
consumers.
2026-08-05 11:22:19 +01:00

2.5 KiB

Source

What it does

resolving-merge-conflicts works through an in-progress git merge or rebase conflict, hunk by hunk, and finishes the operation — resolved, checked, and committed.

It resolves by intent, not by text. Before touching a hunk it traces each side back to its primary source — the commit message, the PR, the original issue — to understand why the change was made, then preserves both intents where they're compatible. It never invents new behaviour to paper over a clash, and it never reaches for --abort: the merge always gets finished.

When to reach for it

Type /resolving-merge-conflicts, or the agent reaches for it automatically when a task fits.

Reach for this when you're mid-merge or mid-rebase and git has stopped on conflicts it can't resolve itself. It's for the conflict in front of you — not for planning the merge or for debugging behaviour that broke afterwards. If the merge is done but something's now failing for reasons you can't see, use diagnosing-bugs instead.

Resolving by intent

The trap in a conflict is treating it as a text problem — picking "ours" or "theirs" to make the markers go away. This skill treats it as an intent problem. Each side of a hunk exists because someone wanted something; the resolution has to honour both wants where it can, and where they're genuinely incompatible, pick the one that matches the merge's stated goal and note the trade-off out loud.

That's why the primary sources matter. You can't preserve an intent you haven't read, so the work starts in the history — commits, PRs, tickets — not in the diff.

It's working if

  • Each resolved hunk keeps both sides' behaviour, or names the trade-off where it couldn't.
  • No new behaviour appears that wasn't on either branch.
  • The project's own checks — typecheck, tests, format — are found and run green before the commit.
  • The merge or rebase is carried all the way to a finished commit, never aborted.

Where it fits

A reach-for-it-anytime standalone: you invoke it at the moment a merge or rebase stalls, and it hands you back a clean, committed tree. Its natural neighbour is diagnosing-bugs, because a merge that resolves cleanly but misbehaves afterwards is a diagnosis problem, not a conflict one. When you're unsure which skill fits, ask-matt routes you.