agentsclimarketplace

Melt

Skill paulnsorensen/easy-cheese/skills/melt

Cheese your code πŸ§€ β€” high-quality results as easy as cheese. A portable, harness-agnostic Agent Skills toolkit.

Install
npx -y skills add paulnsorensen/easy-cheese --skill melt

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

  • 12 stars12 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.

What its author says it does

Copied from the file, not written here

Resolve git merge, rebase, or cherry-pick conflicts via a structural-merge cascade β€” mergiraf (AST-aware auto-resolve) β†’ git rerere (replay remembered fixes) β†’ kdiff3 (manual fallback). Use when conflicts exist and the user wants them resolved β€” phrases like "melt the conflicts", "fix the merge conflicts", "resolve the rebase conflicts", "what's conflicting after the merge", "/melt", "fix the cherry-pick", or any prompt that surfaces `<<<<<<<` markers, `CONFLICT (...)` git output, or a half-finished merge state. Use even when only one file is conflicting if the user wants the structural pass attempted before manual editing. Do NOT use for general git operations without conflicts. After `/cook` or `/cure` if a merge step blocked them; before retrying the gate that surfaced the conflict.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

9.3 KB, as published. Nobody here has run it

/melt

Use this skill to resolve git merge, rebase, or cherry-pick conflicts using the structural cascade: mergiraf β†’ rerere β†’ kdiff3. Each tool handles what the previous could not.

File IO routing

For conflict-marker or symbol search, bounded inspection, and manual edits, call the selected source-code backend directly according to code-intelligence-routing.md. Preserve search β†’ fresh bounded read β†’ stale-safe write when applying a manual resolution.

Cascade

StageToolWhat it doesWhen it runs
1mergirafTree-sitter structural merge of base / ours / theirs. Independent additions merge cleanly even when text merge would conflict. Falls back to text merge on parse failure.Automatically as a git merge driver, or via python3 ${CLAUDE_SKILL_DIR}/scripts/melt.pyz batch-resolve.
2git rerereReplays a previously recorded human resolution for the same conflict signature.After mergiraf, especially during long rebases where conflicts recur.
3kdiff3Manual 3-way diff for what mergiraf and rerere could not resolve.Launched via git mergetool.

Protocol

0. Squash-residue check

Run this before the conflict summary. If the branch was squash-merged into base, mergiraf cannot help β€” see the two remedies below.

python3 ${CLAUDE_SKILL_DIR}/scripts/melt.pyz detect-squash-residue

If the verdict is SQUASH-MERGED, surface both printed remedies to the user verbatim and stop the cascade. Neither remedy is auto-applied β€” the user picks one and copy-pastes. Flags:

  • --base β€” base ref to compare against (default: origin/main).
  • --branch β€” branch to check (default: current).
  • --json β€” structured output for scripting.

Detection cascade (strongest first; later signals run only when needed):

  • tree-match β€” walks commits on base looking for one whose tree equals the tree at some point on the branch. That commit is a squash-equivalent of branch commits up to that point. Works offline, through fork PRs and renames, and handles branches with commits past the squash (the case local-synth misses). Always runs first.
  • gh-api β€” runs in parallel with tree-match. Enriches a tree-match verdict with PR metadata (number, URL, merge commit) when its SHAs correlate with the squash; supplies the verdict on its own when tree-match found nothing.
  • local-synth β€” synthesizes a would-be squash commit from HEAD's tree and asks git cherry whether base contains an equivalent. Last-resort fallback that only runs when neither tree-match nor gh-api produced a verdict; cannot enumerate squashed vs unique commits.

Verdict semantics:

  • SQUASH-MERGED (method=tree-match or tree-match+gh) β€” strongest signal; unique-commit list is the slice of branch commits after the matched squash point.
  • SQUASH-MERGED (method=gh-api) β€” fallback when tree-match found nothing but the gh PR's SHAs overlap with branch commits.
  • SQUASH-MERGED (method=local-synth) β€” detected offline only; cherry-pick list must be reviewed by hand.
  • not-detected β€” proceed to the cascade.
  • not-applicable β€” on the base branch.

The detector prints two remedies in order:

  • [A] merge (non-destructive) β€” git merge <base>. Preserves all branch history; squashed commits collapse to a no-op merge, so only real conflicts surface. Prefer this when the branch has unique work or the unique-commit list is uncertain.
  • [B] reset-and-cherry-pick (destructive) β€” git reset --hard <base> + git cherry-pick <unique-shas>. Rewrites the branch and requires force-push. Use when a clean linear history is wanted and the unique-commit list looks complete.

