laravel-cloud-ops
БесплатноБез исполняемых скриптовНе проверенDay-to-day Laravel Cloud operations with the `cloud` CLI and the Cloud REST API, plus the conventions for setting up a new Cloud app. Use when asked to create…
от freekmurze★ 1 019 звёзд на GitHubОб этом скилле
Laravel Cloud ops
Two tools:
cloudCLI (cloud list,cloud <command> --help). Most commands take an environment ID or name and support--json.- REST API, base
https://cloud.laravel.com/api, bearer token. Use it for things the CLI lacks.
cloudapi() { # usage: cloudapi METHOD PATH [non-secret JSON]
if [ -n "${3:-}" ]; then
printf '%s' "$3" | "$HOME/.dotfiles/bin/spatie-ops" request cloud "$1" "$2" --input -
else
"$HOME/.dotfiles/bin/spatie-ops" request cloud "$1" "$2"
fi
}
Read spatie-ops first for private authentication and safe API output. The helper uses the Cloud CLI login or a private 1Password reference; its response is wrapped in status and response. For sensitive payloads, construct JSON in memory and send it on stdin rather than passing secret values as shell arguments. Use --private-output or the in-memory client when automation needs unredacted data.
Never print secrets
cloud ... --jsonmasks env var values.--show-sensitivereveals them: only use it piped into a file (chmod 600) or a script, never into the conversation.GET /buckets/{id}/keysand/bucket-keys/{id}returnaccess_key_secret. Only printid,name,permission.- Before deleting env vars, save their values to a chmod 600 backup file without printing them.
- Any API response containing an environment can include its secret values, including a cache-purge response. Use the shared helper's redacted output instead of displaying raw HTTP JSON.
Setting up a new app (conventions)
The defaults we settled on after moving ~40 apps. Deviate only with a reason. For moving an existing site, follow the move-site-to-laravel-cloud skill; this section is the target setup.
Naming and source
- App name = primary domain (
example.com). Name the GitHub repo after the domain too. If you rename the repo later, point the app at it:PATCH /applications/<id>with{"repository":"org/example.com","source_control_provider_type":"github"}, then trigger a deploy to prove it works. - One environment,
production, deployingmainwith push to deploy. No staging unless asked. - Region closest to the users (
eu-central-1for Belgian sites). - Set the app icon (logo) in the dashboard so it is recognisable on the canvas.
- Icon uploads also support
cloud app:update <app> --avatar=/absolute/path/icon.png --force -n --fields=id,name,avatarUrl. If the CLI returns 422 for a valid PNG, usePOST /applications/<id>/avatarwith multipart fieldavatar=@/absolute/path/icon.png;type=image/png; explicitly setting the MIME type fixed the CLI upload failure. Keep the API token in RAM, pass headers through stdin, capture the response, and emit only the app ID/avatar URL because application responses can include environment values.
Runtime
- Latest Laravel and PHP 8.5. Upgrade old apps first rather than running legacy versions on Cloud.
- Build:
composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader, thennpm ci && npm run build, thenphp artisan optimize. Deploy command:php artisan migrate --force. - Cloud deletes
node_modulesafter the build. If PHP shells out to a Node tool at runtime (for example Shiki), install it into a separate directory during the build. - Compute: current-generation
flex-512mbfor plain sites. Apps that process images (Glide, media conversions on large originals) or run Statamic needflex-1gb; 512 MB runs out of memory. Hibernation on with a 1 minute idle timeout (Freek's current preference, backend acceptance verified 6 Oct 2026). See the size identifiers and upgrade procedure below. - Keep requests short. We hit a 20 s gateway timeout on cold, expensive pages and a hard limit on long downloads. Anything slow goes to a queued job; cache warm expensive pages before the DNS switch.
cloud command:runruns inside the web container. Heavy one-offs (cache warming, image generation, big imports) compete with web traffic and can OOM the app: dispatch them to the queue, and never run two in parallel.- Queues: Cloud managed queue on Flex (scales to zero, 90 s job cap). Remove Horizon. Split long jobs into chained or self-dispatching chunks.
- Scheduler: Cloud wakes the app for every cron expression, so a per-minute task means the app never sleeps. Prefer daily or hourly schedules.
- No headless Chromium on Cloud. Use Cloudflare Browser Rendering (REST
/browser-rendering/content) instead.
Database
- Internal and personal apps share one cluster per owner (one for the company's internal apps, one per person's hobby projects). Client sites always get their own cluster.
- MySQL Flex, smallest size,
suspend_seconds: 120, daily backups kept 7 days, public endpoint off (on only during an import). - Keep
utf8mb4and turn MySQL strict mode on. With strict mode off, values longer than a column (for example a 191-char string column) are silently truncated.
Storage
- Every bucket is attached to th
Установить laravel-cloud-ops в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл laravel-cloud-ops?
Day-to-day Laravel Cloud operations with the `cloud` CLI and the Cloud REST API, plus the conventions for setting up a new Cloud app. Use when asked to create or set up a new Cloud app or environment, look up a Cloud app or environment, read or set env vars, deploy or check a deployment, run tinker or an artisan command on Cloud, fix a stuck or failed domain, purge the edge cache, attach a bucket, check usage, cost or bandwidth, report which apps sleep or stay awake, change hibernation or instance size, configure a database cluster (suspend, backups, public endpoint), or set up deploy notifications.
Как установить скилл laravel-cloud-ops?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл laravel-cloud-ops запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic