laravel/deploying-laravel-cloud
Deploys and manages Laravel applications on Laravel Cloud using the `cloud` CLI. Use when the user wants to deploy an app, ship to cloud, create/manage environments, databases, caches, domains, instances, background processes, check billing/usage/spend, or any Laravel Cloud infrastructure. Triggers on deploy, ship, cloud management, environment setup, database provisioning, billing/usage queries, and similar cloud operations.
npx skills add https://github.com/laravel/agent-skills --skill deploying-laravel-cloud
composer global require laravel/cloud-cli
cloud auth -n
Commands follow a CRUD pattern: resource:list, resource:get, resource:create, resource:update, resource:delete.
Available resources: application, environment, instance, database-cluster, database, cache, bucket, domain, websocket-cluster, background-process, command, deployment.
Some resources have additional commands (e.g., domain:verify, database:open, instance:sizes, cache:types). Discover these via cloud -h.
Never hardcode command signatures. Always run cloud <command> -h to discover options at runtime.
Always add -n to every command — prevents the CLI from hanging.
Never use -q or --silent — they suppress all output.
Flag combos per operation:
:list, :get) → --json -n:create) → --json -n:update) → --json -n --force:delete) → -n --force (no --json)-n --force-n with all options passed explicitly (no --json)Determine the task and follow the matching path:
First deploy? → cloud ship -n (discover options via cloud ship -h)
Existing app? →
cloud repo:config
cloud deploy {app_name} {environment} -n --open
cloud deploy:monitor -n
Environment variables? → cloud environment:variables -n --force
Provision infrastructure? → cloud <resource>:create --json -n
Custom domain? → cloud domain:create --json -n then cloud domain:verify -n
For multi-step operations, see reference/checklists.md.
Not sure what the user needs? → ask them before running anything.
:list --json -n or :get --json -ncloud auth -nAlways run cloud deploy:monitor -n after every deploy. If it fails, show the user what went wrong before attempting a fix.
Delegate high-output operations to subagents (using the Task tool) to keep the main context window small. Only the summary comes back — verbose output stays in the subagent's context.
Delegate these to a subagent:
cloud deploy:monitor -n — deployment logs can be very longcloud deployment:get --json -n — full deployment detailscloud <resource>:list --json -n — listing many resources produces large JSONWebFetchKeep in the main context:
:create, :delete, :update — output is smallcloud deploy -n — you need the deployment ID immediatelyFollow exact steps:
Use your judgment:
Run PHP code directly in a Cloud environment:
cloud tinker {environment} --code='Your PHP code here' --timeout=60 -n
--code — PHP code to execute (required in non-interactive mode)--timeout — max seconds to wait for output (default: 60)The code must explicitly output results using echo, dump, or similar — expressions alone produce no output.
Always pass --code and -n to avoid interactive prompts.
Run shell commands on a Cloud environment:
cloud command:run {environment} --cmd='your command here' -n
--cmd — the command to run (required in non-interactive mode)--no-monitor — skip real-time output streaming--copy-output — copy output to clipboardReview past commands:
cloud command:list {environment} --json -n — list command historycloud command:get {commandId} --json -n — get details and output of a specific commandDelegate command:run to a subagent when output may be long.
View billing and usage for the current organization:
cloud usage --json -n
--period=current|previous|1|2|3 — billing period (default current; 1/2/3 are N periods back, max 3). Anything else errors out.--environment=<id> — filter usage to a single environment--detailed — include per-application, per-resource, and per-add-on breakdowns--json — machine-readable output (always pair with -n)Common queries:
cloud usage --json -n | jq '.currentSpendCents'cloud usage --period=previous --json -ncloud usage --environment=<id> --detailed --json -nAll amounts are in cents. Keys are camelCase at every level (e.g. currentSpendCents, bandwidth.allowanceBytes, databases[].totalCents, applications[].totalCostCents).
Delegate --detailed --json to a subagent — the payload includes every database, cache, bucket, websocket, and application and can get large.
~/.config/cloud/config.json — auth tokens and preferences.cloud/config.json — app and environment defaults (set by cloud repo:config)Laravel Cloud Docs: https://cloud.laravel.com/docs/llms.txt
When the user asks how something works or needs an explanation of a Laravel Cloud feature, fetch the docs from the URL above using WebFetch and use it to provide accurate answers.
cloud <command> -h for any command's optionscloud -h to discover commandsTake laravel/deploying-laravel-cloud from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.