deploy-app
Deploys a Kickoff-based Laravel application to its host by running `bin/deploy` over SSH, then verifies the release and knows what each way it can stop means…
от nasrulhazim★ 26 звёзд на GitHub
Установить deploy-app в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Deploy a Kickoff app
One command does the whole release. This skill is mostly about verifying it and knowing which failures matter — a deploy that prints a success line is not the same as a deploy that worked.
Before anything: establish the target
Never assume. Confirm these from the project's own docs (docs/04-deployment/), its
CLAUDE.md, or by asking:
| Host | SSH target and user |
| Path | application root on the host |
| Domain | public URL, for the health check |
| Branch | what production tracks (usually main) |
| Stack | web server, PHP-FPM, supervisor/Horizon, cron (scheduler) |
| Database | engine and whether it is local or managed |
If the project keeps this in a deployment doc, read it once and cache it in your answer — do not re-derive it every deploy.
Deploy
Check what would move first, then deploy:
ssh <user>@<host> 'cd <path> && git fetch origin <branch> --quiet \
&& echo "origin: $(git log --oneline -1 origin/<branch>)" \
&& echo "server: $(git log --oneline -1 HEAD)"'
ssh <user>@<host> 'cd <path> && ./bin/deploy -b <branch> 2>&1 | tail -60'
tail is deliberate: composer/npm output is long and the last 60 lines contain every decision
point.
Gotcha: Always pass
-b <branch>. With no-b,bin/deployfalls back to "latest tag" andgit describefails outright on a repository that has never been tagged.
What bin/deploy does, in order: pre-deploy database dump → artisan down → checked
git checkout/pull → composer install --no-dev → npm ci && npm run build → clear
config/route/view caches → migrate --force → operations --isolated → optimize →
horizon:terminate → chown to the web user → reload PHP-FPM → artisan up → health check,
with an automatic rollback to the previous commit if the health check does not pass.
Verify
Always run this afterwards. The script's own success line is not the whole story.
ssh <user>@<host> 'cd <path> && git rev-parse --short HEAD \
&& php artisan horizon:status \
&& curl -s -o /dev/null -w "login=%{http_code}\n" https://<domain>/login'
| Check | Expected |
|---|---|
git rev-parse --short HEAD |
matches origin/<branch> |
horizon:status |
Horizon is running. |
/login |
200 |
| deploy output | health check line, all 200 |
| migrations | either Nothing to migrate or the list of what ran |
Report the before/after commit, whether migrations ran, and the health line. If a migration ran, name it — CI usually exercises migrations only on SQLite, so the first run against the production engine is a real event.
When it stops
| Symptom | What happened | Do this |
|---|---|---|
ERROR: could not pull … nothing was deployed |
The guard fired correctly; nothing was touched and artisan up already ran. Usually a diverged tree or a transient network failure. |
SSH in, git status, resolve, re-run. Never git reset --hard without looking first. |
ERROR: deploy operations failed + site 503 |
An operations/* file threw. Maintenance mode is left on deliberately — a half-applied release must not go live. |
Fix the operation and re-run; or php artisan up if the effect actually landed. |
WARNING: Health check failed + Rollback completed to <sha> |
The script already rolled the code back and brought the site up. | Diagnose the failed release. Do not re-deploy the same commit blind. |
| Site 503, no deploy running | Left in maintenance mode. | ssh … 'cd <path> && php artisan up' |
git "detected dubious ownership" |
The tree is chowned to the web user while the deploy runs as root. | git config --global --add safe.directory <path> |
Gotcha: A deploy operation is not a console command.
Operationhas noline(),info()or$this->command— a progress message inside one throws after the work it was reporting already happened. The effects land, the command reports failure, the deploy stops, and production serves 503 over a change that actually succeeded. It also hides on a re-run, because by then the loop has nothing left to process and the throwing line is never reached. Keep operations silent. This is the single most common cause of the row above.
Production traps that have already cost time
.envis not the source of truth for settings the app stores in the database.App\Settings\MailSettingsoverlaysconfig('mail.*')at boot, so after anymigrate:freshthe mailer reverts to the seeded default (log) — andapp:test-send-mailthen exits 0 and writes tostorage/logswhile recording amail_historiesrow. Nothing distinguishes that from a delivered email. Checkconfig('mail.default'), neverenv('MAIL_MAILER').- Unquoted
.envvalues containing spaces break the entire file ("Failed to parse dotenv file") — not just that line. Quote anything with whitespace. - Some hosts block outbound SMTP on 25/465/587 (DigitalOcean
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/deploy-checklist.md
- references/rollback-playbook.md
FAQ
Что делает скилл deploy-app?
Deploys a Kickoff-based Laravel application to its host by running `bin/deploy` over SSH, then verifies the release and knows what each way it can stop means. Use this skill whenever the user asks to deploy an app, push the latest code to production, check what commit production is running, bring a site back up after a failed deploy, or roll back — "deploy latest", "deploy the app", "tolong deploy", "deploy latest dulu", "push to production", "apa commit dekat production", "site down after deploy", "keluarkan maintenance mode", "rollback production", "kenapa 503". Covers the deploy command and its flags, the post-deploy verification checklist, the recovery path for each failure mode, and the production traps that have already cost time. Does NOT cover provisioning a new host from bare metal (`bin/provision-host`), CI/CD pipeline design (`ci-cd-pipeline`), or writing deploy operations.
Как установить скилл deploy-app?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл deploy-app запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…