plugins/git-workflow/skills/resolve-conflicts/SKILL.md
Analyses and resolves Git merge conflicts intelligently using semantic code merging, automated test validation, and root-cause analysis of each conflict. Activate when the user says "I have merge conflicts", "help me resolve these conflicts", "there are conflicts after merging", "git merge failed", or "conflicts between my branch and develop". Supports --dry-run, --no-tests, and --strategy options.
npx skillsauth add talent-factory/claude-plugins 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.
Analyse and resolve Git merge conflicts with semantic merging, automatic test
validation, and a structured report. Uses strategy smart by default.
| Parameter | Default | Description |
|---|---|---|
| [branch\|PR-number] | current branch | Branch to merge or PR number to resolve |
| --target <branch> | develop | Target branch to merge from |
| --dry-run | false | Analyse only — no file changes |
| --no-tests | false | Skip test execution |
| --strategy smart\|ours\|theirs | smart | Resolution strategy |
git worktree list)git status --porcelain)
pyproject.toml → Python; package.json → Frontend; pom.xml / build.gradle → Java--targetgh pr view <N> --json headRefName -q .headRefNamegit fetch origin
git merge-base HEAD origin/<target>
git merge --no-commit --no-ff origin/<target>
If no conflicts → abort merge, report "No conflicts found", done.
Collect conflicting files: git diff --name-only --diff-filter=U
Output a table: file | conflict type | risk level.
For each conflict file:
git diff <merge-base>..HEAD -- <file> (our changes)git diff <merge-base>..origin/<target> -- <file> (their changes)git log --oneline <merge-base>..origin/<target> -- <file>With --dry-run: abort merge here and display analysis report. Done.
5a — Lock files (uv.lock, package-lock.json, bun.lockb):
git checkout --theirs <lock-file>
# Then regenerate: uv lock | bun install | npm install
Halt if regeneration fails.
5b — Configuration files (pyproject.toml, package.json):
Merge dependency lists as a union; remove duplicates; prefer higher version.
5c — Source code (depends on --strategy):
smart: Merge import blocks as union; keep additive changes from both sides; for same-location edits, prioritise our logic and integrate their changesours: git checkout --ours <file>theirs: git checkout --theirs <file>5d — Alembic migrations: Linearise down_revision chain; create a merge migration if multiple heads result.
5e — Architectural conflicts (file fundamentally restructured): Halt and ask the user how to proceed. Show both versions. Continue only after explicit decision.
5f — Test files: Merge both suites; keep fixtures from both sides; ask on duplicate test names.
grep -n "<<<<<<< \|======= \|>>>>>>> " <file> # must be empty
python -c "import ast; ast.parse(open('<file>').read())" # Python only
Re-analyse and re-resolve any file that still has markers or syntax errors.
--no-tests)| Project type | Command |
|---|---|
| Python | uv run pytest |
| Frontend | bun run test:run (or npm test) |
| Java | mvn test (or ./gradlew test) |
If tests fail: attempt up to 2 repair cycles. After that, halt and report failing tests with full error output.
# Python
uv run ruff check . --fix && uv run ruff format .
# Frontend
bun run lint (or npm run lint)
Merge Conflict Report
=====================
Target: origin/develop → feature/my-branch
Conflicts: N files
Strategy: smart
File | Strategy | Rationale | Risk
-------------------------|--------------|------------------------|------
uv.lock | regenerated | Lock file regenerated | None
src/api/auth/__init__.py | smart/union | Import lists merged | Low
src/services/email.py | smart/ours | Logic conflict, manual | Med
Tests: 47 passed, 0 failed
Lint: No errors
git add <resolved-files>
git commit -m "🔀 merge: Integrate <target> into <branch>
Resolved conflicts in N files:
- <file>: <brief rationale>
..."
Offer to push (git push origin <branch>) and wait for the user's confirmation.
| Situation | Message |
|---|---|
| Uncommitted changes present | Halt: "Please commit or stash your changes first." |
| Merge already active | "A merge is already in progress. Continue (git merge --continue) or abort (git merge --abort)?" |
| No remote branch | "Branch origin/<target> not found. Available: git branch -r" |
| Lock regeneration failed | "Lock file regeneration failed. Run manually: uv lock / bun install" |
| Tests failed after 2 attempts | Show failing test names, exit without committing |
../references/resolve-conflicts/strategies.md — Strategy comparison and when to choose each../references/resolve-conflicts/best-practices.md — Best practices for conflict-free branching../references/resolve-conflicts/troubleshooting.md — Common failure modes and fixesdocumentation
Creates comprehensive handoff documentation before a /compact operation, enabling a new agent with fresh context to seamlessly continue the work. Activate when the user says "prepare a handoff", "document before compact", "context is getting too large", "I need to hand this off", "create a handoff document", "end of session notes", or "document the current state for tomorrow". Supports --output and --linear-issue options.
documentation
Collects completed tasks, GitHub activity, calendar meetings, wiki learnings, and Linear progress for the past week, then writes a structured retrospective to the Obsidian vault. Activate when the user runs "/weekly-review", asks "what did I accomplish this week", "weekly retrospective", "summarise my week", or "prepare weekly review". Works from any directory.
development
Produces a prioritised daily briefing by aggregating tasks from Obsidian TaskNotes, Google Calendar, Gmail, Linear, and GitHub, then writes the result to today's daily note in the Obsidian vault. Activate when the user runs "/today", asks "what's on my plate today", "give me my daily briefing", "what do I need to do today", or "morning briefing". Works from any directory without requiring Obsidian to be running.
tools
Provides a quick status snapshot of all GitHub repositories in a configured organisation — active, dormant, stalled — plus open pull requests and issues. Terminal output only, optimised for speed. Activate when the user runs "/project-pulse", asks "what is the status of my GitHub projects", "show me my repos", "which projects are active", "project overview", "GitHub pulse", or "what is happening in [org]". Works from any directory.