Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Resolve Git merge, rebase, or cherry-pick conflicts by preserving intent from both sides. Use when unmerged paths or conflict markers are present, especially when you must inspect the PR title and description tied to conflicting commits before choosing a resolution.
.claude/skills/saffron-health-fix-merge-conflicts/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-16 | ✗→✓ | ▲ Improved | 31% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 22% | 0% |
| case-07 | ✓→✗ | ▼ Worse | 8% | 0% |
| case-18 | ✓→✗ | ▼ Worse | -15% | 0% |
| case-24 | ✓→✗ | ▼ Worse | -36% | 0% |
Resolve conflicts by intent, not by line order.
origin/main.If there are no active unmerged paths, proactively merge latest origin/main to surface conflicts:
bashgit status --porcelain git diff --name-only --diff-filter=U
Decision rule:
git diff --name-only --diff-filter=U returns files, skip auto-merge and continue to conflict analysis.bashgit fetch origin git merge origin/main
Then re-check:
bashgit diff --name-only --diff-filter=U
Run:
bashgit status --porcelain git diff --name-only --diff-filter=U git log --left-right --merge --oneline
Use git log --left-right --merge as the starting set of commits that influenced the conflicted hunks.
Prefer GitHub metadata when available.
origin.bashgh api graphql \ -f query='query($owner:String!,$repo:String!,$sha:GitObjectID!){repository(owner:$owner,name:$repo){object(oid:$sha){... on Commit{associatedPullRequests(first:5){nodes{number title body url mergedAt baseRefName headRefName}}}}}}' \ -F owner=OWNER -F repo=REPO -F sha=COMMIT_SHA
If no associated PR is found, fall back to git show --stat COMMIT_SHA and commit message context.
For each relevant PR, capture:
Write a short intent summary per side before editing code.
Before finalizing any hunk where intents conflict, notify the user and ask for direction.
Treat these as divergence signals:
When divergence is detected:
Question format:
textIntent divergence detected in <file>:<hunk>. Option A (PR #X): <one-line intent> Option B (PR #Y): <one-line intent> Which intent should be primary for this hunk?
If the user chooses one side, preserve that side and salvage any non-conflicting behavior from the other side. If the user requests a hybrid, restate the hybrid rule before applying edits.
For each conflict hunk:
Avoid resolving by "take ours/theirs" unless the PR intent proves one side is obsolete.
Run focused checks that cover touched behavior. In this repository, prefer:
bashpnpm --filter libretto-cli type-check pnpm --filter libretto-cli test -- <relevant-test-file>
Run broader checks when conflict scope is wide.
Provide a concise summary:
If intent is ambiguous after reading PR metadata, ask one specific question before finalizing.
Other measured skills in the registry, with their headline benchmark lift.