Agent skill

Merge Conflict Resolution

by oocx in oocx/tfplan2md

Resolve git merge/rebase conflicts safely without losing intended changes.

MITAuto-check passedDevelopment

Install Merge Conflict Resolution

skills CLI
$ npx skills add oocx/tfplan2md --skill merge-conflict-resolution -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install oocx/tfplan2md merge-conflict-resolution --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/oocx/tfplan2md.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/merge-conflict-resolution .claude/skills/merge-conflict-resolution && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
merge-conflict-resolution
GitHub stars
174
Token cost
~1.8k tokens
SKILL.md length
834 words
Files
1
Skills in repo
28
Repo updated
First seen
Licence
MIT

At a glance

Resolve git merge/rebase conflicts safely without losing intended changes.

  • Works in 8 steps: Confirm you are actually in a conflict → Identify conflicted files → Understand “ours” vs “theirs” → …
  • Tasks that involve Git workflow
  • SKILL.md covers Purpose, Core Principle, Hard Rules and When to Ask the Maintainer, plus 5 more sections
  • Calls git

What it does

Merge Conflict Resolution is an agent skill from oocx/tfplan2md. Resolve git merge/rebase conflicts safely without losing intended changes.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git workflow. It works with Git. The repository describes itself as: Convert terraform plans (json) into human readable markdown for easier review of changes in pull requests. The licence is MIT.

When your agent uses it

  • Tasks that involve Git workflow

Example prompts

  • “/merge-conflict-resolution”

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Confirm you are actually in a conflict
  2. Identify conflicted files
  3. Understand “ours” vs “theirs”
  4. Inspect what each side changed
  5. Resolve conflicts intentionally
  6. Verify resolution quality
  7. Validate the meaning, not just the markers
  8. Continue or conclude

What it can do on your machine

Read from SKILL.md and the folder at commit aa2fa28. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Merge Conflict Resolution loads about 1.8k tokens when it runs. Until then it costs about 25 tokens; SKILL.md has 834 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~25
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from oocx/tfplan2md at commit aa2fa28, republished under its MIT licence (© oocx). 834 words, ~1,810 tokens.

