plugins/git/skills/resolving-conflicts/SKILL.md
Resolves merge conflicts during rebases, merges, and cherry-picks — reads both sides, understands intent from git history, auto-resolves clear-cut cases, and asks about ambiguous ones. Also handles end-to-end rebase workflows (fetch, rebase onto target, resolve, continue). Use when the user says "rebase onto main", "resolve conflicts", "fix these conflicts", "merge main in", "finish this rebase", or when a rebase/merge/cherry-pick has stopped due to conflicts.
npx skillsauth add lucasilverentand/skills resolving-conflictsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Resolve merge conflicts intelligently by understanding the intent behind both sides of each conflict.
git branch --show-currentgit status --shorttest -d "$(git rev-parse --git-dir)/rebase-merge" -o -d "$(git rev-parse --git-dir)/rebase-apply" && echo "yes" || echo "no"test -f "$(git rev-parse --git-dir)/MERGE_HEAD" && echo "yes" || echo "no"test -f "$(git rev-parse --git-dir)/CHERRY_PICK_HEAD" && echo "yes" || echo "no"creating-commits skill, then go to "Start rebase"Default target is main (or master if that's what the repo uses). If the user specified a branch, use that.
git fetch origin
git rebase origin/<target>
git fetch origin
git merge origin/<target>
git diff --name-only --diff-filter=U
List all conflicted files. Process them one at a time.
Read the file to see the conflict markers (<<<<<<<, =======, >>>>>>>). Understand what each side changed.
For each conflict, gather context:
git log --oneline -5 -- <file> on the current branch — what recent changes were made and whygit log --oneline -5 REBASE_HEAD -- <file> (or MERGE_HEAD / CHERRY_PICK_HEAD) — what the incoming side changed and whyFor clear-cut conflicts:
git add <file>For ambiguous conflicts:
AskUserQuestion with options:
After all conflicts in the current round are resolved:
git rebase --continue
(Or git merge --continue / git cherry-pick --continue depending on the operation.)
If this produces more conflicts (common during rebase when replaying multiple commits), loop back to step 1 of "Resolve conflicts". Each round may have different files conflicting.
If git rebase --continue needs a commit message, use the original commit message — don't modify it unless the resolution changed the commit's intent.
Keep resolving and continuing until the operation completes. Track progress:
Resolving commit 3/7: fix(auth): handle token expiry
git log --oneline -10
Show what the branch looks like after the operation. Summarize:
If the branch has a remote tracking branch and this was a rebase (which rewrites history):
Use AskUserQuestion:
git push --force-with-lease to update the remote branchAlways use --force-with-lease over --force — it's safer because it fails if someone else pushed to the branch in the meantime.
For merges (which don't rewrite history), offer a regular git push instead.
If the user wants to stop mid-resolution, or if the conflicts are too complex:
git rebase --abort
(Or git merge --abort / git cherry-pick --abort.)
This restores the branch to its state before the operation started. Always mention this option if the user seems unsure about a resolution.
tools
Creates, audits, and updates public open-source repository documentation, including README files, CONTRIBUTING guides, SECURITY and SUPPORT docs, project badges, quickstarts, usage guidance, community links, and contributor onboarding. Use when maintaining docs for public GitHub projects, libraries, CLIs, apps, or reusable packages, especially when the user says "update this README", "write CONTRIBUTING.md", "make these docs open-source ready", or "improve the public project docs".
development
Creates, audits, and updates private or closed-source project documentation, including internal README hubs, codebase navigation guides, ownership links, Linear initiative links, onboarding notes, runbooks, and contribution guidance for teams. Use when maintaining docs for private repositories, internal apps, services, infrastructure, or company projects, especially when the user says "make this README an internal hub", "document how to navigate this repo", "add Linear links to the docs", or "write private project documentation".
development
Creates, updates, estimates, and tidies Linear issues using Luca's issue-shaping rules. Use when the user asks to create a Linear issue, write ticket-ready issue text, refine an existing issue, add acceptance criteria, set issue relationships, estimate points, audit issue hygiene, tidy a Linear project, find duplicates, fix stale blockers, or normalize labels, milestones, priorities, and issue state.
testing
Keeps an existing Linear project tidy after planning and during execution. Use when the user asks to "tidy Linear", "clean up the project", "audit issues", "find duplicates", "check stale blockers", "fix project drift", or run periodic Linear housekeeping on a project, initiative, or milestone set. Use when planning is underway or execution has started and relationships, labels, priorities, documents, and issue states need coherence without changing product scope.