merge-queue-readiness — скилл для Claude Code: проверка перед очередью
Скилл merge-queue-readiness проверяет результат слияния PR с актуальной main до добавления в GitHub merge queue. Помогает поймать сбои интеграционных тестов, которых не видно при проверке ветки PR отдельно.
MIT ★ 539 обновлён 2026-10-29
npx skills add ZaxbyHub/opencode-swarm --skill merge-queue-readiness -a claude-codeЧто делает merge-queue-readiness
Перед постановкой PR в очередь слияния скилл предлагает обновить main и запустить /swarm ci-simulate [<pr-ref>]. Команда проверяет объединённый результат в отдельном временном worktree: выполняет bun run typecheck, bun run lint, bun run build и полный запуск bun test, затем удаляет worktree. Если команды нет, инструкция описывает ручное слияние в отдельном worktree и запуск интеграционных и модульных тестов.
Проверка моделирует результат слияния PR с последней main, а не повторяет CI целиком: в ней нет его логики карантина и повторных запусков. Команда принимает необязательную ссылку на ветку PR, но не флаги --base и --head. Worktree нужно очистить и при ошибке; неудачное удаление следует показать пользователю и выполнить git worktree prune.
Какие задачи решает
- проверить объединение PR с актуальной
mainдо постановки в очередь - запустить локальные проверки на результате слияния
- найти сбой интеграционных тестов, возникающий только в merge-group
- удалить временный worktree после симуляции
Примеры запросов агенту
- Перед добавлением PR в очередь проверь его слияние с актуальной
main. - Запусти симуляцию для ветки
feature/loginперед финальным push. - Проверь результат слияния PR; если симуляция упадёт, очисти временный worktree.
Как установить merge-queue-readiness
1Через Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill merge-queue-readiness -a claude-code2Вручную: положить файлы
~/.claude/skills/merge-queue-readiness/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/merge-queue-readiness/
1Через Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill merge-queue-readiness -a codex2Вручную: положить файлы
.agents/skills/merge-queue-readiness/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill merge-queue-readiness -a cursor2Вручную: положить файлы
.cursor/skills/merge-queue-readiness/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install ZaxbyHub/opencode-swarm .opencode/skills/merge-queue-readiness2Вручную: положить файлы
.github/skills/merge-queue-readiness/SKILL.md1Через Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill merge-queue-readiness -a gemini-cli2Командой платформы
gemini skills install https://github.com/ZaxbyHub/opencode-swarm --path .opencode/skills/merge-queue-readinessВручную: положить файлы
.devin/skills/merge-queue-readiness/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill merge-queue-readiness -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о merge-queue-readiness
Как установить merge-queue-readiness в Claude Code?
Выполните npx skills add ZaxbyHub/opencode-swarm --skill merge-queue-readiness -a claude-code. Файл скилла появится по пути ~/.claude/skills/merge-queue-readiness/SKILL.md.
Что делает merge-queue-readiness?
Он помогает проверить PR вместе с последней main перед добавлением в GitHub merge queue. Основной способ запускает /swarm ci-simulate, а при недоступности команды описан ручной вариант.
Повторяет ли симуляция весь CI для merge-group?
Нет. Она запускает локальные проверки и полный bun test, но не воспроизводит карантин и повторы CI. Это сигнал перед слиянием, а не проверка полного соответствия CI.
Исходный текст
SKILL.md · MIT
--- 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. metadata: audience: swarm-plugin --- # 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 1. **Fetch latest main:** `git fetch origin main` 2. **Run the simulation command (preferred):** ``` /swarm ci-simulate [<pr-ref>] ``` The optional positional `<pr-ref>` is the PR branch/ref to simulate (defaults to the current branch). It does NOT accept `--base`/`--head` flags. The command runs fixed local gates: `bun run typecheck`, `bun run lint`, `bun run build`, then a full-batch `bun test`. It creates a temporary detached worktree under `os.tmpdir()/swarm-ci-simulate` (a SIBLING of the project root, not project-relative), merges the PR ref, runs the gate sequence, removes the worktree, and prunes metadata. It does not accept arbitrary shell commands and does NOT replicate CI's quarantine/retry semantics — it is a fast pre-merge signal, not a CI parity check. 3. **Manual fallback:** If the command is unavailable, create a temporary simulation worktree (do NOT mutate the PR branch). The default worktree base is a SIBLING of the project root (`<parent>/.swarm-worktrees/`), overridable via the `worktree_dir` config; on Windows, very long paths may be shortened to `os.tmpdir()/swwt/...`. Place the worktree under that base. Do NOT hardcode `/tmp` — it does not exist on Windows. ``` git worktree add ../.swarm-worktrees/merge-sim origin/main cd ../.swarm-worktrees/merge-sim git merge <pr-branch> --no-edit ``` 4. **Run integration + unit tests against the merged result:** ``` bun test tests/integration --timeout 120000 bun test tests/unit --timeout 120000 ``` (Use per-file loops for hot modules per AGENTS.md invariant 6) 5. **If failures:** Fix on the PR branch, re-push, re-simulate. Always run the cleanup step (6) before re-simulating or on any exit path — do not leave the simulation worktree behind. 6. **Cleanup for manual fallback (run on EVERY exit path, including failure):** Prefer non-force `git worktree remove ../.swarm-worktrees/merge-sim`. If the removal is blocked or fails, surface the block to the user (the worktree guard fails closed for safety) and run `git worktree prune`. 7. **Only after simulation passes,** add PR to the 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. ## Automation `/swarm ci-simulate` automates the merge-result worktree, merge, command run, worktree removal, and metadata prune. Use the manual protocol only when the command is unavailable or the repo needs bespoke setup.
© ZaxbyHub · MIT · ZaxbyHub/opencode-swarm