Skip to content

Resolve Git Conflicts

Guides an agent through planning and resolving Git merge conflicts with backups and validation

Stars
7,638
Licence
Apache-2.0
Files
5 files

What it does

When you ask an AI agent to fix merge conflicts, this skill makes it follow a structured process instead of editing files blindly. The agent first assesses which files conflict, writes a resolution plan, and waits for your approval before changing anything. It can also run helper scripts that back up files deleted on one branch but modified on the other, and check that no conflict markers remain afterward.

Great for

  • Developers who regularly merge or rebase branches with conflicts in imports, tests, or config files
  • Teams that want a plan reviewed before an agent touches their repository
  • Anyone dealing with deleted-but-modified files who wants backups first

Skip it if

  • Simple one-line conflicts you can fix quickly yourself, since the plan-first process adds overhead
  • Repositories where you have not committed or backed up work, because scripts and resolutions rewrite files in the working tree
  • Conflicts in logic that requires domain knowledge, where the agent will ask you to choose rather than decide

Try asking

  • “I have merge conflicts after pulling main into my feature branch. Help me resolve them.”
  • “Resolve the deleted-modified conflicts in this rebase, backing up my changes first.”
  • “Check whether any conflict markers are still left in the repo before I commit.”
Step-by-step guide: how to use Resolve Git ConflictsInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 5 original files, the Apache-2.0 licence and an attribution note.

    resolve-conflicts.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip resolve-conflicts.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip resolve-conflicts.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Review the generated plan carefully before approving, especially the risk ratings on high-risk files.
  • Commit or stash your work before starting so you can revert if a resolution is wrong.
  • Answer the questions the agent lists for unclear conflicts; it applies your choice to similar conflicts later.

What's inside

  • references/patterns.md
  • references/sample-plan.md
  • scripts/handle-deleted-modified.sh
  • scripts/validate-conflicts.sh
  • SKILL.md

Redistributed unmodified from tailcallhq/forgecode under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.