← ClaudeAtlas

pre-merge-conflict-predictorlisted

Before opening a PR, predict potential merge conflicts by checking if your changed files overlap with other open PRs or branches
ritesh31/claude-pre-merge-conflict-predictor · ★ 1 · Code & Development · score 67
Install: claude install-skill ritesh31/claude-pre-merge-conflict-predictor
# Pre-Merge Conflict Predictor ## Purpose Detect potential merge conflicts BEFORE a PR is opened, while they are still easy to resolve. ## When to use - Before running `gh pr create` - After finishing a feature branch and before pushing - When you suspect overlap with a teammate's work ## Steps Claude should follow ### 1. Run the detection script ```bash bash "${CLAUDE_PLUGIN_ROOT}/skills/pre-merge-conflict-predictor/check-conflicts.sh" main ``` Capture full output for analysis. Only open PRs whose base branch matches the one passed in (`main` above) are checked. Draft PRs are skipped by default — set `INCLUDE_DRAFTS=1` as an env var before the command to include them. The script picks up committed, staged, unstaged, and untracked changes on your branch — no commit is required before running it, so it can be used iteratively while you're still working. ### 2. Analyze each overlap — determine REAL risk vs safe overlap Not all file overlaps are real conflicts. Classify each one: **HIGH RISK (🔴)** — same function/class modified in both branches **MEDIUM RISK (🟡)** — same file, different sections **LOW RISK (🟢)** — same file but only imports/comments/formatting touched **SAFE (✅)** — file renamed or only one side touched it meaningfully To determine risk level, for each overlapping file run: ```bash # See what YOUR branch changed in that file git diff main...HEAD -- <filename> # See what the OTHER PR changed in that file gh pr diff <PR_NUMBER> -- <filename> ``` T