agentleFS
anur4aganur4ag/pr-completion/skills/merge-conflict-resolution/SKILL.md

merge-conflict-resolution

Skill4 starsChanged 2 months agoMITView on GitHub

Safely resolve Git merge, rebase, cherry-pick, or revert conflicts by understanding both sides and validating the result. Use for conflicted branches, upstream updates, or stuck continuation operations.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask only when code and history cannot resolve a product or architecture choice.

    line 14
  2. Distinctive:

    Run git diff --check, focused validation for touched behavior, and broader checks when shared contracts changed.

    line 15
  3. Very specific:

    If continuation is authorized, stage only resolved files and use the appropriate non-interactive merge/rebase/cherry-pick/revert …

    line 16
  4. Distinctive:

    Never use destructive recovery commands, discard unrelated changes, or hide semantic uncertainty.

    line 18

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Merge Conflict Resolution

Workflow

  1. Snapshot git status, the active operation, and unmerged paths with git diff --name-only --diff-filter=U. Read repository instructions.
  2. For each conflict, inspect the working tree plus base, ours, and theirs when available: git show :1:path, :2:path, and :3:path.
  3. Reconstruct both intents from nearby code, call sites, types, tests, and recent commits. Do not choose a side merely because it compiles.
  4. Preserve the correct combined behavior, local style, and unrelated user changes. Remove every conflict marker.
  5. Ask only when code and history cannot resolve a product or architecture choice.
  6. Run git diff --check, focused validation for touched behavior, and broader checks when shared contracts changed.
  7. If continuation is authorized, stage only resolved files and use the appropriate non-interactive merge/rebase/cherry-pick/revert continuation. Do not continue while required validation fails.

Never use destructive recovery commands, discard unrelated changes, or hide semantic uncertainty. Report files resolved, key decisions, validation, continuation state, and remaining blockers.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.