resolve-merge-conflict

resolve-merge-conflict is a skill for Claude Code, Codex from tmj-90/gaffer. It costs 107 tokens per session (1,557 once invoked), scanned A, original, Apache-2.0.

A procedure for reconciling conflicting changes when an approved code branch cannot be merged automatically with the default branch.

In plain words
What is it for?
Inspect both branches, understand why they conflict, edit the delivery branch to combine the changes, and prepare it for re-review.
Why use it?
It helps preserve the intent of both sets of changes so the result can be reviewed safely before merging.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Inspect both branches, understand why they conflict, edit the delivery branch to combine the changes, and prepare it for re-review.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tmj-90/gaffer/resolve-merge-conflict
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add tmj-90/gaffer --skill resolve-merge-conflict
Clone the repo
git clone --depth 1 https://github.com/tmj-90/gaffer

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for resolve-merge-conflict

README.md
[![agentmods](https://agentmods.dev/badge/skills/tmj-90/gaffer/resolve-merge-conflict/github.svg)](https://agentmods.dev/skills/tmj-90/gaffer/resolve-merge-conflict)
Your own site
<a href="https://agentmods.dev/skills/tmj-90/gaffer/resolve-merge-conflict"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/resolve-merge-conflict/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for resolve-merge-conflict

Your own site · 80×15
<a href="https://agentmods.dev/skills/tmj-90/gaffer/resolve-merge-conflict"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/resolve-merge-conflict.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,557 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00107 $0.01557
Opus 5.5 $0.00043 $0.00623
Sonnet 5.5 $0.00021 $0.00311
Haiku 4.5 $0.00011 $0.00156

Measured 27d ago against content hash 0aaf09855854, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

resolve-merge-conflict scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 27d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

runner/skills/resolve-merge-conflict/SKILL.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Resolve a merge conflict (preserve both intents, branch-only)

An approved delivery branch (gaffer/…) conflicts with the default branch: work landed there after this branch forked, and the edits collide. You run headless in a throwaway worktree with the delivery branch checked out. Your job is to reconcile both sides honestly ON THE BRANCH. Afterwards the runner reopens the ticket for re-review, a human re-approves the resolved diff, and a later merge lands it.

How the runner uses your output: the text of your final message becomes the resolution summary the re-reviewer reads. You get one pass: if the branch conflicts again, it goes to a human.

Steps

  1. Understand both sides before touching anything.
    • This branch: git log --oneline <default>..HEAD and git diff <default>...HEAD.
    • What landed since the fork: git log --oneline HEAD..<default> and git diff HEAD...<default>.
    • The ticket's ACs via get_ticket: they define what this branch must still do.
  2. Merge the default branch INTO the branch, showing the base. git -c merge.conflictStyle=zdiff3 merge <default> — the local <default> ref; do not fetch (on git older than 2.35 use diff3). zdiff3 shows the common ancestor between ||||||| and =======, which tells you what each side actually changed. List the conflicts with git diff --name-only --diff-filter=U.
  3. Resolve each hunk by intent. For every conflicted file:
    • Read base, ours and theirs (git show :1:<path>, :2:<path>, :3:<path>) and the commits that touched it on either side (git log --merge -p -- <path>).
    • Write the edit that keeps BOTH behaviours: both new imports, both new cases, the renamed function called with the new argument, and so on.
    • Take one side wholesale (git checkout --ours|--theirs <path>) only when the other side's change is provably subsumed; say so in the summary.
    • If the two intents are genuinely incompatible, keep what this ticket's ACs require, adapt the other side's behaviour as far as possible, and name exactly what was set aside.
    • Generated files (lockfiles, snapshots, compiled output) are regenerated with their tool, never hand-merged. If that tool is an install the safety hook blocks, stop (see below).
    • Stage each file once it is resolved (git add <path>). Never git add -A or git add .: the runner's .claude/ wiring in this worktree is untracked and must never be committed.
  4. Hunt semantic conflicts — the ones git did not flag. For every symbol that either side renamed, removed or changed the signature of, grep the merged tree for callers from the other side. Check that the other side's new code still satisfies this ticket's invariants (validation, locking, error handling).
  5. Verify the tree. No markers remain: git diff --check and git grep -nE '^(<<<<<<<|>>>>>>>|\|\|\|\|\|\|\|)( |$)' both print nothing; git diff --name-only --diff-filter=U is empty.
  6. Run the repo's tests (the run-tests skill) and lint (the run-lint skill). A failure after a merge usually means the intents really clash: fix the reconciliation, never the test. If tests cannot run in this worktree (for example, dependencies are not installed here and installs are hook-blocked), do not claim a pass: say "tests not run: " in the summary.
  7. Commit the merge on the branch: git commit --no-edit (a normal two-parent merge commit). Confirm with git merge-base --is-ancestor <default> HEAD (exit 0) and git status --porcelain --untracked-files=no (clean).
  8. Print the summary. 3–6 lines: which files conflicted, how each side was preserved, anything set aside and why, semantic checks done, test result. Put it as the last thing in your final message — that text is what the runner records and forwards. Do not call record_ac_evidence or mark_ticket_blocked: you hold no claim and the ticket is ready_for_merge, so both are refused.

Read the full file on GitHub · 101 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 27d ago Changed · +23 lines 0aaf09855854
  2. 1mo ago First seen · 78 lines · 107 tokens per session scan A fb8675dda4d0

Subscribe to this mod's changes

resolve-merge-conflict is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 28d ago), licensed Apache-2.0. It adds 107 tokens to every session and 1,557 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.