Skip to content
Skill

Resolve merge conflicts

Guides an agent through resolving merge conflicts by intent, then verifying and pushing

Resolve merge conflicts is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
7
Last commit
License
MIT
Listing updated

Similar skills

About Resolve merge conflicts

This skill walks an agent through merging a PR's base branch into the current branch and resolving the resulting conflicts. For each conflicted file it compares what both sides changed and which PR introduced each change, then picks a strategy based on the conflict shape, such as keeping the base's structure and reapplying the local change, handling modify/delete cases, or regenerating generated artifacts instead of hand-merging them.

The workflow favors merge over rebase, avoids stash and hard-reset commands mid-merge, and limits verification to the packages the merge touched: marker checks, scoped Jest runs, type checks and lint on resolved files. It also asks the agent to check whether failing tests already failed before the merge, and to report skipped checks and the pushed commit.

It expects a git repository with the GitHub CLI available for reading PR metadata, and it refers to a project's own jest config, type-check script or an ai-verify contract when one exists.

When your agent uses it

Resolve a conflicted merge (typically a long-lived epic or integration branch against its PR base), explain why each conflict exists, fix it by intent, verify scoped checks, then commit the merge and push. Use when a PR shows conflicts against its base, when the user says "fix the conflicts", "merge main into this branch", or "resolve merge conflicts".

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (5 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the ai-essentials plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add tonyghiani/ai-essentials
/plugin install ai-essentials@ai-essentials

Or copy only this skill to ~/.claude/skills/resolve-merge-conflicts:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/resolve-merge-conflicts &&
cp -R "$tmp/skills/resolve-merge-conflicts" ~/.claude/skills/resolve-merge-conflicts &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/resolve-merge-conflicts inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/resolve-merge-conflicts to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/resolve-merge-conflicts &&
cp -R "$tmp/skills/resolve-merge-conflicts" ~/.agents/skills/resolve-merge-conflicts &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/resolve-merge-conflicts inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/resolve-merge-conflicts to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/resolve-merge-conflicts &&
cp -R "$tmp/skills/resolve-merge-conflicts" ~/.cursor/skills/resolve-merge-conflicts &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/resolve-merge-conflicts inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/tonyghiani/ai-essentials.git --path skills/resolve-merge-conflicts

Or copy the folder to ~/.gemini/skills/resolve-merge-conflicts yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/resolve-merge-conflicts:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/resolve-merge-conflicts &&
cp -R "$tmp/skills/resolve-merge-conflicts" ~/.copilot/skills/resolve-merge-conflicts &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/resolve-merge-conflicts inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git

Then copy ai-essentials/skills/resolve-merge-conflicts into your agent's skills folder as resolve-merge-conflicts. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Merge base into branch
Fetches the PR base and merges it into the current branch while preserving merge history.
Intent-based conflict analysis
Compares both sides' changes and their originating PRs before editing each conflicted file.
Strategy by conflict shape
Offers different resolutions for overlapping edits, modify/delete cases, generated files and duplicate fixes.
Lockfile and artifact handling
Takes the base's lockfile and reinstalls, and avoids hand-merging generated artifacts.
Scoped verification
Runs marker checks, related Jest suites, type checks and lint limited to affected areas.
Commit, push and report
Writes a merge commit message, pushes without force and summarizes each resolved file.

Good for

  • Fix the conflicts on my epic branch against main
  • Merge main into this feature branch and resolve the conflicts
  • Resolve the merge conflicts blocking this pull request
  • Explain why each conflicted file clashed and resolve it

Resolve merge conflicts FAQ

When does Resolve merge conflicts trigger?

When a PR shows conflicts against its base, or when the user says things like "fix the conflicts", "merge main into this branch" or "resolve merge conflicts".

Does Resolve merge conflicts rebase the branch?

No. It merges the base into the branch and avoids rebasing unless the user asks, since a rebase would need a force push.

Does Resolve merge conflicts require any scripts or tools?

It uses git and the GitHub CLI for PR details. It refers to the project's jest config, type-check script or ai-verify contract when present. The skill bundles no scripts.

What does Resolve merge conflicts do if a test fails after the merge?

It checks whether the test already failed on the pre-merge HEAD and reports the result either way.

How do I install Resolve merge conflicts in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/resolve-merge-conflicts to use it in all your projects, or to .claude/skills/resolve-merge-conflicts in one project. Or install the ai-essentials plugin, which includes it: /plugin marketplace add tonyghiani/ai-essentials, then /plugin install ai-essentials@ai-essentials.

Does Resolve merge conflicts run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Resolve merge conflicts?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Resolve merge conflicts?

The closest alternatives to Resolve merge conflicts are Fix merge conflicts, Git merge, Merge PR, Conflicted PR starts no ci run push resolution first and Gha PR merge ref shows upstream changes.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from tonyghiani/ai-essentials

  1. Lets an agent read your GitHub queue at day's end and draft a morning triage report

    • Open source
    • 7 GitHub stars
    • Developer tools
  2. Finds untranslated UI strings and i18n patterns that break translation in code

    • Open source
    • 7 GitHub stars
    • Developer tools
  3. Writes pull request descriptions from a fixed summary, screenshots and testing template

    • Open source
    • 7 GitHub stars
    • Developer tools
  4. Triages PR review comments, then implements, replies to and resolves them

    • Open source
    • 7 GitHub stars
    • Developer tools
  5. Guides the agent through a test-first loop: failing test, then minimal implementation

    • Open source
    • 7 GitHub stars
    • Developer tools
  6. Audits UI code for accessibility defects that block keyboard and screen-reader users

    • Open source
    • 7 GitHub stars
    • Developer tools