# resolve-backport-conflicts

Resolves merge conflicts in Mergify backport pull requests. It cleans up conflict markers and discards unrelated changes after cherry-pick failures.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 447 installs · ★ 158
- Author: frappe
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/frappe/skills/tree/HEAD/skills/resolve-backport-conflicts/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/resolve-backport-conflicts

## What it does

When Mergify fails to cherry-pick a pull request into another branch, it commits unresolved files with conflict markers intact. This skill takes the pull request link or number and checks out the branch using the GitHub CLI. It inspects the local working tree first. If uncommitted changes exist, the execution halts immediately to protect existing work.

The agent reads the original pull request diff to understand the intended change. It applies that diff cleanly on top of the release branch code while dropping unrelated hunks. That prevents accidental leaks of newer APIs into stable versions. If code relies on a missing helper, the skill will not invent code on its own and asks how to proceed.

Once verified with diff checks and existing linters, changes are committed and pushed without a force flag. The skill then clears the conflict label from the pull request on GitHub.

## Requirements
- Works with: GitHub

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add frappe/skills --skill resolve-backport-conflicts -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/resolve-backport-conflicts/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/resolve-backport-conflicts/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add frappe/skills --skill resolve-backport-conflicts -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/resolve-backport-conflicts/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add frappe/skills --skill resolve-backport-conflicts -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/resolve-backport-conflicts/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install frappe/skills resolve-backport-conflicts
```

2. **Manually: put the files in place**
- File: `.github/skills/resolve-backport-conflicts/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add frappe/skills --skill resolve-backport-conflicts -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/frappe/skills --path skills/resolve-backport-conflicts
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/resolve-backport-conflicts/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add frappe/skills --skill resolve-backport-conflicts -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/frappe/skills/tree/HEAD/skills/resolve-backport-conflicts/SKILL.md

## When to use it
- resolve conflict markers left by automated Mergify cherry-picks
- filter out unrelated changes dragged from newer commits
- match backported modifications against the original pull request diff
- clear the conflicts label from GitHub once markers disappear

## Example prompts
- Resolve backport conflicts in pull request `<pr-url>`
- Fix Mergify conflict markers for pull request `<pr-url>`
- Check `<pr-url>` and clean up unresolved backport hunks

## Similar
- [resolve-conflicts](https://affpapa.org/en/nevibecode/skills/resolve-conflicts.md) — skill · 683 installs
- [git-workflow](https://affpapa.org/en/nevibecode/skills/jezweb-git-workflow.md) — skill · 1200 installs
- [resolve-reviews](https://affpapa.org/en/nevibecode/skills/resolve-reviews.md) — skill · 537 installs
- [resolve-agent-reviews](https://affpapa.org/en/nevibecode/skills/resolve-agent-reviews.md) — skill · 489 installs
- [fix-merge-conflicts](https://affpapa.org/en/nevibecode/skills/fix-merge-conflicts.md) — skill · 2700 installs
- [dx-devops-conflict-resolve](https://affpapa.org/en/nevibecode/skills/dx-devops-conflict-resolve.md) — skill · 824 installs

From the same set: [frappe/skills](https://affpapa.org/en/nevibecode/by/frappe/skills.md) — 6 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
