git-conflict-resolve
Skill19 starsChanged 6 months agoMITView on GitHub
Resolves merge and rebase conflicts by preserving both sides' intent.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- FuDesign2008/open-skillstheir own version, first seen Nov 6, 2026
- ElGenius-developer/ai-skillstheir own version, first seen Nov 5, 2026
- jmcelreavey/devhubtheir own version, first seen Oct 13, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- FuDesign2008/open-skills★ 6same name
- jmcelreavey/devhub★ 5same name
- ElGenius-developer/ai-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- ci-fixSkill
- codeql-fixSkill
- database-reviewSkill
- debuggingSkill
- frontend-implementationSkill
- provider-debugSkill
- pr-reviewSkill
- security-auditSkill
- test-writerSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
4
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
- Distinctive: line 39
No conflict has happened yet — questions like "will these branches conflict?" call for inspecting the diff, not running this skill.
- Distinctive: line 46
Check the state: Don't assume what operation is in progress.
- Distinctive: line 68
Never guess on a logical conflict.
- Distinctive: line 85
Verify after resolving: Don't git add blind.
- Very specific: line 88
If the project has tests for the touched area, run them now (bun test, pytest <path>, etc.) — the cheapest correctness check is at …
“Common” is measured: kept by at least 6 in 10 of the 3 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.
Files
Git Conflict Resolve
Walk through merge, rebase, or cherry-pick conflicts one block at a time. Figure out what each side was trying to do, pick the resolution that preserves both intents, and flag the ones where you genuinely have to ask the user.
Use this skill when
- The user has a merge, rebase, or cherry-pick conflict and asks for help resolving it.
- The user pastes a file containing
<<<<<<<,=======,>>>>>>>conflict markers. - The user says their rebase is stuck or that git is asking them to resolve something.
- The user asks how to merge two specific branches when conflicts are known to exist.
Do NOT use this skill when
- The user wants to write a commit message (use
commit-message-craft). - No conflict has happened yet — questions like "will these branches conflict?" call for inspecting the diff, not running this skill.
- The user wants general git tutorials or strategy advice — this skill resolves an in-progress operation, not theory.
Procedure
- Check the state. Don't assume what operation is in
progress.
git statusto see which files are conflicted and which operation triggered the conflict (merge / rebase / cherry-pick / revert).git log --oneline --graph --decorate -20to see how the two branches diverged.git diff --cc <file>for each conflicted file. The "combined diff" view is more readable than the raw<<<<<<<markers — it shows only the lines that actually differ from both sides.
- For each conflict block, name both sides' intent. The
conflict marker shows you two competing edits; the question is
what each was trying to accomplish.
HEAD's version (above=======) — what's the current branch trying to do?- The incoming version (below
=======, before>>>>>>>) — what's the branch being merged in trying to do? - Then classify the block: same goal, different style (pick one — see step 3); different, independent goals (keep both, ordered naturally); or logical conflict — one side renames or removes a thing the other relies on — in which case STOP and ask the user which intent wins. Never guess on a logical conflict.
- Pick the resolution strategy per block.
- For style-only conflicts, scan recent commits (
git log -p -10 -- <file>) to learn the file's dominant style and match it. - For semantic conflicts where both sides should land, write the merged version that does both things. Move imports, reorder symbol declarations, and combine option objects as needed.
- For logical conflicts, write the question for the user as specifically as possible: name the lines, name both intents, and ask which one wins.
- For style-only conflicts, scan recent commits (
- Order multi-file resolution from leaves to roots. Config and constant files first, then libraries / shared utilities, then the call sites. Resolving call sites before the underlying API is settled tends to produce conflicts inside conflicts.
- Verify after resolving. Don't
git addblind.git diff <file>to confirm the resolved content matches the combined intent and has no stray markers.- If the project has tests for the touched area, run them now
(
bun test,pytest <path>, etc.) — the cheapest correctness check is at conflict-resolution time, not after--continue.
- Stage and continue with the right command for the
operation.
git add <files>for each, then: mid-rebasegit rebase --continue; mid-mergegit commit(the message is already prepared); mid-cherry-pickgit cherry-pick --continue; mid-revertgit revert --continue. Don't rungit commit --amendmid-rebase — let--continuedrive it. - If everything goes sideways, the escape hatches are
git rebase --abort/git merge --abort/git cherry-pick --abort. They restore the pre-operation state cleanly; suggest them explicitly when the user is stuck rather than digging deeper.
Examples
In scope: a user pastes a file with three conflict marker blocks
in src/config.ts.
→ Run git status (to confirm which operation), git diff --cc
src/config.ts (to read the combined view), and walk each block
in order. For block 1 (different env-var defaults), the two sides
have the same intent — pick the value from the more recent commit
on the relevant branch. For block 2 (one side adds a new feature
flag, the other doesn't touch it), keep both. For block 3 (one
side renames timeoutMs to timeoutSeconds and rescales, the
other adds a new caller using the old name), stop and ask which
name wins before touching it.
In scope: "I'm rebasing onto main and have three conflicts."
→ git status first to confirm which three files. Resolve in
the order config → shared utility → caller. After each, run
git diff <file> and re-run any tests touching that file before
moving to the next. git rebase --continue at the end, not
between each file.
Out of scope: "should I use merge or rebase for this branch?"
→ General strategy question, not an in-progress resolution. Tell the user this skill resolves conflicts; ask whether they're mid-operation, and offer to continue from there if they trigger the conflict.
Self-check before responding
- Did I identify both sides' intent for each block, not just "HEAD vs theirs"?
- Did I classify each block as same-goal / independent / logical conflict before resolving?
- Did I flag the logical conflicts to the user instead of guessing?
- Did I propose
git diff <file>(and tests where cheap) to verify each resolution before staging? - Did I name the correct continue command for the operation
(
rebase --continuevscommitvscherry-pick --continuevsrevert --continue)? - For multi-file conflicts, did I propose a resolution order (leaves to roots)?
- Did I leave the user a path back (
--abort) if the resolution goes wrong?
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
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.

