agentsclimarketplace

Pre merge conflict predictor

Skill ritesh31/claude-pre-merge-conflict-predictor/skills/pre-merge-conflict-predictor

Before opening a PR, predict potential merge conflicts by checking if your changed files overlap with other open PRs or branchesFrom its SKILL.md

Install
npx -y skills add ritesh31/claude-pre-merge-conflict-predictor --skill pre-merge-conflict-predictor

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.9 KB, 703 tokens by cl100k_base, as published. Nobody here has run it

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 "${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.

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:

# 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>

Then compare the diffs line by line.

3. Generate conflict report

Format the output exactly like this:


πŸ” Pre-Merge Conflict Report

Branch: your-branch-name Base: main Checked at: [timestamp]

Summary

PRAuthorRiskOverlapping Files
#12@aliceπŸ”΄ HIGHsrc/auth/login.ts
#15@bob🟑 MEDIUMsrc/utils/helpers.ts

Detail

PR #12 β€” [title] by @alice

Risk: πŸ”΄ HIGH

  • src/auth/login.ts β€” Both branches modify the validateToken() function. Line 45-67 in yours, line 52-71 in theirs. Likely hard conflict.

Suggested action: β†’ Talk to @alice before merging. Consider rebasing your branch on top of PR #12 first, or splitting your work.

PR #15 β€” [title] by @bob

Risk: 🟑 MEDIUM

  • src/utils/helpers.ts β€” You added a new function at line 89. Bob modified the formatDate() function at line 23. Likely auto-mergeable but verify.

Suggested action: β†’ Low urgency. Monitor for when PR #15 merges, then rebase.

4. Final recommendation

End with one of:

  • βœ… SAFE TO OPEN PR β€” no meaningful overlaps found
  • ⚠️ OPEN PR BUT COORDINATE β€” medium risks exist, flag in PR description
  • 🚫 RESOLVE FIRST β€” high-risk overlaps, talk to teammates before opening PR

Include names of teammates to coordinate with if relevant.

What ships with it: 2 files

10.8 KB alongside SKILL.md, 1 of them executable

Keep looking

Skills are one crate of 326,499. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.