stack-merge

Installation
SKILL.md

Stack Merge

Land an entire Graphite downstack into main in one admin-bypass fast-forward push, then close every in-scope PR explicitly. No per-PR CI gates, no merge commits on main, no gh pr merge per PR. PRs end up in Closed state (not MERGED) unless their base was already main, but their commits are in main's history.

This skill replaces Graphite's merge queue — use when you want the outcome Graphite's queue produces (linear history, all PRs merged) but without waiting for the queue. Requires admin bypass on main branch protection.

When NOT to use

  • User wants normal single-PR merge → use gh pr merge.
  • User isn't a repo admin → push will reject (tell them to use Graphite's queue).
  • Stack tip has failing CI and user cares → queue would refuse; pause here too.

Preconditions (verify at start; bail early)

  1. Admin/bypass on main: gh api repos/rivet-dev/rivet/branches/main/protection — check user is in bypass_pull_request_allowances.users[] or has repo admin. If not, stop.
  2. Graphite initialized: gt ls succeeds.
  3. Clean working tree: git status --short empty. In-flight rebase/merge state must be resolved first.
  4. Worktree sanity: git worktree list — prune any prunable entries with git worktree prune. Stale worktrees break rebases with "already checked out at" errors. See references/gotchas.md.
Installs
1
Repository
rivet-dev/rivet
GitHub Stars
5.7K
First Seen
Jul 3, 2026
stack-merge — rivet-dev/rivet