agentsclimarketplace

Git hex conflict resolution

Skill yaniv-golan/git-hex/skills/git-hex-conflict-resolution

Use whenever a git operation is mid-flight and needs help finishing. Triggers: "continue the rebase", "abort the rebase", "conflicts in files", "rebase stopped/stuck/paused", "cherry-pick conflict", "revert has conflicts", "merge conflict", git status showing unmerged paths, or any git-hex tool returning paused/conflict/conflictingFiles status. Helps resolve conflicting files one by one, then continue or abort the operation. Applies to rebase, merge, cherry-pick, and revert — but only when already in progress. NOT for starting new rebases, creating PRs, squashing, fixup commits, undoing completed operations, or git-hex setup.From its SKILL.md

Install
npx -y skills add yaniv-golan/git-hex --skill git-hex-conflict-resolution

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.5 KB, as published. Nobody here has run it

Git-hex Conflict Resolution

Use this skill when a git-hex operation is paused due to conflicts — or when the user reports being stuck in a rebase, merge, cherry-pick, or revert.

Workflow

1. Inspect the conflict state

Call git-hex-getConflictStatus to determine:

  • Whether an operation is in progress and what type (rebase, merge, cherry-pick, revert)
  • Which files are conflicting and the conflict type per file
  • For rebases: currentStep / totalSteps progress

When to use includeContent: true:

  • When you need to see the actual base/ours/theirs content to propose a resolution — typically for text files where you'll edit and resolve.
  • Skip it for binary files (they'll be flagged isBinary: true) or when you just need to see the list of conflicting files.
  • Use maxContentSize (default 10000) to limit large files. Content is truncated per-file and marked with truncated: true.

Important: inConflict: true can persist even after all files are resolved if the operation is still paused. Check conflictingFiles length, not just inConflict.

2. Resolve each conflicting file

For text files (both_modified, added_by_both):

  1. Read the conflict content (base/ours/theirs) from the getConflictStatus response or by reading the file directly.
  2. Edit the file to produce the correct merged content. Remove all conflict markers — resolveConflict with resolution: "keep" will reject the file if any <<<<<<<, =======, >>>>>>>, or ||||||| markers remain.
  3. Call git-hex-resolveConflict with file and resolution: "keep".

For delete conflicts (deleted_by_us, deleted_by_them):

  • resolution: "keep" — restores the file (from theirs if deleted_by_us, from ours if deleted_by_them).
  • resolution: "delete" — accepts the deletion.
  • Ask the user which they prefer if the intent isn't clear.

Path rules: The file parameter must be a POSIX repo-relative path. No absolute paths, no ../ traversal, no drive letters.

After each resolution, resolveConflict returns remainingConflicts — the count of files still in conflict.

3. Continue or abort

Continue — when all conflicts are resolved (remainingConflicts: 0) or getConflictStatus shows no remaining conflicting files:

  • Call git-hex-continueOperation.
  • It may return paused: true again if the next commit in a rebase also conflicts. Go back to step 1 in that case.
  • Supports: rebase, cherry-pick, merge. Does not support revert or bisect — for those, suggest git revert --continue / git bisect reset directly.

Abort — if the user wants to abandon the operation:

  • Call git-hex-abortOperation. This restores the pre-operation state.
  • For a rebase initiated by git-hex, git-hex-undoLast is also available as recovery after the operation completes (if the result wasn't what the user wanted).

4. Verify the result

After continueOperation reports completed: true, confirm the state:

  • Use git-hex-getRebasePlan or git log to show the user the final history.
  • If the result isn't right, suggest git-hex-undoLast to roll back.

Conflict types reference

Operation-level

TypeMeaning
rebaseInteractive rebase paused mid-apply
mergeMerge in progress
cherry-pickCherry-pick paused
revertRevert paused (limited tool support — see above)

File-level

TypeMeaningTypical resolution
both_modifiedBoth sides changed the fileEdit to merge, then keep
deleted_by_usWe deleted, they modifiedkeep (restore) or delete
deleted_by_themWe modified, they deletedkeep (restore) or delete
added_by_bothBoth sides added different versionsEdit to merge, then keep

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.