merge-conflict-surgeon

merge-conflict-surgeon is a skill for Claude Code from latestaiagents/agent-skills. It costs 71 tokens per session (1,033 once invoked), scanned A, original, MIT.

A guide for resolving Git merge conflicts, which happen when different branches change the same part of a file in incompatible ways. It helps compare both versions and choose the correct result.

In plain words
What is it for?
Use it after a merge or rebase reports conflicts, when files show conflict markers, or when Git reports that both branches modified a file.
Why use it?
It provides a careful way to understand conflicting changes before editing files, reducing accidental loss of work.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the developer-toolkit plugin — 19 skills shipped together

Good fit Use it after a merge or rebase reports conflicts, when files show conflict markers, or when Git reports that both branches modified a file.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/latestaiagents/agent-skills/merge-conflict-surgeon
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 latestaiagents/agent-skills --skill merge-conflict-surgeon
Clone the repo
git clone --depth 1 https://github.com/latestaiagents/agent-skills

Made for: Claude Code.

Or install developer-toolkit, the plugin that ships this one along with the rest of its 19 skills.

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 merge-conflict-surgeon

README.md
[![agentmods](https://agentmods.dev/badge/skills/latestaiagents/agent-skills/merge-conflict-surgeon/github.svg)](https://agentmods.dev/skills/latestaiagents/agent-skills/merge-conflict-surgeon)
Your own site
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/merge-conflict-surgeon"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/merge-conflict-surgeon/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 merge-conflict-surgeon

Your own site · 80×15
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/merge-conflict-surgeon"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/merge-conflict-surgeon.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,033 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.00071 $0.01033
Opus 5 $0.00036 $0.00517
Sonnet 5 $0.00014 $0.00207
Haiku 4.5 $0.00007 $0.00103

Measured 12d ago against content hash 479cd09343d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

merge-conflict-surgeon 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 12d 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.

plugins/developer-toolkit/skills/git/merge-conflict-surgeon/SKILL.md · 165 lines

How it starts

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

Merge Conflict Surgeon

Resolve Git merge conflicts systematically and safely.

When to Use

  • git merge or git rebase fails with conflicts
  • You see conflict markers (<<<<<<<, =======, >>>>>>>) in files
  • git status shows "both modified" files
  • Merging feature branches into main/develop
  • Rebasing a branch onto updated main

Workflow

Step 1: Assess the Damage

# See all conflicted files
git status

# See the full diff of conflicts
git diff --name-only --diff-filter=U

List all conflicted files and categorize them:

  • Simple conflicts: Same file, different lines (auto-resolvable logic)
  • Overlap conflicts: Same lines modified differently (needs human decision)
  • Delete/modify conflicts: One side deleted, other modified

Step 2: Understand Both Sides

For each conflicted file, understand:

# See what YOUR branch changed
git diff HEAD~1 -- <file>

# See what the OTHER branch changed
git diff MERGE_HEAD~1 -- <file>

# See common ancestor
git show :1:<file>  # Base version
git show :2:<file>  # Ours (current branch)
git show :3:<file>  # Theirs (merging branch)

Step 3: Resolve Strategically

For simple conflicts (different functionality):

  • Keep both changes, ensure they don't break each other
  • Run the code mentally or actually to verify

For overlapping conflicts (same code, different changes):

  1. Understand the INTENT of each change
  2. Determine which achieves the goal better
  3. Sometimes combine logic from both
  4. Never blindly pick "ours" or "theirs"

For delete/modify conflicts:

  • If deleted intentionally (refactoring), ensure the modification isn't needed
  • If deleted accidentally, restore and apply modification

Step 4: Validate Resolution

# Mark as resolved
git add <resolved-file>

# Verify no remaining conflicts
git diff --check

# Run tests before completing
npm test  # or your test command

# Complete the merge
git commit  # or git rebase --continue

Resolution Patterns

Read the full file on GitHub · 165 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. 12d ago First seen · 165 lines · 71 tokens per session scan A 479cd09343d1

Subscribe to this mod's changes

merge-conflict-surgeon is a skill published in the GitHub repository latestaiagents/agent-skills (5 stars, last pushed 5mo ago), licensed MIT. It adds 71 tokens to every session and 1,033 once invoked, about $0.0004 per session on Opus 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.

Related

Other skills, from other repositories

git-flow-master

End-to-end Git operator for any branching strategy. Auto-detects the project's strategy (solo-main, main+integration, enterprise multi-branch, trunk-based, GitFlow, GitHub Flow, GitLab Flow, SDET integration-trunk for chained test-automation suites) from .git config, branches, and the gitstrategy: block in…

upex-galaxy/agentic-qa-boilerplate · 502 tokens

version-bump

Version the Team plugin at land time (DEV-internal, not distributed): decide the SemVer level, compute the next free version against current main, update all six version strings, cut the [Unreleased] changelog body into a dated [X.Y.Z] section, run the land-time consistency assertion, and commit chore(version): X.Y.Z.…

bostonaholic/team · 207 tokens

vigilante-issue-implementation-on-monorepo

Implement a GitHub issue end-to-end when Vigilante dispatches work for a watched monorepo. Use the provided worktree, respect repository instructions, comment on the issue as work progresses, and report failures back to GitHub.

aliengiraffe/vigilante · 59 tokens

vigilante-issue-implementation-on-ruby

Implement a GitHub issue end-to-end when Vigilante dispatches work for a Ruby repository with Bundler, test, lint, and security guidance.

aliengiraffe/vigilante · 41 tokens

vigilante-issue-implementation-on-rust

Implement a GitHub issue end-to-end when Vigilante dispatches work for a Rust repository with Cargo, Clippy, fmt, and security guidance.

aliengiraffe/vigilante · 41 tokens

tracking-tickets

Defines tracker status transitions and closing rules. Load when a pipeline run is linked to a ticket.

bostonaholic/team · 23 tokens