Skip to content
Back to skills

Conflict Resolve

ASecurity

Resolve Git conflicts raised by merging the latest base branch by analyzing the intent of both the ours and theirs changes and combining them, then commit and push. Use when a conflict needs resolving.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 12, 2026
documentationbashgit

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 12, 2026

npx -y skills add aganesy/QFAI --skill conflict-resolve --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Conflict Resolve?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Conflict Resolve
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aganesy-conflict-resolve/badge)](https://www.skillsdirectory.com/skills/aganesy-conflict-resolve)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: conflict-resolve
description: Resolve Git conflicts raised by merging the latest base branch by analyzing the intent of both the ours and theirs changes and combining them, then commit and push. Use when a conflict needs resolving.
argument-hint: "Base branch (defaults to the latest origin/main HEAD)"
---

<!-- markdownlint-disable MD029 -->

# Git conflict resolution (coexisting intents)

Resolve the conflicts raised by merging the latest base branch without breaking the intent of either branch's changes.

## Completion criteria

- [ ] `git diff --name-only --diff-filter=U` returns 0 files
- [ ] For each conflicted file, you can explain why both branches' intents are preserved
- [ ] Commit and push are done

## Phase 0: Preconditions

1. Update the remote:

```bash
git fetch origin
```

2. Determine the base branch (argument given: that value; none: `origin/main`).
3. Check for conflicts:

```bash
git status --short
git diff --name-only --diff-filter=U
```

4. If there are 0 conflicts, stop and report `No conflicts`.

## Phase 1: Thorough analysis of change intent

1. List the conflicted files:

```bash
git diff --name-only --diff-filter=U
```

2. For each file, inspect the 3-way contents:

- `git show :1:<file>` (base)
- `git show :2:<file>` (ours)
- `git show :3:<file>` (theirs)

3. Inspect the related history and diff:

- `git log --oneline --decorate -- <file>`
- `git diff -- <file>`

4. Fill in the "Intent analysis matrix" in [reference.md](reference.md) for each file.
5. Decide the integration approach that lets both intents coexist first, rather than "which side to adopt".

## Phase 2: Implement the resolution

1. Following the integration approach, remove the conflict markers and merge the implementation.
2. Adopting `ours` or `theirs` wholesale is prohibited in principle. When an exception is made, record the reason in the work report.
3. Confirm that no conflict markers remain:

```bash
rg -n "<<<<<<<|=======|>>>>>>>"
```

4. Stage the resolved files:

```bash
git add <resolved-files>
```

## Phase 3: Verification

1. Run the project's lint, format, type check and tests, and confirm the resolution has not broken existing behavior.
2. If anything fails, fix it and stage again.

## Phase 4: Commit and push

Follow the commit message convention in [reference.md](reference.md).

```bash
git commit -m "merge: resolve conflicts with <base-branch>"
git push
```

## Prohibited

- Disabling CI workflow definitions, or editing them to skip checks
- Hand-editing generated files (rerun the code generation tool instead)
- Working around failures with test `skip` / `todo` / deletion
- Working around failures by disabling type safety (`@ts-ignore`, `@ts-expect-error`, `any`, lint-disable, etc.)

## Stop conditions

- The same error repeats (3 or more times)
- The problem cannot be reproduced because it depends on the environment, or progress is blocked by the network
- The intents of the two branches cannot coexist
- The impact is too large to judge safely

When stopping, report the situation, what was tried and what needs a decision, using the work report template in [reference.md](reference.md).

Files in this skill

  • SKILL.md3.1 KB
  • reference.md2.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in documentation →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.