К основному содержанию
скилл CX Codex

deploy-steward — скилл для Claude Code: что делает и как установить

Скилл deploy-steward для Claude Code по очереди вливает готовые PR в main, проверяет CI, запускает деплой и создаёт задачи на починку при сбоях.

MIT ★ 937 обновлён 2026-10-29

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add SethGammon/Citadel
/plugin install citadel@citadel-local
Открыть на GitHub

Что делает deploy-steward

Скилл берёт пул готовых PR и превращает их в единый последовательный поток слияния. Запуск опирается на скрипт node scripts/deploy-steward.js. Он сканирует отчёты готовности в .planning/pr-readiness/ или принимает ссылки на PR через флаг --enqueue-pr. Очередь сохраняется в .planning/deploy-steward/queue.jsonl.

Скилл берёт блокировку .planning/deploy-steward/lease.lock. Это исключает гонку параллельных агентов за ветку main. Перед слиянием стюард проверяет статус PR через gh pr view, обновляет отставшую ветку, ждёт пайплайны и выполняет gh pr merge. При падении тестов или конфликте он создаёт тикет на починку в .planning/intake/ и останавливает работу.

Без авторизованной утилиты gh запуск не сработает. Стюард намеренно запрещает передачу сырых токенов и произвольные вызовы curl.

Какие задачи решает

  • выстроить безопасную очередь слияния нескольких PR без конфликтов
  • автоматически обновлять отставшие ветки перед запуском проверок
  • запускать команду деплоя строго после каждого успешного мерджа
  • создавать задачи на разбор ошибок при падении CI или конфликтах

Примеры запросов агенту

  • Просканируй готовые PR и запусти слияние очереди с деплоем через npm run deploy
  • Добавь пулл-реквест https://github.com/OWNER/REPO/pull/123 в очередь deploy-steward и выполни сухой прогон
  • Проверь статус очереди deploy-steward и запусти следующий кандидат в режиме merge-queue

Как установить deploy-steward

1Через маркетплейс плагинов

/plugin marketplace add SethGammon/Citadel
/plugin install citadel@citadel-local

Команда ставит плагин citadel целиком, со всеми его скиллами

2Через Skills CLI (Vercel)

npx skills add SethGammon/Citadel --skill deploy-steward -a claude-code

3Вручную: положить файлы

~/.claude/skills/deploy-steward/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/deploy-steward/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о deploy-steward

Как установить deploy-steward в Claude Code?

Выполните команду /plugin marketplace add SethGammon/Citadel, затем /plugin install citadel@citadel-local. Также можно установить через npx skills add SethGammon/Citadel --skill deploy-steward -a claude-code.

Что делает deploy-steward?

Он сериализует слияние готовых PR в основную ветку, исключая гонки между агентами. Стюард подтягивает изменения из main, ждёт прохождения CI, мерджит по одному PR за раз и может выполнять команду деплоя.

Что требуется для работы deploy-steward?

Необходима авторизованная утилита GitHub CLI (gh auth status) и директория .planning/pr-readiness/ либо явные ссылки на PR. Если в репозитории нет тестов, понадобится флаг --allow-no-checks.

Исходный текст

SKILL.md · MIT
---
name: deploy-steward
license: MIT
description: >-
  Mainline deploy steward. Consumes ready PRs, owns a lease on mainline landing,
  refreshes PR state, updates stale branches, waits for CI and deploy gates,
  merges or queues one candidate at a time, and opens repair tasks for failures.
user-invocable: true
auto-trigger: false
trigger_keywords:
  - deploy steward
  - deploy queue
  - merge steward
  - mainline steward
  - land prs
  - land PRs
  - deploy prs
  - deploy PRs
  - merge queue
  - release train
effort: high
last-updated: 2026-06-20
---

# /deploy-steward - Mainline Deploy Steward

You are the deploy steward. You serialize mainline landing for parallel agent work.
Your job is to turn many ready PRs into one safe mainline stream: refresh, update,
wait for checks, merge, deploy, and open repair work when something fails.

## When to Use

Use this when the user asks to:

- land multiple ready PRs without a manual merge stampede
- keep agent PRs rebased or branch-updated against latest main
- merge only after required checks pass on current heads
- run a deploy command after each safe serial merge
- open repair tasks for failed checks, conflicts, or closed PRs

