merge-stack

Merge multi-PR chains bottom-up with squash strategy and retargeting.

Updated Apr 17, 2026
One-click install
npx skills add https://github.com/smallorbit/smallorbit-plugins --skill merge-stack-smallorbit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: merge-stack
Source: https://github.com/smallorbit/smallorbit-plugins/tree/main/plugins/swarmkit/skills/merge-stack
Command: npx skills add https://github.com/smallorbit/smallorbit-plugins --skill merge-stack-smallorbit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Merges multiple swarm PRs bottom-up with a safe, squash-based history by retargeting non-root PRs to the base branch and applying uniform merges that close references predictably.

Core Features & Use Cases

  • Bottom-up merge sequencing: root PRs merge first, then their descendants.
  • Retarget non-root PRs to the base branch before merging to neutralize auto-close cascades.
  • Rebase downstream branches after each merge and force-push to maintain a clean, consistent history.
  • Handle multi-PR chains across a base branch (e.g., develop) and also accommodate independent PRs.
  • Provide an auditable plan and robust conflict handling guidance, including blocking in case of conflicts.

Quick Start

Trigger the merge-stack workflow to process all open swarm PRs in bottom-up order.

Frequently Asked Questions about merge-stack

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

FAQPage Schema
How do I merge multiple pull request chains bottom-up with squash?

Bottom-up merge sequencing merges root PRs first, then descendants. The workflow retargets non-root PRs to the base branch, applies per-PR squash merges, rebases downstream branches, and force-pushes to maintain a clean history.

Why do my dependent pull requests close automatically when the base PR merges?

Retargeting non-root PRs to the base branch before merging neutralizes auto-close cascades. This prevents dependent pull requests from closing automatically when their parent branch merges into the base.

What is the best way to rebase downstream branches after a squash merge?

After each per-PR squash merge, the workflow automatically rebases downstream branches and force-pushes them. This maintains a consistent history across the entire multi-PR chain.

How does conflict handling work when merging a swarm of pull requests?

Conflict handling blocks the merge process when issues arise. The workflow validates mergeability before each step and provides robust guidance, blocking execution in case of conflicts to ensure an auditable history.

Can I use squash merges for independent pull requests on the same base branch?

The workflow handles multi-PR chains across a base branch and accommodates independent PRs. It sequences all open swarm PRs in bottom-up order, applying uniform squash merges that close references predictably.