che-merge-resolver

Resolves git merge conflicts hunk-by-hunk with user confirmation and decision logging.

Updated May 12, 2026
One-click install
npx skills add https://github.com/laionazeredo/che-ai --skill che-merge-resolver-laionazeredo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: che-merge-resolver
Source: https://github.com/laionazeredo/che-ai/tree/main/skills/che-merge-resolver
Command: npx skills add https://github.com/laionazeredo/che-ai --skill che-merge-resolver-laionazeredo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Resolving git merge conflicts across many files is error-prone: whole-file checkouts discard good changes from one side, and ambiguous hunks get silently guessed. This Skill enforces a minimum-blast-radius workflow that processes one hunk at a time, defaults to OURS, and never decides ambiguous cases alone. ## Core Features & Use Cases - Three-case hunk classification: TRIVIAL hunks (whitespace/import-order only) auto-resolve; CLASH hunks present exactly two options with per-side rationale; AMBIGUOUS hunks (rewrites, side-effect ordering, shared API contracts) always block for user input. - Mandatory audit trail: every resolved hunk appends a MERGE_RESOLVE entry to decisions.log.jsonl with hunk SHA, case type, choice, and rationale, plus a final merge report saved to the workspace-shared directory. - Safety guardrails: verifies worktree session binding before any git operation, supports --path subfilters to narrow scope, and forbids whole-file git checkout --ours/--theirs. - Use Case: After merging main into a feature branch with 12 conflicting files, run this Skill to walk each hunk interactively, auto-resolve trivial whitespace diffs, and produce a timestamped merge audit report. ## Quick Start Resolve the merge conflicts in my current worktree one hunk at a time using the default OURS strategy and log every decision.

Frequently Asked Questions about che-merge-resolver

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I resolve git merge conflicts one hunk at a time?▼

Run this Skill inside the conflicted worktree; it lists unmerged files via git status, extracts each conflict block with awk, and walks hunks top-down. Trivial whitespace-only hunks auto-resolve, while real clashes pause and ask you to pick OURS, THEIRS, or COMBINE.

What is the default merge strategy for conflict resolution?▼

The default strategy is OURS, meaning the current worktree side wins and the incoming branch loses per hunk. You can override it with --strategy=THEIRS, BOTH_SIDED_BY_HUNK, or MANUAL_ASK_ALL, but even OURS requires user confirmation on non-trivial clashes.

Can I limit merge conflict resolution to a specific file or directory?▼

Yes, pass --path=<dir|file> to filter the canonical conflict list to only files within that path. Files outside the path are never touched, keeping the blast radius as small as possible.

Why does the resolver stop and ask instead of auto-resolving some conflicts?▼

It blocks when a hunk is classified AMBIGUOUS: both sides rewrote the same function differently, side-effect order matters, shared API contracts or schemas are affected, or three or more valid resolutions exist. These cases require informed human consent because a wrong choice can break production.

Does this tool support whole-file checkout with git checkout --ours?▼

No, whole-file git checkout --ours or --theirs is explicitly forbidden because it discards good hunks from the other side. Resolution is strictly hunk-by-hunk, and only conflict markers are removed without reformatting surrounding code.

Where are merge conflict resolution decisions logged?▼

Every resolved hunk appends a MERGE_RESOLVE entry to decisions.log.jsonl containing the file, hunk SHA, case type, choice, and rationale. A final timestamped markdown report is written to the workspace-shared merge_audits directory via the che CLI path helper.