From shipshitdev-library
Resolve git merge conflicts correctness-first, then verify the tree builds and tests pass. Activates on merge, rebase, cherry-pick, or stash pop conflicts.
How this skill is triggered — by the user, by Claude, or both
Slash command
/shipshitdev-library:fix-merge-conflictsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Resolve conflicts by understanding what each side meant and keeping the behavior
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.
npx claudepluginhub shipshitdev/skills --plugin worktreeResolves in-progress git merge or rebase conflicts end-to-end: reads conflict state, recovers each side's intent, resolves hunks, runs checks, and finishes the merge/rebase.
Handles merge conflicts systematically by understanding, analyzing, resolving, verifying, and continuing. Maintains code integrity during rebase, merge, cherry-pick, or pull operations.
Works through an in-progress git merge or rebase conflict hunk by hunk, resolving each by intent without --abort. Runs project checks and finishes the operation.