---
name: merge-queue-readiness
description: Pre-queue merge-group CI simulation. Triggered before adding a PR to a GitHub merge queue. Prevents merge-queue kick-outs from integration test failures.
Merge Queue Readiness
Trigger
Before adding the PR to the merge queue (or before the final push if the repo uses a merge queue).
Protocol
Fetch latest main:git fetch origin main
Create temporary simulation worktree (do NOT mutate the PR branch):
Only after simulation passes, add PR to merge queue
Why this matters
PR-branch CI and merge-group CI test DIFFERENT things:
PR-branch: tests the PR head commit in isolation
Merge-group: tests a temporary merge of PR head + latest main
Integration tests that pass on the PR branch may fail in merge-group context due to test interactions exposed by the merged result.
Root cause
A swarm ci-simulate command would automate this (issue #1746 item 5). This playbook is the manual protocol.
1---2name: merge-queue-readiness-23description: ---4---5---6name: merge-queue-readiness7description: Pre-queue merge-group CI simulation. Triggered before adding a PR to a GitHub merge queue. Prevents merge-queue kick-outs from integration test failures.8---910# Merge Queue Readiness1112## Trigger13Before adding the PR to the merge queue (or before the final push if the repo uses a merge queue).1415## Protocol161. **Fetch latest main:** `git fetch origin main`172. **Create temporary simulation worktree (do NOT mutate the PR branch):**18 ```19 git worktree add /tmp/merge-sim origin/main20 cd /tmp/merge-sim21 git merge <pr-branch> --no-edit22 ```233. **Run integration + unit tests against the merged result:**24 ```25 bun test tests/integration --timeout 12000026 bun test tests/unit --timeout 12000027 ```28 (Use per-file loops for hot modules per AGENTS.md invariant 6)294. **If failures:** Fix on the PR branch, re-push, re-simulate305. **Cleanup:** `git worktree remove --force /tmp/merge-sim`316. **Only after simulation passes,** add PR to merge queue3233## Why this matters34PR-branch CI and merge-group CI test DIFFERENT things:35- PR-branch: tests the PR head commit in isolation36- Merge-group: tests a temporary merge of PR head + latest main3738Integration tests that pass on the PR branch may fail in merge-group context due to test interactions exposed by the merged result.3940## Root cause41A `swarm ci-simulate` command would automate this (issue #1746 item 5). This playbook is the manual protocol.
Run npx skillmds@latest add zaxbysauce/merge-queue-readiness-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
--- It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
zaxbysauce (@zaxbysauce) published this skill. Their other Agent Skills are listed on their SkillMD profile.