Download SKILL.mdSave it as .claude/skills/merge-conflict-resolution/SKILL.md (or your agent's skills folder).
name
merge-conflict-resolution
description
Resolve git merge/rebase conflicts safely without losing intended changes.

Merge Conflict Resolution

Purpose

Prevent accidental loss of intended changes when a git merge or rebase hits conflicts (e.g., documentation regressions like the docs/architecture.md incident referenced in Feature 024).

This skill is intended for any agent that can commit changes.

Core Principle

A conflict is not a “choose ours/theirs” problem — it’s an intent reconciliation problem.

You must understand the intent of both changes before resolving anything. The correct resolution depends on intent, not on which side is main.

Often the right answer is “keep the intent of both changes”, which may require a manual edit that combines or restructures content.

Sometimes, intent is genuinely contradictory and cannot be resolved automatically. In that case, ask the user how to proceed.

Hard Rules

Must
  • Analyze both sides first:
    • Identify what each side is trying to achieve (intent).
    • Identify which parts are compatible (can be merged) vs contradictory (need a decision).
  • If the intent of either change is unclear, ask the user questions until it is clear. Do not guess.
  • Resolve conflicts by editing the conflicted file(s) (not by blindly choosing one side).
  • After resolution:
    • Verify that no conflict markers remain (<<<<<<<, =======, >>>>>>>).
    • Verify that git status shows no unmerged paths.
    • Validate that the resolved content preserves the intent of both changes (or reflects an explicit user decision when intent conflicts).
Must Not
  • Blindly run git checkout --ours <file> / git checkout --theirs <file> without validating intent.
  • “Resolve” by deleting sections just to make conflicts disappear.
  • Commit a conflict resolution without reviewing the resulting diff.

When to Ask the Maintainer

If the conflict touches source-of-truth docs (e.g., docs/spec.md, docs/architecture.md) and the correct content is not unambiguous from the current task context, you must ask the maintainer which version to keep/merge before committing.

If the two change intents are contradictory (both cannot be true at the same time), you must ask the user to choose a direction. Do not attempt to “average” or invent a new intent.

Required Analysis (Before Editing)

Before you modify any conflicted file, produce an explicit analysis in chat using this template:

text
Conflict analysis

Change A intent:
- <what this change is trying to achieve>

Change B intent:
- <what this change is trying to achieve>

Compatibility:
- Compatible / Partially compatible / Contradictory
- Notes: <why>

Proposed resolution:
- <how you will preserve the intent of both changes>

Open questions (must answer before proceeding):
- <question 1>

If you cannot confidently state the intent for both changes, stop and ask.

Clarifying Questions (When Intent Is Unclear)

If you are in doubt about the intent of a change, ask questions until you understand it. Useful prompts:

  • “Which behavior/statement should be true after this merge?”
  • “Is this change a refactor (no behavior change) or a behavior change?”
  • “Do we need to keep both changes, or should one override the other?”
  • “If both changes cannot be kept, which one is more important and why?”
  • “Is there a spec/issue/PR description that defines the intended outcome?”
0. Confirm you are actually in a conflict

Use git to confirm the conflict state and list conflicted files:

bash
git status
git diff --name-only --diff-filter=U
1. Identify conflicted files
bash
git status
# or (machine-friendly)
git diff --name-only --diff-filter=U
2. Understand “ours” vs “theirs”
  • During a merge:
    • “ours” = current branch (where you ran git merge ...)
    • “theirs” = the branch you’re merging in
  • During a rebase:
    • “ours” / “theirs” semantics are different — prefer reading the conflict markers and using diffs rather than relying on naming.
Show full SKILL.md (346 more words)Show less
3. Inspect what each side changed

For each conflicted file:

bash
# See conflict hunks and surrounding context
sed -n '1,200p' <file>

# Compare current index stages (2=ours, 3=theirs) if available
# (These commands are safe even if a stage is missing.)
git show :2:<file> 2>/dev/null | head -50 || true
git show :3:<file> 2>/dev/null | head -50 || true

While inspecting, explicitly determine intent:

  • What was added/removed/renamed, and why?
  • Is one side a refactor and the other a feature? If yes, the resolution often needs both.
  • Are there invariants that must remain true (docs accuracy, API behavior, tests)?
4. Resolve conflicts intentionally
  • Edit the file to combine the correct parts from both sides.
  • Remove conflict markers.
  • Preserve required sections (especially for documentation).
5. Verify resolution quality
bash
# Review what you’re about to commit
git diff

# Ensure git sees conflicts as resolved
git status

Also do a repo-wide check that no conflict markers remain. Prefer tooling that searches files directly (no scripts required), for example:

  • VS Code Search panel: search for <<<<<<<, =======, and >>>>>>>
  • Prefer your harness's file-search tool over a shell grep to search for <<<<<<<, =======, and >>>>>>>
  • Optional fallback (terminal): git grep -n '^<<<<<<< ' || true (repeat for the other markers)
6. Validate the meaning, not just the markers

After conflicts are resolved, validate correctness based on file type:

  • Documentation changes:

    • Ensure the resulting documentation captures the intent of both changes and no relevant information is lost.
    • Ensure the docs do not contain contradictory statements introduced by the merge.
    • Check for common merge-regressions:
      • Deleted or duplicated headings/sections
      • Outdated statements reintroduced
      • Partial merges where one side’s detail vanished
    • If there are contradictions, resolve them explicitly or ask the user which statement is correct.
  • Code changes:

    • Ensure all tests pass.
    • Ensure the intended new features or behavior changes of both changes still work.
    • If tests exist for the changed area, run those first; then broaden if needed.
7. Continue or conclude
  • If this is a merge:

    bash
    git add <file>...
    git commit
  • If this is a rebase:

    bash
    git add <file>...
    git rebase --continue

Commit Message Requirement (For Merge Conflict Resolutions)

When you create a commit that resolves conflicts, the commit message must describe:

  • Which files had conflicts (high level)
  • How the conflict was resolved (e.g., “combined both intents”, “kept X and adapted Y to match”, “user chose A over B”)
  • Why this resolution preserves the intended behavior/documentation

Template:

text
<type>: resolve merge conflicts

Conflicts:
- <file/group>: <what conflicted>

Resolution:
- <how you preserved intent of both changes OR what decision was made>

Why:
- <why this is correct>

Notes

  • If you get stuck, prefer asking for guidance over guessing. A wrong conflict resolution can silently ship broken docs.

© oocx, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/merge-conflict-resolution of oocx/tfplan2md.

Open the folder on GitHubat commit aa2fa28

Compare with similar skills

Merge Conflict Resolution next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Merge Conflict Resolution compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Merge Conflict Resolution this skilloocx/tfplan2md174—~1.8kAutomated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Migrate Internal Package into GhostTryGhost/Ghost56k—~3.8kAutomated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0
Git Merge Conflict Resolvertailcallhq/forgecode7.6k1 repos~4.5kAutomated safety check: PassApache-2.0

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.

    56k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Git Merge Conflict Resolver

    tailcallhq/forgecode

    Resolves Git merge conflicts with a plan-first workflow that keeps both sides' intent, regenerates lock files and backs up deleted-but-modified files.

    7.6k GitHub starsUsed in 1 repo~4.5k tokens
    DevelopmentAuto-check passed
  • Git Branch Naming

    makeplane/plane

    Names a new Git branch with a type prefix, the lowercased work item ID and a short kebab-case description, so the ID can be extracted later from the branch name.

    61k GitHub stars~594 tokensUpdated yesterday
    DevelopmentAuto-check passed

More from oocx/tfplan2md

All 28 skills in this repo
  • Create Agent Skill

    oocx/tfplan2md

    Create a new Agent Skill following project standards and templates.

    174 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Detect and analyze edge crossings and overlaps in SVG workflow diagrams using geometric intersection algorithms and visual analysis.

    174 GitHub stars~4.3k tokensUpdated yesterday
    Auto-check passed
  • Generate PNG screenshots for release notes using the repository's HtmlRenderer and ScreenshotGenerator tools.

    174 GitHub stars~3.7k tokensUpdated yesterday
    Auto-check passed
  • Git Rebase Main

    oocx/tfplan2md

    Safely rebase the current feature branch on top of the latest origin/main.

    174 GitHub stars~456 tokensUpdated yesterday
    Auto-check passed
  • Next Issue Number

    oocx/tfplan2md

    Determine the next available issue number across all change types (feature, fix, workflow, website) by checking both local docs and remote branches, then reserve it by pushing an empty branch.

    174 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Run Uat

    oocx/tfplan2md

    Run User Acceptance Testing by creating a PR with rendered markdown on GitHub or Azure DevOps.

    174 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Merge Conflict Resolution

What does Merge Conflict Resolution do?

Resolve git merge/rebase conflicts safely without losing intended changes. Merge Conflict Resolution is an agent skill from oocx/tfplan2md. Resolve git merge/rebase conflicts safely without losing intended changes.

When should I use Merge Conflict Resolution?

Merge Conflict Resolution fits situations like: tasks that involve Git workflow.

How do I install Merge Conflict Resolution in Claude Code?

Run `npx skills add oocx/tfplan2md --skill merge-conflict-resolution -a claude-code`. Or copy the skill folder (.agents/skills/merge-conflict-resolution in oocx/tfplan2md) into .claude/skills/merge-conflict-resolution in your project. Claude Code loads it when a task matches its description.

How do I install Merge Conflict Resolution in Codex?

Run `npx skills add oocx/tfplan2md --skill merge-conflict-resolution -a codex`. Or copy the skill folder (.agents/skills/merge-conflict-resolution in oocx/tfplan2md) into .agents/skills/merge-conflict-resolution in your project. Codex loads it when a task matches its description.

Can I use Merge Conflict Resolution in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add oocx/tfplan2md --skill merge-conflict-resolution -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/merge-conflict-resolution, .gemini/skills/merge-conflict-resolution, .github/skills/merge-conflict-resolution and .opencode/skills/merge-conflict-resolution in your project.

What does Merge Conflict Resolution need to run?

Going by SKILL.md and its folder, Merge Conflict Resolution needs the command-line tools its instructions call (git).

Does Merge Conflict Resolution access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Merge Conflict Resolution safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Merge Conflict Resolution use?

Merge Conflict Resolution is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Merge Conflict Resolution use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Merge Conflict Resolution?

Skills that share tags, products or a category with Merge Conflict Resolution: Finishing a Development Branch (obra/superpowers, 297k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars), Migrate Internal Package into Ghost (TryGhost/Ghost, 56k stars) and Create Pull Request (cline/cline, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Merge Conflict Resolution?

oocx (a GitHub user) maintains it in oocx/tfplan2md, which has 174 GitHub stars. The repository holds 28 skills in this directory. The repository was last updated on October 9, 2026.

Source: oocx/tfplan2md on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.