deploy-landed — скилл для Claude Code: проверка, что деплой дошёл
Скилл проверяет, что на сервере работает именно нужный коммит, переменные окружения на месте и продукт выполняет свою работу. Пригодится после деплоя, рестарта или правки на сервере.
npx skills add avelikiy/great_cto --skill deploy-landed -a claude-codeЧто делает deploy-landed
Код возврата команды деплоя говорит только о том, что команда завершилась. Скилл deploy-landed заставляет агента доказать обратное: что новая версия действительно отдаётся, что её конфигурация доехала и что продукт жив. Внутри — четыре проверки, каждая с уликой: ревизия (тег или digest живого образа, id деплоя, время старта процесса и содержимое отдаваемого файла), конфигурация, функция и ошибки старта в логах.
До деплоя скилл смотрит, не правил ли кто-то сервер руками: git -C /srv/app status --porcelain покажет незакоммиченные изменения, git -C /srv/app log -1 --format=%H — что хост считает своей версией. Незакоммиченное либо коммитят, либо сообщают как дрейф. Переменные окружения в контейнере читаются из PID 1 (cat /proc/1/environ | tr '\0' '\n'), потому что docker exec env их не наследует — два ложных вывода «конфиг пропал» получаются именно так.
Отчёт заканчивается блоком DEPLOY-LANDED со строками revision, config, function и startup. Проверка, которую не удалось выполнить, помечается NOT CHECKED с причиной. Любой FAIL означает, что деплой не закончен, что бы ни напечатала команда. Для работы нужны Read, Bash и Grep.
Какие задачи решает
- убедиться, что после деплоя отдаётся нужный коммит, а не старый
- поймать правку, сделанную на сервере руками, до следующего
git pull - проверить, что переменные и секреты видны запущенному процессу
- отличить живой продукт от зелёного
/health - разобраться, почему после выката «ничего не обновилось»
Примеры запросов агенту
- Задеплой и докажи, что на проде крутится нужный коммит
- Проверь на проде: переменные окружения на месте, заказ создаётся?
- Почему не обновилось — прогони проверки deploy-landed и покажи отчёт
Как установить deploy-landed
1Через Skills CLI (Vercel)
npx skills add avelikiy/great_cto --skill deploy-landed -a claude-code2Вручную: положить файлы
~/.claude/skills/deploy-landed/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/deploy-landed/
1Через Skills CLI (Vercel)
npx skills add avelikiy/great_cto --skill deploy-landed -a codex2Вручную: положить файлы
.agents/skills/deploy-landed/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add avelikiy/great_cto --skill deploy-landed -a cursor2Вручную: положить файлы
.cursor/skills/deploy-landed/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install avelikiy/great_cto deploy-landed2Вручную: положить файлы
.github/skills/deploy-landed/SKILL.md1Через Skills CLI (Vercel)
npx skills add avelikiy/great_cto --skill deploy-landed -a gemini-cli2Командой платформы
gemini skills install https://github.com/avelikiy/great_cto --path skills/deploy-landedВручную: положить файлы
.devin/skills/deploy-landed/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add avelikiy/great_cto --skill deploy-landed -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о deploy-landed
Как установить deploy-landed в Claude Code?
Выполните npx skills add avelikiy/great_cto --skill deploy-landed -a claude-code. Скилл окажется в ~/.claude/skills/deploy-landed/SKILL.md.
Что делает deploy-landed?
Проверяет четыре вещи после деплоя: какая ревизия обслуживает запросы, есть ли у запущенного процесса нужные переменные, выполняет ли продукт свою работу и нет ли ошибок в логах с момента старта.
Чем это отличается от проверки /health?
Зелёный /health говорит лишь о том, что процесс поднят. Скилл требует запрос, который делает работу продукта и возвращает значение, сравнимое с известным.
Исходный текст
SKILL.md · MIT
---
name: deploy-landed
description: Prove a deploy landed — the served revision is the commit you meant, its env is present, and the product does its job — instead of trusting the deploy command's exit code. Also catches server drift before a pull or deploy. Use after any deploy, rollout, restart or server-side fix ("задеплой", "выкати", "проверь на проде", "почему не обновилось"). Loaded by devops, l3-support, infra-provisioner.
when_to_use: |
Apply when:
- you ran, or are about to report, a deploy, a rollout, a container restart, a hot-fix on a server
- the operator asks whether something is live, or says it "did not update" / "still broken"
- you are about to `git pull` or build on a server that someone may have patched by hand
Do NOT apply to:
- a change that does not reach a runtime (docs, tests only) — CI is the check there
effort: low
allowed-tools: Read, Bash, Grep
---
# deploy-landed — a deploy is done when the running thing is the thing you meant
A deploy command's exit code says the command finished. It does not say the new code
is serving, that its configuration arrived, or that the product works. Every trap
below produced a green exit and a broken or stale product on a real project:
| Trap | What happened |
|---|---|
| `git pull` failed, the build went on | The build succeeded from the **old** code and reported success |
| `nohup … &` | Exit 0 twice for a process that died at once |
| `docker exec` into a container | It does not inherit the entrypoint's env: two "config is missing" readings were false |
| `sed -i` / `docker cp` on a bind-mounted file | Replaced the inode; the container kept reading the old file |
| A fix applied only on the server | Lost on the next deploy — it was never in git |
| wrangler / Pages | `functions/` not deployed, `_headers` ignored, five deploys to notice |
| Prod behind SSO | Answers 401/302 to **every** path, including ones that do not exist — proves nothing about a route |
| `/health` green | For six hours while the engine made no trades |
## Before: is the server what git says it is?
Before pulling or building on a host someone can reach by hand:
```bash
git -C /srv/app status --porcelain # anything here is a patch that is not in git
git -C /srv/app log -1 --format=%H # what the host thinks it runs
```
Anything uncommitted on the host is either committed first or reported as drift — never
overwritten silently, and never left as the only copy of a fix.
## After: four checks, each with its evidence
1. **Revision.** What is serving equals the commit you meant.
- Cloud Run / k8s: the live revision's image tag or digest, then
`git merge-base --is-ancestor <commit> <image-tag-sha>`.
- Pages / Workers / Vercel: the deployment id and its commit.
- A plain host: the running process's start time is after the deploy, and the file
it serves has the new content (`grep` for a string the change introduced).
- A `/version` endpoint, when the app has one, beats all of the above.
2. **Configuration.** The variables and secrets the new code reads are present in the
**running process** — count them against the list the code expects. In a container,
read them from PID 1 (`cat /proc/1/environ | tr '\0' '\n'`), not from `docker exec env`.
After `--set-secrets`/`--set-env-vars`, check that the ones you did not name are still
there: those flags replace the whole set.
3. **Function.** One request that does the product's job and returns something you can
compare to a known value — an order created, a row written, a trade placed on paper.
A health endpoint proves the process is up, nothing more.
4. **Startup errors.** Logs for the new revision since it started, at WARNING and above.
Zero lines is a finding only if you saw the logs flowing at all.
## Report
End the deploy report with this block. A check you could not run is `NOT CHECKED` with
the reason — never omitted, never `PASS`.
```
DEPLOY-LANDED <service> @ <commit>
revision : PASS — serving <revision/deployment id> built from <sha>
config : PASS — 14/14 expected vars present in PID 1
function : PASS — POST /orders → 201, row id 8812 visible in DB
startup : PASS — 0 WARNING+ lines since 12:04:10
```
A FAIL in any line means the deploy is not done, whatever the command printed.
© avelikiy · MIT · avelikiy/great_cto