← ClaudeAtlas

fix-merge-conflictslisted

Resolve merge conflicts non-interactively, validate build and tests, and finalize conflict resolution
ulises-jeremias/agent-toolkit · ★ 16 · Code & Development · score 76
Install: claude install-skill ulises-jeremias/agent-toolkit
# Fix Merge Conflicts Resolve merge conflicts non-interactively and return the branch to a buildable state. ## When to use - `git status` shows `Unmerged paths` or `CONFLICT`, or the branch reports merge conflicts against `main`. - User asks to "fix merge conflicts", "resolve conflicts", "rebase and fix", or "make this branch mergeable". - A PR is blocked by conflicts after pulling main. ## Prerequisites - Inside a Git repository with write access (`git status` works). - Conflicts come from a merge or rebase (e.g. `git merge main`, `git pull --rebase`, `gh pr update-branch`). - Toolchain available for validation: package manager (`npm`/`yarn`/`pnpm`/`bun`/`uv`/`cargo`/etc.) and `git`. ## Workflow 1. **Detect conflicts.** Run `git status --porcelain` and scan for `UU`/`AA`/`DD`/`U*` markers. Confirm with `grep -r "<<<<<<< " --include="*.md" --include="*.ts" --include="*.js" --include="*.py" --include="*.v" --include="*.yaml" --include="*.json" -l` (and `git diff --check` for leftover markers). List every conflicting file. 2. **Resolve each conflict with minimal, correctness-first edits.** Open each file, read the `<<<<<<< / ======= / >>>>>>>` hunks, and choose the merge that compiles and preserves public behavior. Prefer preserving both sides when safe; otherwise pick the variant that keeps the build green and does not change external API semantics. Keep edits readable — no broad refactors while resolving. 3. **Regenerate lockfiles via the package manager — do not han