/agent-almanac:resolve-git-conflictsfrom agent-almanac
Resolves merge, rebase, cherry-pick, and stash pop conflicts with safe recovery strategies. Covers identifying conflict sources, reading markers, choosing resolution strategies, and aborting operations.
Ships in agent-almanac. 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.
Identify, resolve, and recover from merge and rebase conflicts.
git merge or git rebase reports conflictsgit cherry-pick cannot apply cleanlygit pull results in conflicting changesgit stash pop conflicts with current working treeDetermine what operation caused the conflict:
# Check current status
git status
# Look for indicators:
# "You have unmerged paths" — merge conflict
# "rebase in progress" — rebase conflict
# "cherry-pick in progress" — cherry-pick conflict
The status output tells you which files have conflicts and what operation is in progress.
Expected: git status shows files listed under "Unmerged paths" and indicates the active operation.
On failure: If git status shows a clean tree but you expected conflicts, the operation may have already been completed or aborted. Check git log for recent activity.
Open each conflicting file and locate the conflict markers:
<<<<<<< HEAD
// Your current branch's version
const result = calculateWeightedMean(data, weights);
=======
// Incoming branch's version
const result = computeWeightedAverage(data, weights);
>>>>>>> feature/rename-functions
<<<<<<< HEAD to =======: Your current branch (or the branch you're rebasing onto)======= to >>>>>>>: The incoming changes (the branch being merged or the commit being applied)Expected: Each conflicting file contains one or more blocks with <<<<<<<, =======, and >>>>>>> markers.
On failure: If no markers are found but files show as conflicting, the conflict may be a binary file or a deleted-vs-modified conflict. Check git diff --name-only --diff-filter=U for the full list.
Manual merge (most common): Edit the file to combine both changes logically, then remove all conflict markers.
Accept ours (keep current branch's version):
# For a single file
git checkout --ours path/to/file.R
git add path/to/file.R
# For all conflicts
git checkout --ours .
git add -A
Accept theirs (keep incoming branch's version):
# For a single file
git checkout --theirs path/to/file.R
git add path/to/file.R
# For all conflicts
git checkout --theirs .
git add -A
Expected: After resolution, the file contains the correct merged content with no remaining conflict markers.
On failure: If you chose the wrong side, re-read the conflicting version from the merge base. During a merge, git checkout -m path/to/file re-creates the conflict markers so you can try again.
After editing each conflicting file:
# Stage the resolved file
git add path/to/resolved-file.R
# Check remaining conflicts
git status
Repeat for every file listed under "Unmerged paths".
Expected: All files move from "Unmerged paths" to "Changes to be committed". No conflict markers remain in any file.
On failure: If git add fails or markers remain, re-open the file and ensure all <<<<<<<, =======, and >>>>>>> lines are removed.
Once all conflicts are resolved:
For merge:
git commit
# Git auto-populates the merge commit message
For rebase:
git rebase --continue
# May encounter more conflicts on subsequent commits — repeat steps 2-4
For cherry-pick:
git cherry-pick --continue
For stash pop:
# Stash pop conflicts don't need a continue — just commit or reset
git add .
git commit -m "Apply stashed changes with conflict resolution"
Expected: The operation completes. git status shows a clean working tree (or moves to the next commit during rebase).
On failure: If the continue command fails, check git status for remaining unresolved files. All conflicts must be resolved before continuing.
If resolution is too complex or you chose the wrong approach, abort safely:
# Abort merge
git merge --abort
# Abort rebase
git rebase --abort
# Abort cherry-pick
git cherry-pick --abort
Expected: Repository returns to the state before the operation started. No data loss.
On failure: If abort fails (rare), check git reflog to find the commit before the operation and git reset --hard <commit> to restore it. Use with caution — this discards uncommitted changes.
After the operation completes:
# Verify clean working tree
git status
# Check that the merge/rebase result is correct
git log --oneline -5
git diff HEAD~1
# Run tests to confirm nothing is broken
# (language-specific: devtools::test(), npm test, cargo test, etc.)
Expected: Clean working tree, correct merge history, tests pass.
On failure: If tests fail after resolution, the merge may have introduced logical errors even though syntax conflicts are resolved. Review the diff carefully and fix.
<<<<<<<, =======, >>>>>>>) remain in any filegit status shows a clean working treegit log--ours or --theirs discards the other side entirely. Only use when you are certain one version is completely correct.--amend unless the rebase step specifically calls for it. Use git rebase --continue instead.git rebase --abort and git merge --abort discard all resolution work. Only abort if you want to start over.commit-changes - committing after conflict resolutionmanage-git-branches - branch workflows that lead to conflictsconfigure-git-repository - repository setup and merge strategiesWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
377 skills in this plugin
/adapt-architectureExecute structural metamorphosis using strangler fig migration, chrysalis phases, and interface preservation. Covers transformation planning, parallel running, progressive cutover, rollback design, and post-metamorphosis stabilization for system architecture evolution. Use when assess-form has classified the system as READY for transformation, when migrating from monolith to microservices, when replacing a core subsystem while dependents continue operating, or when any architectural change must be gradual rather than big-bang.
/adapticMaster skill composing the 5-step synoptic cycle for panoramic synthesis across multiple domains. Orchestrates meditate, expand-awareness, observe, awareness, integrate-gestalt, and express-insight into a coherent process that produces unified understanding rather than sequential compromise. Use when a problem genuinely spans 3+ domains and the interactions between domains matter more than depth in any one, when sequential analysis feels like compromise rather than integration, or before major architectural decisions affecting multiple stakeholders.
/add-puzzle-typeScaffold a new puzzle type across all 10+ pipeline integration points in jigsawR. Creates the core puzzle module, wires it into the unified pipeline (generation, positioning, rendering, adjacency), adds ggpuzzle geom/stat layers, updates DESCRIPTION and config.yml, extends the Shiny app, and creates a comprehensive test suite. Use when adding a completely new puzzle type to the package or following the 10-point integration checklist to ensure nothing is missed end-to-end.
Generated from the plugin's indexed repository (pjt222/agent-almanac) — no native marketplace selected
npx claudepluginhub p/pjt222-agent-almanacOther plugins' skills for the same job