/nlsmdn:resolve-conflicts [file path]from nlsmdn
Resolve git conflicts from any operation (merge, rebase, cherry-pick, stash, revert). Use when encountering conflicted files during git operations.
Ships in nlsmdn. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Resolve git conflicts from any operation with proper continuation workflow.
/resolve-conflicts # Resolve all conflicts
/resolve-conflicts path/to/file # Focus on specific file
git pull --rebase (autostash) whose re-apply conflicted: the rebase already finished, so no rebase-merge/ exists, but the markers are real. Read the reflog + stash list before classifying — see Step 1.Never infer the state from the conflict markers alone, and never assume "no sentinel file" means a simple manual conflict. Gather the full picture first with one command, then classify:
git status; echo "=== STASH ==="; git stash list; echo "=== REFLOG ==="; git reflog -n 6
Then use Glob to check for sentinel files in .git/:
.git/MERGE_HEAD → Merge.git/rebase-merge or .git/rebase-apply → Rebase.git/CHERRY_PICK_HEAD → Cherry-pick.git/REVERT_HEAD → Revert| Operation | Detection | Continue | Abort |
|---|---|---|---|
| Merge | MERGE_HEAD exists | git commit | git merge --abort |
| Rebase | rebase-merge/ or rebase-apply/ | git rebase --continue | git rebase --abort |
| Cherry-pick | CHERRY_PICK_HEAD exists | git cherry-pick --continue | git cherry-pick --abort |
| Revert | REVERT_HEAD exists | git revert --continue | git revert --abort |
| Stash apply | No sentinel; reflog shows manual stash pop/apply | git stash drop | git checkout --merge or restore from stash |
| Autostash re-apply | No sentinel; reflog shows pull --rebase/rebase (finish) + an autostash stash entry | nothing to continue — just git add (the rebase already finished — do not git rebase --continue) | git checkout --merge . |
| Manual / committed | No sentinel, no stash entry, no recent operation | nothing to continue — just git add | git checkout --merge <file> |
Disambiguating the no-sentinel case (this is where detection usually goes wrong):
A git pull --rebase (or any rebase --autostash) stashes your dirty tree,
replays/fast-forwards, then re-applies the autostash. If that re-apply
conflicts, the rebase has already completed — so there is no rebase-merge/
sentinel, yet the working tree has real conflict markers. This looks identical
to a plain stash conflict until you read the reflog. The tells:
rebase (finish),
pull --rebase, a fast-forward) and a stash push labeled autostash.git stash list still contains the autostash entry (git keeps it on a failed
apply — it is not auto-dropped). It is a harmless leftover backup; leave it.In this case the only remaining work is to resolve the markers and git add. Do
not attempt git rebase --continue — it will fail because no rebase is in
progress.
git diff --name-only --diff-filter=U
Then run git status to see the full conflict status for each file.
Conflict markers in git status:
UU - Both modified (most common)AA - Both addedDD - Both deletedAU/UA - Added by us/them, modified by otherDU/UD - Deleted by us/them, modified by otherRead the conflicted file and identify:
<<<<<<< HEAD (or ours)
Current branch changes
=======
Incoming changes
>>>>>>> branch-name (or theirs)
For rebase conflicts: "Ours" is the branch being rebased onto, "theirs" is the commit being replayed. This is inverted from merge!
Edit the file to:
<<<<<<<, =======, >>>>>>>)The user invoked this skill to resolve and finish an in-progress git operation, so complete it yourself:
Stage the files you resolved: git add <resolved-files>.
Run the continue command for the detected operation, using a non-interactive flag so no editor opens and hangs:
| Operation | Continue command |
|---|---|
| Merge | git commit --no-edit |
| Rebase | GIT_EDITOR=true git rebase --continue |
| Cherry-pick | git cherry-pick --continue --no-edit |
| Revert | git revert --continue --no-edit |
| Stash apply | git stash drop |
| Autostash re-apply | nothing to run — the git add is the completion (rebase already finished — never git rebase --continue here) |
| Manual / committed | nothing to run — the git add is the completion |
A rebase, or a cherry-pick or revert of a range, replays commits one at a time,
and any later commit can stop on its own conflict. When that happens the
continue command exits non-zero and prints CONFLICT (...) and
could not apply <sha>.... This is a normal stop, not a failure. The user asked
for the whole operation to be finished, so keep going:
git status; echo "=== UNMERGED ==="; git diff --name-only --diff-filter=U
rebase-merge/, rebase-apply/, CHERRY_PICK_HEAD,
REVERT_HEAD) → the operation is done. Go to the output.git show --stat REBASE_HEAD, or CHERRY_PICK_HEAD / REVERT_HEAD). Each
round has a different "theirs", so work out its intent again before you
resolve anything. For a rebase, git status shows progress
("Last commands done" / "Next commands to do").Empty after resolution: sometimes your resolution leaves the replayed commit
with no changes, because its change is already upstream. A default
(rebase-merge/) rebase drops that commit on its own and keeps going. Cherry-pick
and revert stop with "The previous cherry-pick is now empty", and a
rebase-apply/ rebase stops with "No changes". Once git diff --cached HEAD is
confirmed empty, run git cherry-pick --skip / git revert --skip /
git rebase --skip and continue the loop. A commit that still has changes must
never be skipped.
Guardrails — do not run these automatically:
git merge/rebase/cherry-pick/revert --abort) discard work. If
resolution isn't viable, stop and tell the user the abort command to run.git reset --hard (the stash abort path) discards work and nothing blocks
it — the user must run it themselves.exec step
failed. Do not force it through.## Conflict Resolution: {MERGE|REBASE|CHERRY-PICK|REVERT}
### Situation
- Operation: {type}
- Current branch: {branch}
- Incoming: {branch/commit}
### Conflicted Files ({count})
| File | Type | Complexity |
|------|------|------------|
| {path} | UU | {simple/moderate/complex} |
### Rounds (one per stop; a single row for merge/stash)
| # | Replayed commit | Files resolved | Result |
|---|-----------------|----------------|--------|
| 1 | {sha} {subject} | {paths} | {continued / next conflict / skipped empty / finished} |
### Completion
- Final state: {operation finished | stopped at round N: reason}
If resolution wasn't viable, abort manually:
- `{abort_command}`
Merge conflict on auth logic -- merge both sides:
/resolve-conflicts src/auth/session.ts
Detects a merge operation, reads the conflict markers in the session file, and determines that both sides added complementary validation checks. Recommends merging both changes together and produces a clean resolution that includes both validations.
Rebase conflict with inverted ours/theirs:
/resolve-conflicts
Detects a rebase operation and reminds that ours/theirs semantics are inverted during rebase. Walks through each conflicted file, explains what the rebased commit intended versus the target branch state, resolves the conflicts in the files, stages them, and runs GIT_EDITOR=true git rebase --continue. When the next commit stops on its own conflict (could not apply <sha>), it resolves that round the same way and keeps going until the rebase finishes. It then reports every round.
Autostash re-apply conflict after git pull --rebase:
/resolve-conflicts
Finds UU conflicts but no .git/rebase-merge sentinel. Instead of guessing, the gathering command's reflog shows pull --rebase finishing with a fast-forward and an autostash push, and git stash list still holds the autostash. Classifies this as an autostash re-apply conflict (rebase already complete), resolves the markers, runs git add — and does not try git rebase --continue.
Regenerate rather than manually resolve. Run:
git checkout --theirs package-lock.json # or --ours
npm install # regenerates lock file
git add package-lock.json
Accept one version and regenerate. Run:
git checkout --theirs <file>
# Run generation command
git add <file>
Usually keep one and incorporate changes from other manually.
Decide: should file exist or not? If yes, keep modified. If no, remove. Run the appropriate command:
# Keep the file (accept modification)
git add <file>
# Delete the file
git rm <file>
What SKILL.md sets; muted values are Claude Code's defaults
highOther plugins' skills for the same job
65 skills in this plugin
/blind-spotsSurface consequential decisions a plan, design, or research brief left silently assumed, by interviewing the user in dependency order. Use when the user says "blind spots", "grill me", "stress-test this plan", "poke holes in this", "what am I missing", "interrogate this design", "what haven't I decided", or needs a loose idea or research brief clarified before work begins. Do NOT use for a clear factual lookup, to explain a previous reply in more detail (use `huh`), to generate ideas when it is unclear what to build (use `ideation`), or to review an already-written plan with agents (use `review-plan`)./brainstormWork out how to solve a problem the user can already name — interview them with `blind-spots` to understand it, generate structurally different approaches, validate each with an independent critic, then present the survivors with trade-offs and a recommendation. Use when the user says "brainstorm", "brainstorm approaches", "how should we solve/approach/tackle X", "what are our options", "compare approaches", "think this through with me", or wants solutions weighed before committing. Works on any topic, with codebase recon when a repo is involved; `--debate` adds external advisors for high-stakes calls. Do NOT use when stuck on what to build or what the problem is (use `ideation`), to probe an already-chosen plan (use `blind-spots`), or to pick a library or service (use `evaluate-tech`).npx claudepluginhub nielsmadan/skills --plugin nlsmdn