bundles/github/skills/fix-merge-conflicts/SKILL.md
Resolve git merge conflicts correctness-first, then prove the tree still builds. Use when a merge, rebase, cherry-pick, or stash pop leaves conflict markers, when git status shows unmerged paths, or when the user asks to fix conflicts, resolve a merge, or rebase onto the trunk and clear the conflicts.
npx skillsauth add shipshitdev/library fix-merge-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 conflicts by understanding what each side meant and keeping the behavior both intended — not by blindly taking one side or concatenating both. After resolving, regenerate any derived files and confirm the tree still builds and tests pass before the merge/rebase is allowed to continue.
Inputs:
Outputs:
Creates/Modifies:
External Side Effects:
Confirmation Required:
git merge/rebase --abort) if the user might lose workDelegates To:
test-runner to verify the tree builds and tests pass after resolutionexecution-debugging when the post-resolution build or tests fail for a
non-obvious reasongit-safety if the history is tangled or a destructive recovery is being weighedgit merge / git rebase / git cherry-pick / git stash pop reported
conflicts and stoppedgit status shows "Unmerged paths" or files contain <<<<<<< markersHard rules:
git status -sb
git diff --name-only --diff-filter=U # unmerged paths
git log --oneline -1 MERGE_HEAD 2>/dev/null || true # what is being merged in
Identify the operation in flight (merge vs rebase vs cherry-pick — note that under a rebase "ours" and "theirs" are swapped relative to a merge) and group the conflicted files into code, configuration, and derived/generated artifacts.
For each conflicted file, inspect both sides and the common base:
git show :1:<file> # base (common ancestor)
git show :2:<file> # ours
git show :3:<file> # theirs
Reconcile by intent:
Remove every <<<<<<<, =======, >>>>>>> marker. Match the surrounding file's
style. After editing, confirm no markers remain:
git grep -nE '^(<<<<<<<|=======|>>>>>>>)' || echo "no markers left"
Do not hand-merge lockfiles or generated artifacts. Reconcile the source (e.g.
package.json) first, then regenerate:
# Bun lockfile (this repo uses bun.lock — never patch it by hand)
bun install
Apply the same principle to generated clients, schema snapshots, and build output: take the inputs from the correct side and re-run the generator.
Hand off to test-runner (or run the repo's own commands) to confirm the
resolution is buildable before continuing:
bunx tsc --noEmit # or the repo's type-check script
bun run test # scoped/related tests for the touched files
If the build or tests fail, treat it as part of the conflict — diagnose and fix the root cause; do not continue on red.
Stage the resolved files, show the resolution summary, and continue only after confirmation:
git add <resolved-files>
git status -sb
# then, after the user confirms:
git rebase --continue # or: git merge --continue / git cherry-pick --continue
Never pass a force flag and never continue while ambiguous conflicts are still flagged for a human.
Report each file's resolution and the reasoning, the regenerated artifacts, the build/test result, anything left for a human to decide, and whether the merge/rebase was continued or is paused awaiting confirmation.
development
Coordinates a weekly engineering review of board accuracy, recent code changes, operational health, and scoped cleanup. Use for a recurring repository health review or a review of the last several days.
testing
Audits project board configuration and prepares explicitly requested setup, copy, or normalization changes while preserving the existing workflow and provider boundaries. Use when inspecting a board's fields, columns, scope, or configuration.
testing
Reconciles a project board with current work and delivery evidence, reports incomplete coverage and metadata gaps, and applies only approved provider-supported field changes. Use when auditing board drift, reviewing blocked work, or assessing upcoming delivery.
development
Walk through how a subsystem works. Use for "how does X work", code walkthroughs before changing something, and placement or ownership questions. Explains architecture, runtime flow, and onboarding mental models. Can critique architecture. Use why for motivation.