git-plugin/skills/git-resolve-conflicts/SKILL.md
Resolve PR merge conflicts. Use when a PR has conflicts with its base branch, rebasing produces conflicts, or automated merges fail.
npx skillsauth add laurigates/claude-plugins git-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.
Resolve merge conflicts in pull requests automatically.
| Use this skill when... | Use git-ops agent instead when... | |------------------------|-----------------------------------| | PR has merge conflicts with base branch | Complex multi-branch rebase workflows | | Automated merge failed due to conflicts | Cherry-pick conflicts across many commits | | Config files (JSON, YAML) diverged | Conflicts require deep business logic understanding | | Base branch updates caused conflicts | Interactive rebase with squash/fixup needed |
git branch --show-currentgit status --porcelain=v2 --branchgit diff --name-only --diff-filter=Ugit log --format='%h %s' --max-count=5Parse these from $ARGUMENTS:
$1: PR number (if not provided, detect from current branch)--push: Push resolved conflicts after committingExecute this conflict resolution workflow:
gh pr view <number> --json headRefName,baseRefName,mergeablegh pr list --head $(git branch --show-current) --json number,baseRefName,mergeablegit fetch origin <base-branch>git merge origin/<base-branch> --no-ffFor each file listed by git diff --name-only --diff-filter=U:
<<<<<<<, =======, >>>>>>>)| File Type | Strategy | |-----------|----------| | JSON config (package.json, plugin.json, marketplace.json) | Merge objects/arrays, take higher versions | | YAML config | Merge keys from both sides | | Markdown (CHANGELOG, README) | Include content from both sides | | Source code | Integrate both changes preserving logic | | Lock files | Regenerate after resolving other conflicts |
git add <file><<<<<<<git commit --no-edit--push flag provided: git push origin <branch>Comment on the PR with resolution summary:
gh pr comment <number> --body "Merge conflicts with <base-branch> resolved automatically.
Resolved files:
- file1.json (merged entries from both sides)
- file2.md (combined changelog entries)
"
Abort with git merge --abort if:
--push after regenerating)| Context | Command |
|---------|---------|
| List conflicts | git diff --name-only --diff-filter=U |
| Conflict details | git diff --diff-filter=U |
| PR mergeable state | gh pr view N --json mergeable |
| Check markers remain | grep -rn '<<<<<<<' <files> |
| Porcelain status | git status --porcelain=v2 |
testing
Verify accumulated bug claims at upstream HEAD and dedup against trackers before filing issues. Use when filing upstream reports from backlogs, audit docs, or git-history findings.
documentation
Gate outward-bound text (upstream issues, docs, PR bodies) through isolated haiku fresh-reader critique before publishing. Use when an artifact must survive a reader with zero project context.
tools
Suggest improvements to SKILL.md content, descriptions, or tool config from eval results. Use when raising pass rates, fixing triggering, or iterating on a skill after evaluation.
tools
deadbranch CLI for stale-branch cleanup — dry-run preview, TUI or non-interactive delete, protects main/develop/WIP. Use when asked to clean up branches, prune branches, or remove stale branches.