post-merge-sync

Fast-forward the trunk, restore stashes, and generate a post-merge punch list.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ElvinOuyang/claude-skill-collection --skill post-merge-sync
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: post-merge-sync
Source: https://github.com/ElvinOuyang/claude-skill-collection/tree/main/plugins/workflow-toolkit/skills/post-merge-sync
Command: npx skills add https://github.com/ElvinOuyang/claude-skill-collection --skill post-merge-sync

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Post-merge workflows often leave developers with stale local branches, leftover stashes, and an unclear list of follow-ups after a PR lands on the trunk, causing silent drift and repeated manual cleanup.

Core Features & Use Cases

  • Safe trunk fast-forward: Detects the repo’s actual trunk branch, fetches/prunes, and fast-forwards the remote-trunk state without forceful history rewriting.
  • Stash-safe recovery: Stashes uncommitted work when needed and restores it on the originating feature branch or on a new branch—avoiding dangerous “stash pop on trunk” mistakes.
  • Merge-informed punch list: Scans the merged PR’s implications using living docs, rebasable open PRs, TODO/follow-up markers, and a merge-commit-based diff range to produce a quick “what’s left” summary.
  • Squash/rebase aware branch handling: Avoids unsafe deletion patterns and requires explicit opt-in before any force-delete when local-only commits may become unreachable.

Quick Start

After you merge a PR (e.g., “I just merged the OA signed PR into master”), run post-merge-sync to fast-forward the trunk safely, restore your WIP on the right branch, and generate a punch list of follow-ups implied by the merge.

Frequently Asked Questions about post-merge-sync

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

FAQPage Schema
How do I safely fast-forward my trunk branch after a pull request merge without losing local work?

To fast-forward your trunk branch after a pull request merge, stash uncommitted work, fetch and prune the remote, and fast-forward the trunk without forceful history rewriting, then restore WIP on the originating branch.

What is the best way to clean up stale local git branches after a squash merge?

Cleaning up stale local branches after a squash merge requires careful branch detection and conservative safeguards against force-deletion to prevent local-only commits from becoming unreachable.

How do I generate a follow-up punch list after merging a pull request?

Generate a follow-up punch list after merging a pull request by scanning the merge-commit-based diff range, living docs, rebasable open PRs, and TODO markers to produce a summary of remaining tasks.

Can I restore a git stash to a new branch instead of popping it on the trunk?

Yes, stash-safe recovery allows you to restore uncommitted work on the originating feature branch or a new branch, explicitly avoiding dangerous "stash pop on trunk" mistakes.

Does post-merge sync support rebase-merge scenarios with open PR dependencies?

Post-merge sync supports rebase-merge and squash-merge scenarios by detecting rebasable open PR dependencies and syncing the trunk state while applying non-destructive git operations.

Why should I avoid force-deleting local branches after a git pull request lands?

You should avoid force-deleting local branches after a git pull request lands because local-only commits may become unreachable, requiring explicit opt-in before any force-deletion to preserve history.