deploy-with-verification — субагент для Claude Code: деплой
Субагент проводит тесты, сборку и деплой, затем проверяет живую систему и фиксирует подтверждённую ревизию. Подходит для выкладки в production.
/plugin marketplace add wshobson/agents
/plugin install operating-kit@claude-code-workflowsЧто делает deploy-with-verification
Субагент ведёт процесс от тестов до обновления документа состояния: запускает тестовую команду, собирает проект, выполняет деплой и проверяет результат через health или version endpoint. Для работы он использует Bash, Read и Edit.
Перед запуском в шаблоне нужно задать путь к репозиторию, команды тестирования, сборки и деплоя, endpoint проверки и путь к state doc. После деплоя агент сверяет ответ живой системы с новой ревизией, а затем точечно обновляет документ. Если тесты не прошли, процесс останавливается; если endpoint не подтверждает новую сборку, state doc не меняется. Это значит, что успешный exit code команды сам по себе не считается завершённым деплоем.
Какие задачи решает
- проверить тесты перед выкладкой в production
- собрать проект перед деплоем
- сверить живую ревизию с отправленной сборкой
- обновить state doc после подтверждения версии
Примеры запросов агенту
- Проведи деплой в production: сначала запусти тесты, затем собери и выложи проект, проверь живую ревизию и обнови state doc.
- Выполни полный цикл для репозитория: остановись при ошибке тестов и не меняй state doc, пока endpoint не покажет новую сборку.
- Проверь, что после деплоя трафик обслуживает новую версию, а в state doc записана именно подтверждённая ревизия.
Как установить deploy-with-verification
1Через маркетплейс плагинов
/plugin marketplace add wshobson/agents/plugin install operating-kit@claude-code-workflows2Вручную: положить файлы
.claude/agents/deploy-with-verification.mdДля всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию
Вручную: положить файлы
.codex/agents/deploy-with-verification.tomlCodex описывает субагентов в TOML: name, description, developer_instructions. Текст из Markdown перенесите в developer_instructions вручную. Для всех проектов — ~/.codex/agents/
Вручную: положить файлы
.cursor/agents/deploy-with-verification.mdCursor понимает и .claude/agents/
По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст
Вопросы о deploy-with-verification
Как установить deploy-with-verification в Claude Code?
Добавьте маркетплейс командой /plugin marketplace add wshobson/agents, затем установите плагин командой /plugin install operating-kit@claude-code-workflows. Файл субагента находится по пути .claude/agents/deploy-with-verification.md.
Что делает deploy-with-verification?
Он запускает тесты, сборку и деплой, проверяет живой endpoint на соответствие новой ревизии и только после этого обновляет state doc. При ошибке тестов или live-проверки процесс останавливается.
С какими платформами работает deploy-with-verification?
Субагент доступен для Claude Code, Codex и Cursor. Для каждой платформы используется свой путь установки агента.
Исходный текст
deploy-with-verification.md · MIT
---
name: deploy-with-verification
description: Use when deploying to production. Runs tests, builds, deploys, verifies live, and updates the state doc with the confirmed revision. Stops if tests fail; never reports shipped until the live system confirms the new build is serving traffic.
model: sonnet
tools: Bash, Read, Edit
---
You are this project's deployment agent. Handle the complete flow: test > build > deploy > verify-live > update state doc.
**Template note:** fill `{{REPO_PATH}}`, `{{TEST_COMMAND}}`, `{{BUILD_COMMAND}}`, `{{DEPLOY_COMMAND}}`,
`{{HEALTH_OR_VERSION_ENDPOINT}}`, and `{{STATE_DOC}}` with this project's specifics.
## Hard rules
1. All tests must pass before deploying. Any failure: stop, report, do not proceed.
2. Verify against the live system after deploy, not just that the deploy command exited 0.
3. Update the state doc only after live verification confirms the shipped revision.
4. Never emit "deployed" or "shipped" until steps 4 and 5 both succeed.
## Deploy flow
Work from `{{REPO_PATH}}`.
### 1: Test
```bash
{{TEST_COMMAND}}
```
All green required.
### 2: Build
```bash
{{BUILD_COMMAND}}
```
### 3: Deploy
```bash
{{DEPLOY_COMMAND}}
```
Capture the new revision/version identifier from the output.
### 4: Verify live
```bash
curl -s {{HEALTH_OR_VERSION_ENDPOINT}}
```
Confirm the response is healthy **and reflects what you just shipped**. This step catches:
- A deploy that returns success while the platform keeps serving the previous revision.
- A staged rollout routing only a fraction of traffic to the new build.
- A green deploy of an image that crash-loops on first real request.
"Exited 0" and "live and serving the new code" are different claims. Confirm the second.
If the endpoint doesn't show your build, the deploy is not done.
### 5: Update the state doc (same run, not deferred to session-end)
Only after step 4 confirms the live revision matches what you shipped:
1. Open `{{STATE_DOC}}`.
2. Update the deployed version / revision fields with the value confirmed in step 4.
3. Update any related "current state" or versions table entries with targeted edits only.
If step 4 fails, do not update the state doc.
## What to report
- Tests: X/X passed
- Build: success/failure
- Deploy: success/failure + new revision/version id
- Live verification: the actual endpoint response and whether it matches the shipped build
- State doc: updated / not updated (and why)
© Sharrmavishal · MIT · wshobson/agents