Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от freekmurze★ 1 019 звёзд на GitHub

Об этом скилле

Laravel Cloud ops

Two tools:

  • cloud CLI (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 ... --json masks env var values. --show-sensitive reveals them: only use it piped into a file (chmod 600) or a script, never into the conversation.
  • GET /buckets/{id}/keys and /bucket-keys/{id} return access_key_secret. Only print id, 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, deploying main with push to deploy. No staging unless asked.
  • Region closest to the users (eu-central-1 for 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, use POST /applications/<id>/avatar with multipart field avatar=@/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, then npm ci && npm run build, then php artisan optimize. Deploy command: php artisan migrate --force.
  • Cloud deletes node_modules after 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-512mb for plain sites. Apps that process images (Glide, media conversions on large originals) or run Statamic need flex-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:run runs 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 utf8mb4 and 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
Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить laravel-cloud-ops с