Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Git Merge and Rebase Conflict Resolver with zdiff3

    1

    Resolves git merge, rebase and cherry-pick conflicts using the base version and both sides' intent, regenerates lockfiles, verifies. Verdict RESOLVED / NEEDS REVIEW / ABORT RECOMMENDED

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Git Merge and Rebase Conflict Resolver with zdiff3

    Git Merge and Rebase Conflict Resolver with zdiff3

    Example session with this skill installed

    My rebase of feature/retry-backoff onto main stopped with conflicts in src/http/client.ts and package-lock.json. main renamed fetchWithTimeout to request() and bumped axios, and my branch added retry logic. Fix it without losing either change.

    • Read your context and instructions
    • Compiled the git merge

    Conflict resolution: rebase feature/retry-backoff onto main

    Operation: rebase (stopped at commit 2/3, REBASE_HEAD = "add retry with backoff")
    Sides: ours (stage 2) = main plus already-replayed commits; theirs (stage 3) = your retry commit. During a rebase these labels are swapped compared with a merge.

    Conflict style switched to zdiff3 (git 2.43 installed) and markers re-created for src/http/client.ts before editing.

    FileClassOurs intent (main)Theirs intent (your branch)Resolution
    src/http/client.tsSame-lines editRenamed fetchWithTimeout to request(), added a signal optionWrapped fetchWithTimeout in a retry loop with backoffKept request() and the signal option, moved the retry loop around request(), passed signal through so aborts stop retries
    package.jsonSame-lines editBumped axiosAdded p-retryKept both dependency lines
    package-lock.jsonLockfileRegenerated by mainRegenerated by your branchNot hand-merged. Ran npm install --package-lock-only after fixing package.json
    src/http/upload.tsSemantic (merged cleanly)noneStill called fetchWithTimeoutUpdated the call to request(); would have failed type-check
    export async function request(url: string, opts: RequestOpts = {}) {
      return retry(() => rawRequest(url, opts), {
        retries: opts.retries ?? 3,
        signal: opts.signal,
      });
    }
    

    Verification

    • Markers: git diff --cached --check clean; git grep for marker lines: 0 hits
    • Build: npm run build -> pass
    • Tests: npm test -> pass (all suites, including the two new retry tests from your branch)
    • Diff vs ours: 3 files changed. Diff vs theirs: 4 files changed (adds the request() rename)

    Verdict: NEEDS REVIEW

    Everything builds and tests pass, but the default of 3 retries now applies to every caller of request(), including uploads that main did not retry before. Confirm that is intended.

    Next command

    git add src/http/client.ts src/http/upload.ts package.json package-lock.json
    git rebase --continue
    No force-push run. Pushing the rebased branch needs git push --force-with-lease, and I will only run it after your yes.

    How to undo

    git rebase --abort returns the branch to where it was. After the rebase finishes, git reflog shows the old tip.

    package.json

    Connects securely to your tools. The creator never sees your data.

    About this skill

    A merge or rebase stops with CONFLICT, and the quick fix is to keep one side. That is how a teammate's change disappears, a lockfile ends up half-merged, or code compiles but calls a function the other branch renamed. During a rebase it is worse, because ours and theirs are swapped and "keep mine" picks the wrong side.

    This skill gives your coding agent a fixed procedure and a reference file of facts checked against the git-scm.com manual. It:

    • Detects which operation is in progress (merge, rebase, cherry-pick, revert) from the state files, and states which side is which, including the rebase swap
    • Lists conflicted files with their porcelain status codes and classifies each conflict: same-lines edit, add/add, modify/delete, rename, lockfile, generated file, formatting-only, or semantic
    • Switches to the zdiff3 conflict style (Git 2.35 and later, diff3 on older Git) and reads the base, ours and theirs stages directly
    • Uses git log --merge and per-side history to write down what each side meant before editing
    • Regenerates lockfiles with the package manager and rebuilds generated files instead of hand-merging them
    • Verifies with git diff --check, a marker grep, the build, the tests, and a diff against both sides
    • Returns a table explaining every resolution and a verdict: RESOLVED, NEEDS REVIEW or ABORT RECOMMENDED
    • Suggests git rerere when the same conflict keeps coming back

    Who it is for: developers who rebase often, maintainers merging long-lived branches, and anyone who wants an agent to fix conflicts without losing work.

    Safety: it never force-pushes, hard-resets, cleans or skips commits without your yes, and every report includes the abort command and how to recover through the reflog.

    Honesty note: it reports only build and test results it actually ran, and it cannot judge business intent the commits do not explain. Those hunks are marked NEEDS REVIEW.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.

    The skill works on a local repository through the terminal and depends on git, your package manager and your build and test commands being available. It cannot infer intent that is not visible in commits or code, so judgment calls are flagged for review rather than decided. Some features need newer Git (zdiff3 in 2.35, git log --merge for rebase and cherry-pick in 2.45); older versions get the fallback steps.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 29 days ago

    Software
    Git

    Permissions

    Terminal / Shell
    Write Files
    Listed29 days ago

    What's inside

    Frequently Asked Questions

    A SKILL.md file with the step-by-step procedure, output template, checklist and guardrails, plus references/git-conflict-facts.md with conflict styles, index stages, status codes, ours/theirs per operation, abort and continue commands, rerere details and lockfile notes, each checked against the linked docs.

    Any agent that reads the SKILL.md format, such as Claude Code, Codex CLI, Cursor, VS Code Copilot and Gemini CLI. The agent needs terminal access to run git in your repository.

    Unzip the git-merge-conflict-resolver folder into your agent's skills directory (for example .claude/skills/ in a project or your home directory). Then ask your agent to resolve the conflict while the merge, rebase or cherry-pick is stopped.

    It cannot know business intent that the commits and code do not show, so those hunks get NEEDS REVIEW. zdiff3 needs Git 2.35 or later, and git log --merge during rebase or cherry-pick needs Git 2.45 or later; it falls back on older Git. Verification is only as good as your build and tests.

    A plain prompt often picks one side or hand-edits lockfiles. This skill makes the agent read the common base, handle the rebase ours/theirs swap, regenerate lockfiles and generated files, check for semantic breaks in cleanly merged files, run verification, and ask before any history-rewriting command.

    New in Code Quality & Review