plugins/sjawhar/skills/resolve-conflicts/SKILL.md
Use when merge conflicts exist after rebase, merge, or branch integration. Also use when file moves or renames cause path-level conflicts that look scarier than they are.
npx skillsauth add sjawhar/dotfiles plugins/sjawhar/skills/resolve-conflictsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Conflict resolution is reading comprehension, not surgery. Understand what both sides contributed before touching anything. The #1 failure mode is acting before understanding — trying mechanical fixes that create cascading problems.
NEVER touch the tree until you can explain what both sides changed and why.
digraph resolve {
"Conflicts detected" -> "Phase 1:\nMap both sides";
"Phase 1:\nMap both sides" -> "Can explain\nboth sides?" [label="read diffs"];
"Can explain\nboth sides?" -> "Phase 2:\nClassify conflicts" [label="yes"];
"Can explain\nboth sides?" -> "Phase 1:\nMap both sides" [label="no — keep reading"];
"Phase 2:\nClassify conflicts" -> "Phase 3:\nResolve each file";
"Phase 3:\nResolve each file" -> "Phase 4:\nVerify";
"Phase 4:\nVerify" -> "Phase 5:\nPush";
}
Before resolving anything, understand the full picture:
jj git fetch
jj status # See conflicted files
jj log -r @ # Understand commit relationships
jj resolve --list # List all conflicted files with conflict types
For each parent/side of the conflict:
jj diff -r <parent-rev> --stat # What files did this side touch?
jj diff -r <parent-rev> # What content changes did it make?
You must be able to answer:
If you can't answer all four, keep reading. Do not proceed.
| Conflict Type | What It Looks Like | Resolution | |---|---|---| | Path-only | File moved/renamed on one side, modified on other | Pick the correct path, keep the content changes | | Content-only | Both sides modified same lines | Read both changes, combine or pick the better version | | Path + content | File moved AND modified differently on each side | Resolve path first (where should it live?), then resolve content | | Delete vs modify | One side deleted file, other modified it | Decide if file should exist; if yes, keep modifications |
File moves are the most deceptive. A move commit that also modifies content creates TWO problems at once. Always check --stat for line counts — 0 insertions, 0 deletions means pure move, anything else means move + content changes.
Read the conflict markers in each file:
+++++++ sections are snapshots (full content of one side)%%%%%%% sections are diffs (changes to apply)For each file, document your choice: "Taking side B because it has the grading cache improvement" — not just "taking side B."
jj status # No conflicts remaining
# Run project quality checks (types, lint, tests)
If checks fail due to resolution, fix. If unrelated, note separately.
jj bookmark list # Check bookmarks
jj git push # Push resolved state
| What you're about to do | Why it's wrong |
|---|---|
| Rebase to bypass a conflicting parent | You're avoiding the conflict, not resolving it. The parent's changes get lost. |
| Insert a "fix-up" commit to reverse changes | This creates a new problem to solve instead of solving the original one. |
| jj undo then retry a different approach | Undo loops cause divergent commits in shared repos. One deliberate fix, not trial-and-error. |
| Abandon divergent commits to clean up | Verify they're actually stale first. Check immutability. Don't touch what you don't understand. |
| Say changes are "superseded" without checking | Read the actual file content on both sides. "Probably already covered" is not verification. |
| Chain a second fix after the first one didn't fully work | Stop. Re-read Phase 1. You missed something. |
The most dangerous conflict pattern: a commit that moves files to a new path AND changes their content.
# This looks innocent in --stat:
# {old/path => new/path}/file.py | 29 +-
# ^^^^ THESE ARE CONTENT CHANGES
If you only reverse the path (copying files back), you get the wrong content — either the old version or the new version, but not both sides' changes merged. You must:
If a conflict involves more than path + content (e.g., architectural disagreements, mutually exclusive approaches), explain both sides and ask the user before resolving. Don't guess.
Done when: All conflicts resolved, checks pass, changes pushed, no divergent commits created.
development
Use when searching flights, hotels, or rental cars; comparing fares across flexible dates; discovering cheap destinations from a fixed origin; or hunting hidden-city ticketing deals. Trigger on multi-city itineraries, fare calendars, "where can I fly cheaply", price-sensitive trip planning, or any time the user wants a sanity-check against Google Flights pricing — Skiplagged surfaces hidden-city deals other engines deliberately hide.
development
Search the web via Ceramic Search (lexical/keyword-based). Use when looking up current events, recent news, time-sensitive facts, specific people/products/companies, technical docs, or any topic requiring fresh web results. Triggers on "search the web", "look up", "find recent", "latest news", "current", or when built-in knowledge is likely stale.
tools
Use when reading WhatsApp messages, searching conversations, sending messages, listing chats, or interacting with WhatsApp workspaces
tools
Watch CI status, fix failures, and merge when green