Skill dosyaları ·
Geri dönüş elde, canlıya çık
Ajanın onay beklemeden canlıya çıkabilmesi için on adımlık disiplin: yeşil kapı, sır taraması, kilit, önceden yazılmış geri dönüş sürümü, canlıda doğrulama.
İNDİRNe işe yarar
- Onay adımını kaldırır, disiplini kaldırmaz
- 'Deploy başarılı' çıktısını kanıt saymaz; değişen yüzeyi canlıda açtırır
- Bozulmada önce geri alır, sonra açıklar
Kurulum
Dosyayı projenin .claude/skills/<ad>/SKILL.md yoluna (ya da kişisel kullanım için ~/.claude/skills/<ad>/SKILL.md) koy. Claude Code açıklamadaki tetikleyiciyi görünce dosyayı kendisi yükler; Codex ve benzeri araçlarda içeriği AGENTS.md'ye ekleyebilirsin.
Dosya önizlemesi
---
name: deploy-with-rollback
description: Use for any production deploy an agent runs on its own. Removes the approval step but keeps the discipline - green gate, secret scan, lock, rollback id written down first, live verification after.
---
# Deploy with a rollback in hand
Letting an agent deploy without asking saves time. It only stays safe if the steps below run every single time. None of them cost the human anything, so none of them are optional.
## Before
1. **Gate is green.** Typecheck, lint, tests and build all pass on the exact commit you will ship. A red gate means no deploy. That is not a judgement call.
2. **Scan for secrets.** List the files in the commit range and look for env files, tokens and keys. Stop if you find one. Report the location, never the value.
3. **Take the lock.** If more than one job can deploy the same target, take a shared lock and release it when you finish, including on failure. A lock that is a directory (`mkdir` to take, `rmdir` to release) cannot be half-written.
4. **Write down the rollback id first.** Record the currently live version id before you deploy. If you cannot name the way back, do not go forward.
## Deploy
5. Ship from the canonical branch, not from a local working copy. What is live must be reproducible from the repo.
6. Deploy one change set at a time. Do not sweep someone else's pending work into your release.
## After
7. **Verify live.** "Deploy succeeded" in the log is not evidence. Open the changed surface with a cache-busting query and confirm the new behavior is what real users get.
8. **Check what you did not change.** Load two or three unrelated pages or endpoints. A deploy that fixes one route and breaks another is still a failed deploy.
9. **If something is broken, roll back first, explain second.** Do not debug on production while users wait.
10. **Leave a note.** New version id, previous version id, what you verified, what you could not verify.
## Still needs a human
Payments, auth changes, data deletion, irreversible migrations and force pushes. Faster deploys are not a reason to widen this list in the other direction.
---
From The Kai · thekai.co/library · Free to use and adapt.