Default to suggesting [A] first; only suggest [B] when the user has stated a preference for a linear-history workflow or the unique-commit count is small and verified.

1. Diagnose

Run the summary script next.

python3 ${CLAUDE_SKILL_DIR}/scripts/melt.pyz conflict-summary

Default output is terse: one metadata line per file plus minimally framed hunks. Flags:

  • --json β€” structured output for scripting.
  • --verbose β€” markdown view for humans.
  • --context N β€” context lines around each hunk (default 3).

For raw git context:

git log --merge --oneline    # commits involved in the merge
git status                    # conflict / staging state

2. Structural resolution

For every file mergiraf supports, attempt structural merge:

# Preview (dry-run is the default)
python3 ${CLAUDE_SKILL_DIR}/scripts/melt.pyz batch-resolve

# Apply clean resolutions and stage them
python3 ${CLAUDE_SKILL_DIR}/scripts/melt.pyz batch-resolve --apply

# Markdown output and mergiraf debug logs
python3 ${CLAUDE_SKILL_DIR}/scripts/melt.pyz batch-resolve --verbose

To inspect what mergiraf would produce for a single file without touching the working copy, use --debug:

python3 ${CLAUDE_SKILL_DIR}/scripts/melt.pyz batch-resolve --debug <path>

It prints paths to the merged output, the log, and the conflict-marker count. Inspect with cat/diff against the printed paths; if the merged output is clean, apply it:

cp <merged_path> <path>
git add <path>

3. Remaining conflicts

After the structural pass, check rerere first:

git rerere status      # files with recorded resolutions
git rerere diff        # show what rerere would apply

If rerere already applied, the conflict is resolved. Otherwise drop into the manual tool:

git mergetool          # opens kdiff3 for each conflicted file
git mergetool <path>   # or just one file

After manual resolution, finish the interrupted operation:

git add <resolved-files>
git merge --continue        # or
git rebase --continue       # or
git cherry-pick --continue

Done = git status shows no Unmerged paths AND zero <<<<<<< markers remain.

For ours/theirs picks, lockfiles, mergiraf debugging, and maintenance, see references/cascade-stages.md.

Scripts

ScriptPurposeWhen
python3 ${CLAUDE_SKILL_DIR}/scripts/melt.pyz detect-squash-residueDetect that the branch was squash-merged and emit both the merge and reset+cherry-pick remediesRun first β€” short-circuits the cascade
python3 ${CLAUDE_SKILL_DIR}/scripts/melt.pyz conflict-summaryStructured summary with line numbers and contextAfter residue check
python3 ${CLAUDE_SKILL_DIR}/scripts/melt.pyz batch-resolveRun mergiraf merge over every conflicted fileSupported languages
python3 ${CLAUDE_SKILL_DIR}/scripts/melt.pyz conflict-pickChoose ours / theirs per hunkShell, SQL, formats mergiraf does not parse
python3 ${CLAUDE_SKILL_DIR}/scripts/melt.pyz lockfile-resolveTake one side and regenerate the lockfileCargo.lock, package-lock.json, etc.

What this skill does NOT do

  • Push or open PRs β€” hand off to a gh skill.
  • Run builds or tests β€” re-enter /cook or run project gates.
  • Commit resolved files outside git add staging β€” use a commit skill.
  • Architectural review of merge results β€” use /age.

Gotchas

  • mergiraf solve flag confusion: use --stdout / -p for preview, NOT --output.
  • Markdown is supported by mergiraf but may need .gitattributes registration.
  • Lockfile structural merge is not the same as a valid lockfile β€” always regenerate after taking a side.
  • zdiff3 base markers (|||||||) are handled by every script in this skill.
  • If you see conflicts in a supported file type, mergiraf-as-driver already ran β€” you are looking at the residue.

Handoff

After resolution finishes, prompt the next step via the shared handoff gate in ../cheese/references/handoff-gate.md. Include the detected interrupted operation and upstream invocation in the context packet before asking. Default options:

  • Resume β€” dispatch the exact continuation command for the current operation (git merge --continue, git rebase --continue, or git cherry-pick --continue). If the triggering skill invocation is known, return to that skill with the original context after the git operation succeeds; otherwise stop with the resumed git status.
  • Re-run gates β€” dispatch the upstream skill invocation that originally surfaced the conflict so its quality gates run on the merged state.
  • Stop β€” dispatch none; leave the working tree staged for the user to inspect.

/melt never resumes before the user selects. After a non-stop selection, run the selected continuation immediately.

Keep looking

Skills are one crate of 328,083. 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.