Do not use this for code review quality findings; use `/review`. Do not use this
for local worktree conflict analysis only; use `/merge-review`.

## Required Inputs

The steward can start from either source:

- `.planning/pr-readiness/*.md` reports generated by `node scripts/pr-ready.js`
- explicit GitHub PR URLs passed with `--enqueue-pr`

If `.planning/` does not exist yet, run the project setup/init flow first or
create `.planning/pr-readiness/` before scanning. Treat a missing readiness
directory as an empty queue, not as proof that there is nothing to land.

The runtime requires:

- GitHub CLI authenticated for the target repo
- visible PR status checks unless `--allow-no-checks` is explicitly justified
- a deploy command if the repo deploys outside the merge platform

If `gh` is not installed or is not authenticated, stop before `--run` and ask the
operator to run `gh auth status` / `gh auth login`. Do not substitute raw tokens
or ad hoc curl commands inside the steward.

## Invocation Forms

```bash
node scripts/deploy-steward.js --scan
node scripts/deploy-steward.js --scan --run
node scripts/deploy-steward.js --run --deploy-command "npm run deploy"
node scripts/deploy-steward.js --enqueue-pr https://github.com/OWNER/REPO/pull/123 --run
node scripts/deploy-steward.js --run --merge-mode merge-queue
```

Use `--dry-run` before first live use on a repo:

```bash
node scripts/deploy-steward.js --scan --run --dry-run
```

## Protocol

### Phase 1 - Build the Queue

Run:

```bash
node scripts/deploy-steward.js --scan
```

This reads `.planning/pr-readiness`, writes `.planning/deploy-steward/queue.jsonl`,
and records each candidate as `ready`, `blocked`, or already terminal.

For ad hoc PRs:

```bash
node scripts/deploy-steward.js --enqueue-pr <url>
```

### Phase 2 - Acquire the Steward Lease

The run command acquires `.planning/deploy-steward/lease.lock` and mirrors the
lease to `.planning/deploy-steward/lease.json`. If another steward has an active
lease, stop instead of racing main.

Use `--force-lease` only after confirming the old holder is dead.

### Phase 3 - Process One Mainline Candidate at a Time

Run:

```bash
node scripts/deploy-steward.js --run
```

For each processable queue item, the steward:

1. Refreshes live PR state with `gh pr view`.
2. Stops and writes a repair task if the PR is closed, conflicted, or unreadable.
3. Updates the branch against its base when GitHub reports it is behind.
4. Waits when checks are pending.
5. Opens a repair task when checks fail.
6. Merges with `gh pr merge --<method> --match-head-commit <sha>` when checks pass.
7. Runs the optional deploy command after a successful serial merge.

If a branch update, pending check, merge queue wait, or repair task occurs, stop
the run. Rerun after the external state advances.

### Phase 4 - Deploy

For serial landing, pass the project deploy command:

```bash
node scripts/deploy-steward.js --run --deploy-command "npm run deploy"
```

If the repo uses GitHub merge queue, prefer:

```bash
node scripts/deploy-steward.js --run --merge-mode merge-queue
```

In merge-queue mode, the steward queues one PR with GitHub and marks it `landing`.
Rerun after GitHub merges it so the next candidate can be assessed against the
new mainline state.

## State Files

- `.planning/deploy-steward/queue.jsonl` - durable landing queue
- `.planning/deploy-steward/lease.json` - active steward lease mirror
- `.planning/deploy-steward/runs/latest.md` - latest steward report
- `.planning/intake/*deploy-steward*.md` - generated repair tasks

## Safety Rules

- Never let multiple steward runs merge into the same target at once.
- Never merge without a current PR refresh.
- Never merge a PR with failing or pending checks.
- Never merge a conflicted PR; create repair work instead.
- Never force-push a contributor branch from the steward.
- Use `--allow-no-checks` only when the repo truly has no CI.
- Use `--require-fresh-readiness` when local readiness reports must remain the
  source of truth; otherwise live GitHub checks are authoritative after branch
  refreshes.

## Fringe Cases

- **No `.planning/` directory**: stop setup and initialize Citadel state before
  writing queue or repair files.
- **No readiness reports**: report an empty queue; accept explicit `--enqueue-pr`
  URLs if the operator wants to seed the queue manually.
