merge-main

Merges the latest origin/main into a working branch and resolves conflicts before PR creation.

3|Updated Jun 7, 2026
One-click install
npx skills add https://github.com/MLShukai/ResoniteIO --skill merge-main-mlshukai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: merge-main
Source: https://github.com/MLShukai/ResoniteIO/tree/main/.agents/skills/merge-main
Command: npx skills add https://github.com/MLShukai/ResoniteIO --skill merge-main-mlshukai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Before opening a pull request, your working branch often falls behind main, causing stale diffs and surprise conflicts. This Skill provides a disciplined procedure to fetch the latest main, merge it into your branch, resolve conflicts safely, and verify the result so the PR diffs cleanly against an up-to-date base. ## Core Features & Use Cases - Pre-merge checks: Verifies the working tree is clean and you are not on the main branch before starting. - Guided conflict resolution: Walks through identifying conflicted files, preserving both sides' intent, and regenerating protobuf artifacts with just gen-proto when proto files conflict. - Post-merge verification: Runs just run (format, gen-proto, build, test, type check) to catch semantic breakage even when no textual conflict occurred. - Use Case: You finished a feature branch and are about to open a PR. Use this Skill to fetch origin/main, merge it in, resolve any conflicts, confirm all checks pass, then push and create the PR via the github-ops skill. ## Quick Start Ask the AI to sync the latest main into your current working branch and resolve any conflicts before creating the pull request.

Frequently Asked Questions about merge-main

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I merge the latest main into my feature branch before a PR?

Run git fetch origin main, check incoming commits with git log HEAD..origin/main, then run git merge origin/main from your feature branch. Resolve any conflicts, verify with your test suite, then push and create the PR.

Should I use merge or rebase to sync main into my branch?

This workflow uses merge by default because it preserves your branch's commit hashes and avoids force-pushing shared branches. Rebase rewrites history and requires --force-with-lease on pushed branches, so it is only used after confirming a specific reason.

How do I resolve git merge conflicts safely?

List conflicted files with git diff --name-only --diff-filter=U, then edit each file to remove conflict markers while preserving both sides' intent. Avoid blanket --ours or --theirs overwrites, stage resolved files, and run git merge --continue.

What should I do when protobuf files conflict during a merge?

Resolve the .proto source files manually, then rerun the code generation step (just gen-proto) to regenerate the generated outputs. Do not hand-edit generated files; let the generator overwrite them.

Why run tests after a merge with no conflicts?

A merge can be textually clean but semantically broken when main's changes and your changes interact logically. Running the full build and test suite after merging catches these semantic conflicts before the PR is opened.