Help us improve
Share bugs, ideas, or general feedback.
From git-workflow
Analyze and resolve merge conflicts intelligently with automated test validation
npx claudepluginhub talent-factory/claude-plugins --plugin git-workflowHow this command is triggered — by the user, by Claude, or both
Slash command
/git-workflow:resolve-conflicts [PR-Nr|Branch] [--target develop] [--dry-run] [--no-tests] [--strategy ours|theirs|smart]This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Claude Command: Resolve Merge Conflicts Analyze and resolve merge conflicts intelligently with automatic root cause analysis, semantic code merging, and test validation. **All output and commit messages are written in German.** ## Usage Standard (merge current branch with target): With options: ## Parameters | Parameter | Description | Default | |-----------|-------------|---------| | `[Branch\|PR-Nr]` | Branch to merge or PR number | Current branch | | `--target` | Target branch to merge from | `develop` | | `--dry-run` | Analyze only, no changes | `false` | | `--no-tests` | S...
/fix-conflictsFixes all git merge conflicts in the working tree using three-way resolution, commits the result, continues operations if needed, and pushes to remote.
/fix-conflictResolves merge conflicts on a GitHub PR: checks status/reviews, checks out branch, merges or rebases, edits conflicted files, pushes, and verifies mergeability.
/fixprFixes failing PRs by reproducing failures locally, applying code fixes, verifying all tests pass, resolving merge conflicts, and pushing after GitHub CI confirmation.
Share bugs, ideas, or general feedback.
Analyze and resolve merge conflicts intelligently with automatic root cause analysis, semantic code merging, and test validation.
All output and commit messages are written in German.
Standard (merge current branch with target):
/git-workflow:resolve-conflicts
With options:
/git-workflow:resolve-conflicts --target develop # Target branch (default: develop)
/git-workflow:resolve-conflicts --dry-run # Analysis only, no changes
/git-workflow:resolve-conflicts --no-tests # Skip tests
/git-workflow:resolve-conflicts --strategy smart # Strategy: smart (default), ours, theirs
/git-workflow:resolve-conflicts feature/task-009 # Specify branch
/git-workflow:resolve-conflicts 42 # Specify PR number
| Parameter | Description | Default |
|---|---|---|
[Branch|PR-Nr] | Branch to merge or PR number | Current branch |
--target | Target branch to merge from | develop |
--dry-run | Analyze only, no changes | false |
--no-tests | Skip test execution | false |
--strategy | Resolution strategy: smart, ours, theirs | smart |
git rev-parse --show-toplevel and git worktree listgit status --porcelain
pyproject.toml / setup.py -> Pythonpackage.json -> Frontend/Nodepom.xml / build.gradle -> Java--target (default: develop)feature/task-009): Check out this branch42): Determine branch via gh pr view 42 --json headRefName -q .headRefName--target, --dry-run, --no-tests, --strategy# Update remote
git fetch origin
# Determine merge base
git merge-base HEAD origin/<target>
# Start non-destructive merge
git merge --no-commit --no-ff origin/<target>
git merge --abort), display message, donegit diff --name-only --diff-filter=UFor 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>Output:
File | Cause | Source | Risk
-------------------------------|---------------------|------------------|--------
src/api/auth/__init__.py | Import extension | task-006 + 007 | Low
src/api/routes/v1/__init__.py | Route registration | task-006 + 007 | Low
alembic/versions/... | Revision chain | task-003 | Medium
src/services/email.py | Logic change | task-007 | High
With --dry-run: After this step, execute git merge --abort and display report. DONE.
Conflicts are resolved in the following order (simple -> complex):
uv.lock, bun.lockb, package-lock.json)git checkout --theirs <lock-file>
Then regenerate the lock file:
uv lockbun install or npm installIf regeneration fails: HALT and inform user.
pyproject.toml, package.json, tsconfig.json)Depending on --strategy:
smart (default): Semantic analysis
ours: Keep our version on conflicts (git checkout --ours <file>)theirs: Keep their version on conflicts (git checkout --theirs <file>)down_revision chainalembic headsWhen a file has been fundamentally restructured (e.g., class split, API changed):
After resolving each file:
# No conflict markers remaining?
grep -rn "<<<<<<< \|======= \|>>>>>>> " <file>
# Python syntax valid?
python -c "import ast; ast.parse(open('<file>').read())"
# TypeScript/JavaScript syntax valid?
# (only check if tsc/node available)
If conflict markers found: Re-analyze and resolve the file. If syntax invalid: Display error and re-edit the file.
--no-tests)Based on detected project type:
# Python
uv run pytest
# Frontend
cd apps/web && bun run test:run
# Java
mvn test
# Python
uv run ruff check . --fix
uv run ruff format .
# Frontend
cd apps/web && bun run lint
If linting errors: Apply auto-fix; for remaining errors, inform user.
Output summary table:
Merge Conflict Report
=====================
Target: origin/develop -> feature/task-009
Conflicts: 4 files
Strategy: smart
File | Strategy | Rationale | Risk
-------------------------------|--------------|----------------------------------|--------
uv.lock | regenerated | Lock file regenerated | None
src/api/auth/__init__.py | smart/union | Imports from both tasks merged | Low
src/api/routes/v1/__init__.py | smart/union | Routes merged additively | Low
src/services/email.py | smart/ours | Our logic prioritized | Medium
Tests: 47 passed, 0 failed
Lint: No errors
git add <files>git commit -m "$(cat <<'EOF'
🔀 merge: Integrate develop into feature/task-009
Resolved conflicts in 4 files:
- auth/__init__.py: Import union from task-006 + task-007
- routes/v1/__init__.py: Route registration merged
- services/email.py: Logic merge prioritizing our changes
- uv.lock: Regenerated
EOF
)"
git push origin <branch>IMPORTANT: Commit messages do NOT contain automatic signatures (no Co-Authored-By, no Generated with Claude Code).
A merge is already active. Options:
1. Continue merge: git merge --continue
2. Abort merge: git merge --abort
Ask user which action is desired.
Branch 'origin/<target>' not found.
Available remote branches: git branch -r
No tracking branch set.
Set tracking: git branch --set-upstream-to=origin/<branch>
Lock file could not be regenerated.
Please run manually: uv lock / bun install
Then retry: /git-workflow:resolve-conflicts --no-tests
Tests failed after 2 repair attempts.
Failed tests:
- test_email_send: AssertionError (expected 200, got 404)
- test_auth_flow: ImportError (missing module)
Please review manually and then commit.
Merge status: All conflicts resolved, not committed.