- **`gh` unavailable or unauthenticated**: do not run; surface the authentication
  problem and keep the queue unchanged.
- **PR already merged**: mark the queue item `landed` and continue to the next
  candidate.
- **PR closed without merge**: create a repair intake task and stop.
- **Branch is behind base**: update the PR branch, mark it waiting for checks,
  and stop until CI reruns.
- **Checks fail**: create a repair intake task and stop.
- **Checks pending**: keep the item queued and stop until the external state
  advances.
- **Merge conflict or dirty merge state**: create repair work; never merge or
  force-push from the steward.

## Quality Gates

- `node scripts/test-deploy-steward.js`
- `node scripts/skill-lint.js deploy-steward`
- `node scripts/test-routing-sync.js`
- `node scripts/test-all.js`

## Exit Protocol

Return the steward report and a handoff:

```text
---HANDOFF---
- Queue: <N> candidates in .planning/deploy-steward/queue.jsonl
- Last action: merged | updated-branch | waiting-for-checks | repair-needed | idle
- Report: .planning/deploy-steward/runs/latest.md
- Repair task: <path or none>
---
```

© SethGammon · MIT · SethGammon/Citadel

Похожие скиллы

Все скиллы по теме «Git и GitHub» →
ci-cd-patterns c0x12c Скилл ci-cd-patterns для Claude Code с шаблонами GitHub Actions, проверками в PR и деплоем. Запускается на каждом пуше, перезапускает упавшие тесты и следит за статусом workflow. CX Codex +1 ★ 111звёзд репо vercel-auto-deploy davila7 Хук vercel-auto-deploy запускает деплой в Vercel сразу после того, как Claude Code меняет файлы исходного кода в проекте. 454установок ship-error-handling Community Команда ship-error-handling помогает восстановить работу /ship после сбоев CI, конфликтов слияния, проблем деплоя и других ошибок публикации. CX Codex +1 ★ 2 003звёзд репо ship Community Команда ship проводит работу от коммита до продакшена: создаёт PR, ждёт CI и ревью, затем помогает слить и проверить деплой. CX Codex +1 ★ 2 003звёзд репо gh-pages-deploy aviz85 Скилл gh-pages-deploy для Claude Code и Codex публикует HTML/CSS/JS-проекты в GitHub Pages через gh. Создаёт для проекта общедоступный URL. CX Codex +1 313установок deploy shipshitdev Скилл deploy для Claude Code управляет выкаткой веб-приложений на стейджинг или в прод. Включается при запросах на релиз ветки и проверяет гейты качества. CX Codex +1 104установок

Из того же набора55

Весь набор →
live-preview Скилл live-preview делает скриншоты компонентов в процессе сборки, а не по готовности. Ловит регрессии вёрстки и невидимые блоки до того, как они уйдут дальше. CX Codex +1 ★ 937звёзд репо architect Скилл architect превращает PRD или описание задачи в архитектурный план с деревом файлов, моделью данных и фазами сборки. CX Codex +1 ★ 937звёзд репо cost Скилл cost показывает расход токенов и стоимость сессий, кампаний и периодов. Помогает понять, куда уходит бюджет и как меняется темп расходов. CX Codex +1 ★ 937звёзд репо merge-review Скилл merge-review проверяет очередь слияний от fleet-агентов, находит пересечения файлов между ветками и предлагает безопасный порядок merge перед тем, как принимать изменения в main. CX Codex +1 ★ 937звёзд репо prd Собирает PRD по описанию приложения: задаёт вопросы, определяет объём и технические решения. Документ можно передать Archon для разбиения на кампанию. CX Codex +1 ★ 937звёзд репо organize Скилл organize для аудита и исправления структуры проекта: проверяет, где лежат файлы, переносит их по конвенции и обновляет импорты. Код внутри файлов не трогает. CX Codex +1 ★ 937звёзд репо create-app Скилл create-app для Claude Code и Codex автоматизирует создание приложений по текстовому описанию. Он делит задачу на пять уровней и ведёт разработку через PRD, архитектуру и верификацию. CX Codex +1 ★ 937звёзд репо postmortem Скилл postmortem разбирает завершённую кампанию или инцидент по файлам проекта, телеметрии и истории Git. Помогает выяснить, что сломалось и что поймали защитные проверки. CX Codex +1 ★ 937звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой