/claude-toolkit:deploy-appfrom claude-toolkit
Deploys a Kickoff-based Laravel app via SSH bin/deploy, verifies the release, and handles failure modes including rollback and maintenance mode.
Ships in claude-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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.
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.
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.
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.
| 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.
.env is not the source of truth for settings the app stores in the database.
App\Settings\MailSettings overlays config('mail.*') at boot, so after any
migrate:fresh the mailer reverts to the seeded default (log) — and app:test-send-mail
then exits 0 and writes to storage/logs while recording a mail_histories row. Nothing
distinguishes that from a delivered email. Check config('mail.default'), never
env('MAIL_MAILER')..env values containing spaces break the entire file ("Failed to parse dotenv
file") — not just that line. Quote anything with whitespace.--force. A production confirmation prompt with
no TTY cancels and exits 0 — that is how a migrate:fresh + seed leaves a migrated but
unseeded database with no superadmin and a caller that believes it succeeded.APP_KEY. It destroys every encrypted:array column with no recovery, and
invalidates every registered passkey (config/passkeys.php derives the WebAuthn user handle
secret from it unless PASSKEYS_USER_HANDLE_SECRET is pinned).config/horizon.php. A job dispatched with ->onConnection('database')
is invisible to a Horizon watching redis — it sits unclaimed in jobs while the UI reports
success. Both the scheduler and a worker on the right connection must be alive for the app to
do anything.A deploy request is a deploy request. Pre-existing non-fatal warnings in the output —
optimize failing at the view stage over a missing Blade component is the classic one, since
views simply run uncached and the site is fine — get mentioned once in the report and are
not chased. Do not turn "deploy latest" into a refactor.
docs/04-deployment/ — the project's own host reference, .env guide, backup/restore drillbin/provision-host — idempotent host provisioner for a new machinebin/backup-db / bin/backup-app — run before any risky releaseci-cd-pipeline skill — for the pipeline itself rather than a manual release| Rationalization | Reality |
|---|---|
| "It's a one-line change, no need for the checklist" | The checklist is short precisely so it survives one-line changes. Most bad deploys were small. |
| "The backup is probably fine" | An unverified backup is not a backup. Check the file size and the timestamp before you migrate. |
| "I'll run the migration and see what happens" | On production, "see what happens" is the plan for data loss. Classify it as additive or destructive first. |
| "Tests passed on main, so this commit is fine" | You are deploying a specific commit. Confirm the suite was green on that SHA. |
| "The queue will pick up the new code eventually" | Workers hold the class in memory. Without queue:restart they run the old code until they die. |
| "I'll fix forward, rolling back is messy" | Fixing forward under pressure ships a second untested change on top of a broken one. |
| "Maintenance mode is annoying for users" | A 503 for ninety seconds is less annoying than a half-migrated database. |
| "It deployed without errors, so it worked" | A successful deploy command and a working application are different claims. Load a real page. |
| "Let me just rotate APP_KEY to be safe" | That destroys every encrypted: column with no recovery, and invalidates every passkey. |
migrate:fresh, db:wipe, or --seed typed against a production hostqueue:restart skipped after a deploy that touched job classes.env keys added to the repo but never set on the hostAPP_KEY in the diffphp artisan about shows the expected env, drivers and versionsqueue:restart ran, and one real job was observed completingschedule:list matches cron| File | Read When |
|---|---|
references/deploy-checklist.md | Running a release — pre-flight, release steps, post-flight verification |
references/rollback-playbook.md | A release went wrong; deciding roll back vs fix forward, and how to do either |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub nasrulhazim/claude --plugin claude-toolkit43 skills in this plugin
/business-cardSVG business card designer that takes contact details and brand preferences, then produces 12 front design concepts with optional back designs, interactive HTML preview galleries, individual card showcases with front/back flip animation, and print-ready SVG exports with bleed area and crop marks. Supports horizontal and vertical orientations, six layout styles (minimal, corporate, creative, elegant, bold, tech), multiple color schemes, QR code placeholders, social media icons, and logo integration. Use this skill whenever the user asks to design a business card, create a name card, make visiting cards, or says "design business card", "buat kad bisnes", "create name card", "reka kad perniagaan", "design kad nama", "I need a business card for X".
/ci-cd-pipelineCI/CD pipeline builder for Laravel projects — extends Kickoff's existing GitHub Actions CI with continuous deployment pipelines (staging/production), Docker containerisation, secret management, and failure notifications. Generates Dockerfiles, docker-compose.yml, deployment configs for VPS via SSH, container registry push workflows, and leverages Kickoff's /bin scripts (deploy.sh, backup.sh, setup.sh) in automated workflows. Use this skill whenever the user asks to set up deployment pipelines, containerise a Laravel app, configure CD for staging or production, push Docker images to a registry, manage deployment secrets, add failure notifications to CI, or integrate /bin scripts with GitHub Actions. Triggers for requests like "set up CD pipeline", "deploy to staging automatically", "dockerise my Laravel app", "add Docker to my project", "push image to registry", "manage secrets in CI", "notify on failure", "extend CI with deployment", "setup deploy pipeline", "nak deploy guna GitHub Actions", "tambah Docker dalam project", "setup CD untuk staging", "nak auto deploy ke production", "dockerise Laravel app aku", "tambah notification kalau CI fail", "macam mana nak manage secrets dalam GitHub Actions", or "integrate bin scripts dengan CI". Assumes Laravel Kickoff as the baseline — GitHub Actions CI (Pint, PHPStan, Rector, Pest) and /bin scripts (deploy.sh, backup.sh) are already configured. This skill extends that baseline with CD, Docker, and deployment automation.
Other plugins' skills for the same job