fix-merge-conflicts
Skill19 starsChanged 2 months agoMITView on GitHub
Resolve merge conflicts non-interactively, validate build and tests, and finalize conflict resolution
- Installs packages
- Commits and pushes
We split this skill into the rules it gives an agent
7 rules. 1 is common, 3 are distinctive, and 3 are very specific to this project.
1
Common
Most of the 9 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 32
Detect conflicts: Run git status --porcelain and scan for UU/AA/DD/U* markers.
- Distinctive: line 38
Validate: Run compile, lint, and the most relevant tests for the touched areas.
- Common: line 54
Keep changes minimal and readable.
- Very specific: line 55
Do not leave conflict markers (<<<<<<<, =======, >>>>>>>) in any file.
- Distinctive: line 56
Avoid broad refactors while resolving conflicts — only what is needed to make the merge buildable.
- Very specific: line 57
Do not push, tag, or force-push during conflict resolution.
- Distinctive: line 58
Do not hand-edit lockfiles.
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fix Merge Conflicts
Resolve merge conflicts non-interactively and return the branch to a buildable state.
When to use
git statusshowsUnmerged pathsorCONFLICT, or the branch reports merge conflicts againstmain.- User asks to "fix merge conflicts", "resolve conflicts", "rebase and fix", or "make this branch mergeable".
- A PR is blocked by conflicts after pulling main.
Prerequisites
- Inside a Git repository with write access (
git statusworks). - Conflicts come from a merge or rebase (e.g.
git merge main,git pull --rebase,gh pr update-branch). - Toolchain available for validation: package manager (
npm/yarn/pnpm/bun/uv/cargo/etc.) andgit.
Workflow
- Detect conflicts. Run
git status --porcelainand scan forUU/AA/DD/U*markers. Confirm withgrep -r "<<<<<<< " --include="*.md" --include="*.ts" --include="*.js" --include="*.py" --include="*.v" --include="*.yaml" --include="*.json" -l(andgit diff --checkfor leftover markers). List every conflicting file. - Resolve each conflict with minimal, correctness-first edits. Open each file, read the
<<<<<<< / ======= / >>>>>>>hunks, and choose the merge that compiles and preserves public behavior. Prefer preserving both sides when safe; otherwise pick the variant that keeps the build green and does not change external API semantics. Keep edits readable — no broad refactors while resolving. - Regenerate lockfiles via the package manager — do not hand-edit. If a lockfile is conflicted (
package-lock.json,yarn.lock,pnpm-lock.yaml,bun.lockb,Cargo.lock,uv.lock,go.sum,Gemfile.lock, etc.), discard conflict markers and regenerate:npm install --package-lock-only,yarn install,pnpm install,bun install,cargo update --workspace,uv lock, or the repo's documented install command. Confirm the manager that owns the file (checkpackage.jsonpackageManager,Makefile, orREADME.md). - Validate. Run compile, lint, and the most relevant tests for the touched areas. At minimum:
Re-run until the working tree is clean of markers and the build succeeds.git diff --check # no leftover markers / whitespace issues # then per-stack, e.g.: # npm run build / cargo check / v vet / make build # npm run lint / ruff check . / ./scripts/validate-skills.vsh # npm test -- <changed packages> / pytest -q <changed modules> - Stage and finalize.
git add <resolved files>thengit statusto confirm no remainingUnmergedpaths. If a rebase/merge was in progress, rungit rebase --continueorgit commitas appropriate (nogit pushorgit tagfrom this skill — delegate togithub-cli-workflow). - Summarize decisions. Report: files resolved, notable resolution choices (why each hunk was kept/merged), lockfile regeneration performed, and build/test outcome with next action.
Guardrails
- Keep changes minimal and readable.
- Do not leave conflict markers (
<<<<<<<,=======,>>>>>>>) in any file. - Avoid broad refactors while resolving conflicts — only what is needed to make the merge buildable.
- Do not push, tag, or force-push during conflict resolution. Delegate pushes to
github-cli-workflowafter user confirmation. - Do not hand-edit lockfiles; always regenerate via the owning package manager.
Output
- Files resolved (with hunk-level rationale where non-trivial)
- Notable resolution choices
- Build/lint/test outcome
- Next step (continue rebase / commit / push via
github-cli-workflow)
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 6
- Scino/fstack★ 1827% same
- cogine-ai/cogine-dev-skillset★ 429% same
- dhanji4U/skills★ 225% same
- jaydubya818/MissionControl★ 216% same
- ElyzeSolutions/skills★ 129% same
- ArchitektApx/cursor-skills-for-claude★ 029% same
Wrote their own version · 3
- cashew-labs/libretto★ 898same name
- saffron-health/libretto★ 883same name
- RoyBkker/agent-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use check-compiler-errors, new-branch-and-pr and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
cogine-aiSkillcheck-compiler-errors
Run compile and type-check commands and report failures
Also in 3 projects that use this
cogine-aiSkillnew-branch-and-pr
Create a fresh branch, complete work, and open a pull request
Also in 3 projects that use this
MicrosoftSkillrun-smoke-tests
Run smoke tests to verify extension functionality in a real VS Code environment. Use this when checking if basic features work after changes.
Also in 3 projects that use this
- +1 more from cogine-ai
In this repository106 other files it gives its agents.
- AGENTS.mdAGENTS.md
- reviewSkill
- mcp-auditSkill
- owasp-agentic-reviewSkill
- supply-chain-auditSkill
- threat-modelingSkill
- architecture-diagramSkill
- c4-modelSkill
- aws-well-architected-reviewSkill
- cloud-design-patternsSkill
- assistantSkill
- dev-companionSkill
- onboardingSkill
- output-handshakeSkill
- pr-fallbackSkill
- projectSkill
- workspace-knowledge-syncSkill
- workspaceSkill
- dbt-validationSkill
- snowflake-validationSkill
- adrSkill
- agreementSkill
- bugSkill
- decision-logSkill
- development-workflowSkill
- epicSkill
- incidentSkill
- management-unit-assessmentSkill
- meeting-minutesSkill
- planningSkill
- prdSkill
- project-assessment-evidenceSkill
- project-assessmentSkill
- spikeSkill
- taskSkill
- technical-unit-assessmentSkill
- trdSkill
- user-storySkill
- workflow-client-bootstrapSkill
- workflow-generic-projectSkill
- work-itemSkill
- bragSkill
- brag-slimSkill
- design-assessmentSkill
- design-improvementSkill
- figma-code-connect-componentsSkill
- figma-create-design-system-rulesSkill
- figma-create-new-fileSkill
- figma-implement-designSkill
- figmaSkill
- frontend-design-reviewSkill
- frontend-designSkill
- scroll-worldSkill
- web-design-guidelinesSkill
- gh-address-commentsSkill
- gh-contribution-plannerSkill
- gh-fix-ciSkill
- github-cli-workflowSkill
- gitlab-cli-workflowSkill
- worktreeSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

