sync-main

Rebase a session branch onto origin/main, resolve conflicts, force-push with lease, and update the linked PR.

9|Updated Jun 10, 2026
One-click install
npx skills add https://github.com/eventbalancer/agent-quorum --skill sync-main-eventbalancer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sync-main
Source: https://github.com/eventbalancer/agent-quorum/tree/main/.agents/skills/sync-main
Command: npx skills add https://github.com/eventbalancer/agent-quorum --skill sync-main-eventbalancer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Keeping a long-lived session branch current with origin/main requires a careful rebase, deliberate conflict resolution, a safe force-push, and PR metadata updates — a history-rewriting workflow that is error-prone when done ad hoc. ## Core Features & Use Cases - Guided rebase workflow: Fetches origin/main, measures divergence, replays commits with a structured conflict-resolution playbook that pins a source of truth and audits auto-merged files. - Safe history rewriting: Force-pushes only with --force-with-lease after running the verification floor (pnpm run check), and refuses to run on a dirty tree. - PR actualization: Updates the linked GitHub PR title, body, closing-issue reference, and draft status via gh so the PR reflects the rebased branch. - Use Case: After main has moved ahead while you worked on a session branch, run /sync-main to rebase your commits, resolve conflicts against the registry source of truth, verify with pnpm run check, force-push, and refresh the PR. ## Quick Start Ask the agent to run /sync-main to rebase the current session branch onto origin/main and update its linked pull request.

Frequently Asked Questions about sync-main

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

FAQPage Schema
How do I rebase a branch onto origin/main and update its pull request?

Run /sync-main: it fetches origin/main, replays your session commits with a structured conflict-resolution playbook, verifies with pnpm run check, force-pushes with --force-with-lease, and updates the linked PR title, body, and closing-issue reference via gh.

How do I resolve git rebase conflicts without losing either side's changes?

Pin a source of truth first (for example the registry module), then layer both sides' behavior instead of dropping one. Inspect all three stages with git show :1/:2/:3 <file>, audit auto-merged files, and trace signature changes to every caller before continuing the rebase.

Can I force-push safely after a rebase?

Yes, use git push --force-with-lease, which refuses to overwrite the remote if it moved since your last fetch. The skill never uses a bare --force and asks for confirmation before rewriting the remote branch.

Why does the rebase refuse to run on my branch?

The skill stops when the working tree is dirty, when the branch is main itself, or when a rebase is already in progress. Commit or stash your changes first, or resume the existing rebase's conflict loop instead of starting a new one.

What are the limitations of rebasing versus merging main into a branch?

Rebasing rewrites history, so it requires a force-push and care on shared branches; this skill never merges main into the branch. If you only want to append commits without rewriting history, use a merge-based shipping workflow instead.