[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BX5VPRFA5D3ANW4J5H6PYA":3,"skill-same:01M6BX5VPRFA5D3ANW4J5H6PYA":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":48,"linkOnly":49,"markdownContent":50,"markdownBody":51,"frontMatter":52,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":17,"ownerHtmlUrl":59,"ownerBlogUrl":60,"ownerDescription":17,"updatedAt":61,"install":62,"resources":75},"01M6BX5VPRFA5D3ANW4J5H6PYA","deploying-to-cloud","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 or manage applications, environments, databases, caches, object storage, queues, domains, instances, background processes, secrets, compute, scheduled tasks, or Laravel Cloud infrastructure; or check billing, usage, or spend. Triggers on deployment, shipping, Cloud management, environment setup, database provisioning, billing or usage queries, the `cloud` CLI, and Laravel Cloud deployment troubleshooting.","使用 `cloud` CLI 在 Laravel Cloud 上部署和管理 Laravel 应用。适用于用户想要部署应用、发布到 Cloud、创建或管理应用、环境、数据库、缓存、对象存储、队列、域名、实例、后台进程、密钥、计算资源、定时任务或 Laravel Cloud 基础设施；或查询账单、用量或支出。触发条件包括部署、发布、Cloud 管理、环境配置、数据库配置、账单或用量查询、`cloud` CLI 以及 Laravel Cloud 部署故障排查。","karuhun-developer\u002Ftemplate-laravel-livewire","karuhun-developer","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F169523822?v=4","01M6BX5G1VG24QZX7D5GJBT0NG","Karuhun Developer","01M6BX5G667YMVBX9YKY797ZKA",6,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdeploying-to-cloud\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQNXPY1AV6BSR5VKHDMWRH","部署与发布管理","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],"deploying to cloud","cloud","shipping","laravel","ship","secrets","provisioning","applications","database","cli","create","tasks","deployment","infrastructure","setup","deploy","storage","2026-11-10 10:12:30",false,"---\nname: deploying-to-cloud\ndescription: \"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 or manage applications, environments, databases, caches, object storage, queues, domains, instances, background processes, secrets, compute, scheduled tasks, or Laravel Cloud infrastructure; or check billing, usage, or spend. Triggers on deployment, shipping, Cloud management, environment setup, database provisioning, billing or usage queries, the `cloud` CLI, and Laravel Cloud deployment troubleshooting.\"\nlicense: MIT\nmetadata:\n  author: laravel\n---\n\n# Deploying with Laravel Cloud\n\nUse the [Laravel Cloud documentation](https:\u002F\u002Fcloud.laravel.com\u002Fdocs\u002Fllms.txt) for detailed, current feature behavior. Use the Cloud CLI for Cloud operations rather than guessing dashboard or API workflows. Install it in the project and invoke it as `.\u002Fvendor\u002Fbin\u002Fcloud` by default; use a globally installed `cloud` command only as a fallback. Commands below are written as `cloud` for brevity; run them as `.\u002Fvendor\u002Fbin\u002Fcloud` unless falling back to the global installation.\n\n## Application Setup\n\n- Laravel Cloud deploys from GitHub, GitLab, or Bitbucket. A new Laravel application requires PHP 8.2 or later, Laravel 9 or later, a connected Git provider, and a deployment region.\n- Cloud creates environments for applications. Use separate production, staging, and preview environments; each environment has its own compute, resources, and deployment settings.\n- Keep application compute and attached resources in the same region where possible.\n- Cloud builds a Docker image using the selected PHP version, runs the configured build and deploy commands, and switches traffic to a successful deployment with zero downtime. Push-to-deploy is enabled by default, and manual deployments and deploy hooks are also available.\n\n## Build and Deploy\n\n- A typical Laravel build command is `composer install --no-dev && npm run build`.\n- Run optimization and cache-building commands during the build, not during deployment. A typical deploy command is `php artisan migrate --force`.\n- Build and deploy commands have a 15-minute timeout. Deploy commands run immediately before the release becomes live, and filesystem changes made by deploy commands are not persisted.\n- Do not add `php artisan queue:restart`, `php artisan horizon:terminate`, `php artisan optimize:clear`, or `php artisan storage:link` to deploy commands. Cloud handles worker restarts and process management; deploy filesystem changes are not persistent.\n- After changing environment settings, attached resources, or linked secrets, redeploy the environment for the changes to take effect.\n\n## Configuration and Resources\n\n- Attached databases, caches, and object storage inject their connection variables automatically. Custom environment variables take precedence over injected values.\n- Use Secrets Manager for encrypted organization-level values shared across environments. Secret values cannot be read after creation; redeploy affected environments after creating, updating, linking, unlinking, or deleting a secret.\n- Environment filesystems are ephemeral and are not shared between replicas. Use a database or Laravel Valkey for persistent cache and sessions, and Laravel Cloud Object Storage for persistent files. Do not rely on local files surviving a deployment.\n\n### Object Storage and File Visibility\n\n- Laravel Cloud Object Storage is backed by Cloudflare R2. R2 applies visibility at the bucket level; a bucket cannot contain a mix of private and public objects.\n- For private files, always use `Storage::disk()` with no arguments, such as `Storage::disk()->put(...)`, so Laravel uses the environment's default disk. Do not pass a disk name for private\u002Fdefault storage. Attach a private Cloud bucket as the environment's default disk.\n- For public files, use the named public disk: `Storage::disk('public')->put(...)`. Attach a second Cloud bucket configured as public and give it the `public` disk name.\n- Applications that use both private and public files therefore need two Cloud Object Storage buckets attached to the environment: a private default bucket and a public bucket named `public`.\n- Do not set per-file or Flysystem `visibility: 'public'` configuration for Cloud Object Storage. R2 does not support per-object ACL headers and rejects those requests; select the bucket visibility when creating the bucket.\n- Private buckets are not internet-accessible, but Laravel can generate temporary public URLs with `Storage::temporaryUrl(...)`. Public buckets expose all objects through their Cloud-provided public URL.\n- Install the S3 Flysystem adapter before using Cloud Object Storage: `composer require league\u002Fflysystem-aws-s3-v3 \"^3.0\" --with-all-dependencies`.\n\n## Queues and Scheduling\n\n- Managed queues are the recommended queue option. They provision dedicated workers and autoscale based on queued work.\n- Managed queues require a supported recent Laravel version and `aws\u002Faws-sdk-php`; check the current Cloud documentation before changing dependencies.\n- Enable the scheduler on an App or Worker cluster to run `php artisan schedule:run` every minute. When an environment has multiple replicas, use Laravel's `onOneServer` for tasks that must run once.\n- Only Flex compute sizes can scale to zero. Scale-to-zero environments wake for Laravel scheduled tasks and queued jobs, but long-running jobs may be interrupted when the sleep timeout is reached. Use managed queues for workloads that must not be interrupted.\n\n## Domains and Storage\n\n- Each environment receives a `laravel.cloud` domain after its first successful deployment. Cloud automatically verifies custom domains and provisions SSL after the required DNS records are configured.\n- Do not use the ephemeral filesystem for persistent uploads, generated files, cache, or session data. Use the appropriate Cloud resource instead.\n\n## Cloud CLI\n\n### Setup\n\n```shell\ncomposer require --dev laravel\u002Fcloud-cli\n.\u002Fvendor\u002Fbin\u002Fcloud auth -n\n```\n\nIf a project-local installation is not available, install the CLI globally with `composer global require laravel\u002Fcloud-cli` and invoke it as `cloud`.\n\n`cloud auth` opens a browser. If a browser is unavailable, set `LARAVEL_CLOUD_TOKEN` in the environment. It overrides any saved token and writes nothing to disk. To save a token instead, run `cloud auth:token --add --token=\u003Ctoken> -n` or pipe it with `echo \"$TOKEN\" | cloud auth:token --add -n`.\n\n### Commands\n\nCommands follow a CRUD pattern: `resource:list`, `resource:get`, `resource:create`, `resource:update`, `resource:delete`.\n\nAvailable resources: `application`, `environment`, `instance`, `database-cluster`, `database`, `cache`, `bucket`, `domain`, `websocket-cluster`, `background-process`, `secret`, `command`, `deployment`.\n\nSome resources have additional commands (e.g., `domain:verify`, `database:open`, `instance:sizes`, `cache:types`, `\u003Cresource>:metrics`). Discover these via `cloud -h`.\n\nNever hardcode command signatures. Always run `cloud \u003Ccommand> -h` to discover options at runtime.\n\n### CLI Flags\n\n- Always add `-n` to every command to prevent the CLI from hanging.\n- Never use `-q` or `--silent`; they suppress all output.\n\nFlag combos per operation:\n- Read (`:list`, `:get`) → `--json -n`\n- Create (`:create`) → `--json -n`\n- Update (`:update`) → `--json -n --force`\n- Delete (`:delete`) → `-n --force` (no `--json`)\n- Environment variables → `-n --force`\n- Deploy or ship → `-n` with all options passed explicitly (no `--json`)\n\n### Deployment Workflow\n\nDetermine the task and follow the matching path:\n\n- First deployment: inspect `cloud ship -h`, then run `cloud ship -n` with all required values.\n\n- Existing application:\n  ```shell\n  cloud deploy {app_name} {environment} -n --open\n  cloud deploy:monitor -n\n  ```\n\n- Environment variables: `cloud environment:variables -n --force`\n\n- Secrets: `echo \"$VALUE\" | cloud secret:create --name=NAME --json -n`, then `cloud environment-secret:attach`\n\n- Provision infrastructure: `cloud \u003Cresource>:create --json -n`\n\n- Monorepo (application in a subdirectory): add `--root-directory=\u003Csubdir>` to `cloud ship` or `cloud application:create`.\n\n- Custom domain: `cloud domain:create --json -n`, then `cloud domain:verify -n`.\n\n- Repository defaults: `cloud repo:config {application} -n` sets repository-local application and organization defaults. Pass `--organization=\u003Cid|name|slug>` when the user has multiple organizations.\n\nFor multi-step operations, see [reference\u002Fchecklists.md](reference\u002Fchecklists.md).\n\n- If the user's needs are unclear, ask before running anything.\n\n### When a Command Fails\n\n1. Read the error output.\n2. Check the resource status with `:list --json -n` or `:get --json -n`.\n3. For authentication errors, run `cloud auth -n`.\n4. Fix the issue and rerun the command.\n5. If the same error occurs after one fix, stop and ask the user rather than repeating the operation.\n\nAlways run `cloud deploy:monitor -n` after every deploy. If it fails, inspect the deployment status and logs and show the user what went wrong before attempting a fix.\n\n### Subagent Delegation\n\nDelegate high-output operations to subagents using the Task tool to keep the main context window small. Only the summary returns; verbose output stays in the subagent's context.\n\nDelegate these to a subagent:\n- `cloud deploy:monitor -n` — deployment logs can be very long\n- `cloud deployment:get --json -n` — full deployment details\n- `cloud \u003Cresource>:list --json -n` — listing many resources produces large JSON\n- `cloud \u003Cresource>:metrics --json -n` — every data point is included; narrow it with `--fields` (e.g. `--fields=period,cpuUsage.average`)\n- `cloud command:run` — when output may be long\n- `cloud usage --detailed --json -n` — the payload includes details for every database, cache, bucket, websocket, and application\n- Fetching docs from https:\u002F\u002Fcloud.laravel.com\u002Fdocs\u002Fllms.txt via `WebFetch`\n\nKeep in the main context:\n- Short commands like `:create`, `:delete`, `:update` — output is small\n- `cloud deploy -n` — you need the deployment ID immediately\n- Any command where you need the result for the next step right away\n\n### Rules\n\nFollow these rules:\n- Flag selection — always use the documented combos above\n- Deploy sequence — deploy then monitor, never skip monitoring\n- Destructive commands — always confirm with the user first, show the command and wait for approval. This includes deleting applications, environments, databases, caches, buckets, domains, or secrets.\n- Error loop — diagnose, fix once, ask user if it fails again\n\nUse judgment for:\n- Instance sizes, regions, cluster types — ask the user if not specified\n- Which resources to provision — based on what the user describes\n- Order of provisioning — no strict sequence required\n- How to present output — summarize, show raw, or extract fields based on context\n\n### Secrets\n\nSecrets are encrypted values shared across the organization and attached to environments. The CLI encrypts values locally, so plaintext never reaches the API.\n\n```shell\ncloud secret:list --json -n\necho \"$VALUE\" | cloud secret:create --name=STRIPE_KEY --json -n\ncloud environment-secret:attach {environment} {secretId} -n\ncloud environment-secret:list {environment} --json -n\n```\n\nPipe the value in. `--value=` works, but leaves the plaintext in shell history and the process list.\n\n`secret:update`, `secret:delete`, and `environment-secret:attach` take secret IDs, not names — names are not unique. Read IDs from `cloud secret:list --json -n`.\n\nThere is no `secret:get`, and no way to detach a secret from a single environment. `secret:delete` removes it and detaches it everywhere.\n\nSecrets need the `sodium` PHP extension. No other command does.\n\nRedeploy affected environments after creating, updating, attaching, or deleting a secret.\n\n### Remote Access\n\n#### Tinker (v0.2.0 or later)\n\nRun PHP code directly in a Cloud environment:\n\n```shell\ncloud tinker {environment} --code='Your PHP code here' --timeout=60 -n\n```\n\n- `--code` — PHP code to execute (required in non-interactive mode)\n- `--timeout` — maximum number of seconds to wait for output (default: 60)\n\nThe code must explicitly output results using `echo`, `dump`, or similar; expressions alone produce no output.\n\nAlways pass `--code` and `-n` to avoid interactive prompts.\n\n#### Remote Commands\n\nRun shell commands on a Cloud environment:\n\n```shell\ncloud command:run {environment} --cmd='your command here' -n\n```\n\n- `--cmd` — the command to run (required in non-interactive mode)\n- `--no-monitor` — skip real-time output streaming\n- `--copy-output` — copy output to clipboard\n\nReview past commands:\n\n- `cloud command:list {environment} --json -n` — list command history\n- `cloud command:get {commandId} --json -n` — get details and output of a specific command\n\n### Billing and Usage\n\nView billing and usage for the current organization:\n\n```shell\ncloud usage --json -n\n```\n\n- `--period=current|previous|1|2|3` — Billing period (default: `current`; `1`, `2`, and `3` are one, two, and three periods back, respectively). Other values return an error.\n- `--environment=\u003Cid>` — filter usage to a single environment\n- `--detailed` — include per-application, per-resource, and per-add-on breakdowns\n- `--json` — machine-readable output (always pair with `-n`)\n\nCommon queries:\n\n- Current spend: `cloud usage --json -n | jq '.currentSpendCents'`\n- Last month's bill: `cloud usage --period=previous --json -n`\n- One environment, full breakdown: `cloud usage --environment=\u003Cid> --detailed --json -n`\n\nAll amounts are in cents. Keys are camelCase at every level (e.g., `currentSpendCents`, `bandwidth.allowanceBytes`, `databases[].totalCents`, `applications[].totalCostCents`).\n\n### Config\n\n1. Environment: `LARAVEL_CLOUD_TOKEN` — an API token, taking precedence over any saved one (empty counts as unset)\n2. Global: `~\u002F.config\u002Fcloud\u002Fconfig.json` — auth tokens and preferences\n3. Repo-local: `.cloud\u002Fconfig.json` — app and environment defaults (set by `cloud repo:config {application} -n`)\n4. CLI arguments override both config files\n\nPass the application to `repo:config`. Without it, the command must prompt and fails under `-n` when the organization has more than one application. Deploy commands do not need these defaults; pass the application and environment to them directly.\n\nUsing multiple organizations requires multiple stored API tokens. Commands read `organization_id` from `.cloud\u002Fconfig.json` to select one and fail if it is not set. Set it with `cloud repo:config {application} --organization=\u003Cid|name|slug> -n`.\n\n`LARAVEL_CLOUD_TOKEN` holds one token, so it picks the organization on its own. Naming a different one with `--organization` fails rather than falling back to the token's organization.\n\n## Documentation\n\nLaravel Cloud documentation: https:\u002F\u002Fcloud.laravel.com\u002Fdocs\u002Fllms.txt\n\nWhen 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.\n\n## When Stuck\n\n- Fetch https:\u002F\u002Fcloud.laravel.com\u002Fdocs\u002Fllms.txt for official documentation\n- Run `cloud \u003Ccommand> -h` for any command's options\n- Run `cloud -h` to discover commands\n\n## Verification\n\n1. Confirm the target application and environment before changing or deploying anything.\n2. Check staged environment changes and required resources before deployment.\n3. Monitor every deployment to completion with `cloud deploy:monitor -n`.\n4. For production changes, verify the application URL, logs, queues, scheduled tasks, and relevant resource health.\n","# Deploying with Laravel Cloud\n\nUse the [Laravel Cloud documentation](https:\u002F\u002Fcloud.laravel.com\u002Fdocs\u002Fllms.txt) for detailed, current feature behavior. Use the Cloud CLI for Cloud operations rather than guessing dashboard or API workflows. Install it in the project and invoke it as `.\u002Fvendor\u002Fbin\u002Fcloud` by default; use a globally installed `cloud` command only as a fallback. Commands below are written as `cloud` for brevity; run them as `.\u002Fvendor\u002Fbin\u002Fcloud` unless falling back to the global installation.\n\n## Application Setup\n\n- Laravel Cloud deploys from GitHub, GitLab, or Bitbucket. A new Laravel application requires PHP 8.2 or later, Laravel 9 or later, a connected Git provider, and a deployment region.\n- Cloud creates environments for applications. Use separate production, staging, and preview environments; each environment has its own compute, resources, and deployment settings.\n- Keep application compute and attached resources in the same region where possible.\n- Cloud builds a Docker image using the selected PHP version, runs the configured build and deploy commands, and switches traffic to a successful deployment with zero downtime. Push-to-deploy is enabled by default, and manual deployments and deploy hooks are also available.\n\n## Build and Deploy\n\n- A typical Laravel build command is `composer install --no-dev && npm run build`.\n- Run optimization and cache-building commands during the build, not during deployment. A typical deploy command is `php artisan migrate --force`.\n- Build and deploy commands have a 15-minute timeout. Deploy commands run immediately before the release becomes live, and filesystem changes made by deploy commands are not persisted.\n- Do not add `php artisan queue:restart`, `php artisan horizon:terminate`, `php artisan optimize:clear`, or `php artisan storage:link` to deploy commands. Cloud handles worker restarts and process management; deploy filesystem changes are not persistent.\n- After changing environment settings, attached resources, or linked secrets, redeploy the environment for the changes to take effect.\n\n## Configuration and Resources\n\n- Attached databases, caches, and object storage inject their connection variables automatically. Custom environment variables take precedence over injected values.\n- Use Secrets Manager for encrypted organization-level values shared across environments. Secret values cannot be read after creation; redeploy affected environments after creating, updating, linking, unlinking, or deleting a secret.\n- Environment filesystems are ephemeral and are not shared between replicas. Use a database or Laravel Valkey for persistent cache and sessions, and Laravel Cloud Object Storage for persistent files. Do not rely on local files surviving a deployment.\n\n### Object Storage and File Visibility\n\n- Laravel Cloud Object Storage is backed by Cloudflare R2. R2 applies visibility at the bucket level; a bucket cannot contain a mix of private and public objects.\n- For private files, always use `Storage::disk()` with no arguments, such as `Storage::disk()->put(...)`, so Laravel uses the environment's default disk. Do not pass a disk name for private\u002Fdefault storage. Attach a private Cloud bucket as the environment's default disk.\n- For public files, use the named public disk: `Storage::disk('public')->put(...)`. Attach a second Cloud bucket configured as public and give it the `public` disk name.\n- Applications that use both private and public files therefore need two Cloud Object Storage buckets attached to the environment: a private default bucket and a public bucket named `public`.\n- Do not set per-file or Flysystem `visibility: 'public'` configuration for Cloud Object Storage. R2 does not support per-object ACL headers and rejects those requests; select the bucket visibility when creating the bucket.\n- Private buckets are not internet-accessible, but Laravel can generate temporary public URLs with `Storage::temporaryUrl(...)`. Public buckets expose all objects through their Cloud-provided public URL.\n- Install the S3 Flysystem adapter before using Cloud Object Storage: `composer require league\u002Fflysystem-aws-s3-v3 \"^3.0\" --with-all-dependencies`.\n\n## Queues and Scheduling\n\n- Managed queues are the recommended queue option. They provision dedicated workers and autoscale based on queued work.\n- Managed queues require a supported recent Laravel version and `aws\u002Faws-sdk-php`; check the current Cloud documentation before changing dependencies.\n- Enable the scheduler on an App or Worker cluster to run `php artisan schedule:run` every minute. When an environment has multiple replicas, use Laravel's `onOneServer` for tasks that must run once.\n- Only Flex compute sizes can scale to zero. Scale-to-zero environments wake for Laravel scheduled tasks and queued jobs, but long-running jobs may be interrupted when the sleep timeout is reached. Use managed queues for workloads that must not be interrupted.\n\n## Domains and Storage\n\n- Each environment receives a `laravel.cloud` domain after its first successful deployment. Cloud automatically verifies custom domains and provisions SSL after the required DNS records are configured.\n- Do not use the ephemeral filesystem for persistent uploads, generated files, cache, or session data. Use the appropriate Cloud resource instead.\n\n## Cloud CLI\n\n### Setup\n\n```shell\ncomposer require --dev laravel\u002Fcloud-cli\n.\u002Fvendor\u002Fbin\u002Fcloud auth -n\n```\n\nIf a project-local installation is not available, install the CLI globally with `composer global require laravel\u002Fcloud-cli` and invoke it as `cloud`.\n\n`cloud auth` opens a browser. If a browser is unavailable, set `LARAVEL_CLOUD_TOKEN` in the environment. It overrides any saved token and writes nothing to disk. To save a token instead, run `cloud auth:token --add --token=\u003Ctoken> -n` or pipe it with `echo \"$TOKEN\" | cloud auth:token --add -n`.\n\n### Commands\n\nCommands follow a CRUD pattern: `resource:list`, `resource:get`, `resource:create`, `resource:update`, `resource:delete`.\n\nAvailable resources: `application`, `environment`, `instance`, `database-cluster`, `database`, `cache`, `bucket`, `domain`, `websocket-cluster`, `background-process`, `secret`, `command`, `deployment`.\n\nSome resources have additional commands (e.g., `domain:verify`, `database:open`, `instance:sizes`, `cache:types`, `\u003Cresource>:metrics`). Discover these via `cloud -h`.\n\nNever hardcode command signatures. Always run `cloud \u003Ccommand> -h` to discover options at runtime.\n\n### CLI Flags\n\n- Always add `-n` to every command to prevent the CLI from hanging.\n- Never use `-q` or `--silent`; they suppress all output.\n\nFlag combos per operation:\n- Read (`:list`, `:get`) → `--json -n`\n- Create (`:create`) → `--json -n`\n- Update (`:update`) → `--json -n --force`\n- Delete (`:delete`) → `-n --force` (no `--json`)\n- Environment variables → `-n --force`\n- Deploy or ship → `-n` with all options passed explicitly (no `--json`)\n\n### Deployment Workflow\n\nDetermine the task and follow the matching path:\n\n- First deployment: inspect `cloud ship -h`, then run `cloud ship -n` with all required values.\n\n- Existing application:\n  ```shell\n  cloud deploy {app_name} {environment} -n --open\n  cloud deploy:monitor -n\n  ```\n\n- Environment variables: `cloud environment:variables -n --force`\n\n- Secrets: `echo \"$VALUE\" | cloud secret:create --name=NAME --json -n`, then `cloud environment-secret:attach`\n\n- Provision infrastructure: `cloud \u003Cresource>:create --json -n`\n\n- Monorepo (application in a subdirectory): add `--root-directory=\u003Csubdir>` to `cloud ship` or `cloud application:create`.\n\n- Custom domain: `cloud domain:create --json -n`, then `cloud domain:verify -n`.\n\n- Repository defaults: `cloud repo:config {application} -n` sets repository-local application and organization defaults. Pass `--organization=\u003Cid|name|slug>` when the user has multiple organizations.\n\nFor multi-step operations, see [reference\u002Fchecklists.md](reference\u002Fchecklists.md).\n\n- If the user's needs are unclear, ask before running anything.\n\n### When a Command Fails\n\n1. Read the error output.\n2. Check the resource status with `:list --json -n` or `:get --json -n`.\n3. For authentication errors, run `cloud auth -n`.\n4. Fix the issue and rerun the command.\n5. If the same error occurs after one fix, stop and ask the user rather than repeating the operation.\n\nAlways run `cloud deploy:monitor -n` after every deploy. If it fails, inspect the deployment status and logs and show the user what went wrong before attempting a fix.\n\n### Subagent Delegation\n\nDelegate high-output operations to subagents using the Task tool to keep the main context window small. Only the summary returns; verbose output stays in the subagent's context.\n\nDelegate these to a subagent:\n- `cloud deploy:monitor -n` — deployment logs can be very long\n- `cloud deployment:get --json -n` — full deployment details\n- `cloud \u003Cresource>:list --json -n` — listing many resources produces large JSON\n- `cloud \u003Cresource>:metrics --json -n` — every data point is included; narrow it with `--fields` (e.g. `--fields=period,cpuUsage.average`)\n- `cloud command:run` — when output may be long\n- `cloud usage --detailed --json -n` — the payload includes details for every database, cache, bucket, websocket, and application\n- Fetching docs from https:\u002F\u002Fcloud.laravel.com\u002Fdocs\u002Fllms.txt via `WebFetch`\n\nKeep in the main context:\n- Short commands like `:create`, `:delete`, `:update` — output is small\n- `cloud deploy -n` — you need the deployment ID immediately\n- Any command where you need the result for the next step right away\n\n### Rules\n\nFollow these rules:\n- Flag selection — always use the documented combos above\n- Deploy sequence — deploy then monitor, never skip monitoring\n- Destructive commands — always confirm with the user first, show the command and wait for approval. This includes deleting applications, environments, databases, caches, buckets, domains, or secrets.\n- Error loop — diagnose, fix once, ask user if it fails again\n\nUse judgment for:\n- Instance sizes, regions, cluster types — ask the user if not specified\n- Which resources to provision — based on what the user describes\n- Order of provisioning — no strict sequence required\n- How to present output — summarize, show raw, or extract fields based on context\n\n### Secrets\n\nSecrets are encrypted values shared across the organization and attached to environments. The CLI encrypts values locally, so plaintext never reaches the API.\n\n```shell\ncloud secret:list --json -n\necho \"$VALUE\" | cloud secret:create --name=STRIPE_KEY --json -n\ncloud environment-secret:attach {environment} {secretId} -n\ncloud environment-secret:list {environment} --json -n\n```\n\nPipe the value in. `--value=` works, but leaves the plaintext in shell history and the process list.\n\n`secret:update`, `secret:delete`, and `environment-secret:attach` take secret IDs, not names — names are not unique. Read IDs from `cloud secret:list --json -n`.\n\nThere is no `secret:get`, and no way to detach a secret from a single environment. `secret:delete` removes it and detaches it everywhere.\n\nSecrets need the `sodium` PHP extension. No other command does.\n\nRedeploy affected environments after creating, updating, attaching, or deleting a secret.\n\n### Remote Access\n\n#### Tinker (v0.2.0 or later)\n\nRun PHP code directly in a Cloud environment:\n\n```shell\ncloud tinker {environment} --code='Your PHP code here' --timeout=60 -n\n```\n\n- `--code` — PHP code to execute (required in non-interactive mode)\n- `--timeout` — maximum number of seconds to wait for output (default: 60)\n\nThe code must explicitly output results using `echo`, `dump`, or similar; expressions alone produce no output.\n\nAlways pass `--code` and `-n` to avoid interactive prompts.\n\n#### Remote Commands\n\nRun shell commands on a Cloud environment:\n\n```shell\ncloud command:run {environment} --cmd='your command here' -n\n```\n\n- `--cmd` — the command to run (required in non-interactive mode)\n- `--no-monitor` — skip real-time output streaming\n- `--copy-output` — copy output to clipboard\n\nReview past commands:\n\n- `cloud command:list {environment} --json -n` — list command history\n- `cloud command:get {commandId} --json -n` — get details and output of a specific command\n\n### Billing and Usage\n\nView billing and usage for the current organization:\n\n```shell\ncloud usage --json -n\n```\n\n- `--period=current|previous|1|2|3` — Billing period (default: `current`; `1`, `2`, and `3` are one, two, and three periods back, respectively). Other values return an error.\n- `--environment=\u003Cid>` — filter usage to a single environment\n- `--detailed` — include per-application, per-resource, and per-add-on breakdowns\n- `--json` — machine-readable output (always pair with `-n`)\n\nCommon queries:\n\n- Current spend: `cloud usage --json -n | jq '.currentSpendCents'`\n- Last month's bill: `cloud usage --period=previous --json -n`\n- One environment, full breakdown: `cloud usage --environment=\u003Cid> --detailed --json -n`\n\nAll amounts are in cents. Keys are camelCase at every level (e.g., `currentSpendCents`, `bandwidth.allowanceBytes`, `databases[].totalCents`, `applications[].totalCostCents`).\n\n### Config\n\n1. Environment: `LARAVEL_CLOUD_TOKEN` — an API token, taking precedence over any saved one (empty counts as unset)\n2. Global: `~\u002F.config\u002Fcloud\u002Fconfig.json` — auth tokens and preferences\n3. Repo-local: `.cloud\u002Fconfig.json` — app and environment defaults (set by `cloud repo:config {application} -n`)\n4. CLI arguments override both config files\n\nPass the application to `repo:config`. Without it, the command must prompt and fails under `-n` when the organization has more than one application. Deploy commands do not need these defaults; pass the application and environment to them directly.\n\nUsing multiple organizations requires multiple stored API tokens. Commands read `organization_id` from `.cloud\u002Fconfig.json` to select one and fail if it is not set. Set it with `cloud repo:config {application} --organization=\u003Cid|name|slug> -n`.\n\n`LARAVEL_CLOUD_TOKEN` holds one token, so it picks the organization on its own. Naming a different one with `--organization` fails rather than falling back to the token's organization.\n\n## Documentation\n\nLaravel Cloud documentation: https:\u002F\u002Fcloud.laravel.com\u002Fdocs\u002Fllms.txt\n\nWhen 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.\n\n## When Stuck\n\n- Fetch https:\u002F\u002Fcloud.laravel.com\u002Fdocs\u002Fllms.txt for official documentation\n- Run `cloud \u003Ccommand> -h` for any command's options\n- Run `cloud -h` to discover commands\n\n## Verification\n\n1. Confirm the target application and environment before changing or deploying anything.\n2. Check staged environment changes and required resources before deployment.\n3. Monitor every deployment to completion with `cloud deploy:monitor -n`.\n4. For production changes, verify the application URL, logs, queues, scheduled tasks, and relevant resource health.\n",{"name":5,"license":16,"metadata":53,"description":7},{"author":34},"main","e9bff297aa5ec90d4815836383d540f20dee6717",".agents\u002Fskills\u002Fdeploying-to-cloud",1,"https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire","https:\u002F\u002Fgithub.com\u002Fkaruhun-developer","https:\u002F\u002Fkaruhundeveloper.com","2026-11-12 11:36:58",{"source":9,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add karuhun-developer\u002Ftemplate-laravel-livewire --skill deploying-to-cloud",{"tool":68,"command":69},"bunx","bunx skills add karuhun-developer\u002Ftemplate-laravel-livewire --skill deploying-to-cloud",{"tool":71,"command":72},"pnpm","pnpm dlx skills add karuhun-developer\u002Ftemplate-laravel-livewire --skill deploying-to-cloud","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdeploying-to-cloud\u002FSKILL.md",true,[76],{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"reference\u002Fchecklists.md","REFERENCE","参考文档",1871,"https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdeploying-to-cloud\u002Freference\u002Fchecklists.md",[83,111,144,163,180,193],{"skillNo":84,"name":85,"nameZh":86,"description":87,"descriptionZh":88,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":89,"categories":90,"keywords":97,"publishedAt":48},"01M6BXAN772630D3MJ7GJHJH4A","testing-best-practices","Laravel 测试设计与评审","Laravel test design and review. Use when selecting coverage, naming or structuring tests, choosing assertions or test data, isolating dependencies, testing HTTP or security boundaries, improving suite performance, or reviewing test value. Use framework guidance or search-docs for Pest and PHPUnit syntax.","Laravel 测试设计与评审。适用于选择覆盖范围、测试命名或结构安排、选择断言或测试数据、隔离依赖、测试 HTTP 或安全边界、提升测试套件性能，以及评估测试价值。Pest 和 PHPUnit 语法请使用框架指南或 search-docs 查询。","https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftesting-best-practices\u002FSKILL.md",[91,94],{"categoryNo":92,"categoryName":93,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",{"categoryNo":95,"categoryName":96,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障",[98,99,100,34,101,102,103,104,105,106,107,108,109,110],"testing","testing best practices","best practices","data","search","docs","framework","http","test","performance","security","design","review",{"skillNo":112,"name":113,"nameZh":114,"description":115,"descriptionZh":116,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":117,"categories":118,"keywords":125,"publishedAt":48},"01M6BXAJ8TFJXYH8XVWXJ5F5ZJ","tailwindcss-development","Tailwind CSS 界面样式开发","Always invoke when the user's message includes 'tailwind' in any form. Also invoke for: building responsive grid layouts (multi-column card grids, product grids), flex\u002Fgrid page structures (dashboards with sidebars, fixed topbars, mobile-toggle navs), styling UI components (cards, tables, navbars, pricing sections, forms, inputs, badges), adding dark mode variants, fixing spacing or typography, and Tailwind v3\u002Fv4 work. The core use case: writing or fixing Tailwind utility classes in HTML templates (Blade, JSX, Vue). Skip for backend PHP logic, database queries, API routes, JavaScript with no HTML\u002FCSS component, CSS file audits, build tool configuration, and vanilla CSS.","当用户消息以任何形式包含 'tailwind' 时必须调用。以下情形也应调用：构建响应式网格布局（多列卡片网格、商品网格）、flex\u002Fgrid 页面结构（带侧边栏的仪表盘、固定顶栏、移动端切换导航）、UI 组件样式设计（卡片、表格、导航栏、定价区块、表单、输入框、徽章）、添加暗色模式变体、修复间距或排版问题，以及 Tailwind v3\u002Fv4 相关工作。核心用途：在 HTML 模板（Blade、JSX、Vue）中编写或修复 Tailwind 工具类。以下情形跳过：后端 PHP 逻辑、数据库查询、API 路由、不含 HTML\u002FCSS 组件的 JavaScript、CSS 文件审查、构建工具配置，以及原生 CSS。","https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftailwindcss-development\u002FSKILL.md",[119,122],{"categoryNo":120,"categoryName":121,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师",{"categoryNo":123,"categoryName":124,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRASNPVNJVQQJ4KZX8XM5D","前端开发与界面实现",[126,127,128,129,130,131,132,133,134,39,135,136,137,138,139,140,34,141,142,143],"tailwindcss","development","tailwindcss development","api","javascript","components","component","core","product","file","ui","templates","Tailwind","build tool","tool","pricing","writing","css",{"skillNo":145,"name":146,"nameZh":147,"description":148,"descriptionZh":149,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":150,"categories":151,"keywords":156,"publishedAt":48},"01M6BXAFCFVQZQTR4V0XQ90Z9G","sluggable-development","Laravel Slug 与自愈 URL 开发","Use when making a field on an Eloquent model sluggable, generating the migration for a slug column, switching to self-healing URLs, or resolving a model from its slug in a route. Trigger when the request mentions slugs, permalinks, the spatie\u002Flaravel-sluggable package, the HasSlug or HasTranslatableSlug trait, the #[Sluggable] attribute, SlugOptions, findBySlug, self-healing URLs, or stale slug redirects in a Laravel project. Covers choosing between the attribute and the trait, generating unique slugs, configuring separator\u002Flength\u002Flanguage\u002Fscope\u002Funiqueness, preventing slug overwrites, translatable slugs via spatie\u002Flaravel-translatable, route model binding through the slug column, self-healing route keys, customizing the 308 redirect through the SelfHealing facade, and overriding the default actions via config\u002Fsluggable.php. Do not use for one-off URL-safe strings, signed URLs, or Laravel's built-in Str::slug helper when the result is not stored on a model.","适用场景：让 Eloquent 模型的某个字段成为 slug、为 slug 列生成迁移、切换到自愈 URL，或在路由中根据 slug 解析模型。当请求提及 slug、永久链接、spatie\u002Flaravel-sluggable 包、HasSlug 或 HasTranslatableSlug trait、#[Sluggable] 特性、SlugOptions、findBySlug、自愈 URL，或 Laravel 项目中的旧 slug 重定向时触发。内容涵盖：特性（attribute）与 trait 的选择、生成唯一 slug、配置分隔符\u002F长度\u002F语言\u002F作用域\u002F唯一性、防止 slug 被覆盖、通过 spatie\u002Flaravel-translatable 实现多语言 slug、基于 slug 列的路由模型绑定、自愈路由键、通过 SelfHealing facade 自定义 308 重定向，以及通过 config\u002Fsluggable.php 覆盖默认操作。不适用于一次性 URL 安全字符串、签名 URL，或结果不存储到模型上的 Laravel 内置 Str::slug 辅助函数。","https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fsluggable-development\u002FSKILL.md",[152,153],{"categoryNo":120,"categoryName":121,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":154,"categoryName":155,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8CAJ4KSFHQBJAJ1YDP4J1H6","PHP\u002FLaravel 开发",[157,127,34,158,159,160,161,162],"sluggable development","safe","config","package","actions","php",{"skillNo":164,"name":165,"nameZh":166,"description":167,"descriptionZh":168,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":169,"categories":170,"keywords":173,"publishedAt":48},"01M6BXACFB94RP29K94ZQB37KN","pulse-development","Laravel Pulse 监控配置与卡片开发","Handles Laravel Pulse setup, configuration, and custom card development. Activates when installing Pulse; configuring the dashboard or authorization gate; setting up recorders and filtering; building custom Livewire cards; optimizing with Redis ingest or sampling; or when the user mentions \u002Fpulse, pulse:check, pulse:work, Pulse::record(), or application monitoring.","处理 Laravel Pulse 的安装配置与自定义卡片开发。在以下情形触发：安装 Pulse；配置仪表盘或授权门禁（Gate）；设置记录器（recorder）与过滤规则；构建自定义 Livewire 卡片；通过 Redis 摄取或采样进行优化；或用户提及 \u002Fpulse、pulse:check、pulse:work、Pulse::record()，以及应用监控相关内容。","https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fpulse-development\u002FSKILL.md",[171,172],{"categoryNo":120,"categoryName":121,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":154,"categoryName":155,"taxonomyType":28,"taxonomyTypeDesc":29},[174,127,175,45,176,177,178,34,179],"pulse development","dashboard","monitoring","redis","authorization","livewire",{"skillNo":181,"name":182,"nameZh":183,"description":184,"descriptionZh":185,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":186,"categories":187,"keywords":190,"publishedAt":48},"01M6BXA9NM9N2HCN4FA0E6W3SC","medialibrary-development","Laravel 媒体库开发","Build and work with spatie\u002Flaravel-medialibrary features including associating files with Eloquent models, defining media collections and conversions, generating responsive images, and retrieving media URLs and paths.","构建并使用 spatie\u002Flaravel-medialibrary 的功能，包括将文件与 Eloquent 模型关联、定义媒体集合与转换、生成响应式图片，以及获取媒体 URL 和路径。","https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fmedialibrary-development\u002FSKILL.md",[188,189],{"categoryNo":120,"categoryName":121,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":154,"categoryName":155,"taxonomyType":28,"taxonomyTypeDesc":29},[191,127,192,34],"medialibrary development","Media",{"skillNo":194,"name":195,"nameZh":196,"description":197,"descriptionZh":198,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":199,"categories":200,"keywords":203,"publishedAt":48},"01M6BXA6VT29ACMHYG8W2J4ZSB","livewire-development","Livewire 组件开发","Use for any task or question involving Livewire. Activate if user mentions Livewire, wire: directives, or Livewire-specific concepts like wire:model, wire:click, wire:sort, or islands, invoke this skill. Covers building new components, debugging reactivity issues, real-time form validation, drag-and-drop, loading states, migrating from Livewire 3 to 4, converting component formats (SFC\u002FMFC\u002Fclass-based), and performance optimization. Do not use for non-Livewire reactive UI (React, Vue, Alpine-only, Inertia.js) or standard Laravel forms without Livewire.","适用于任何涉及 Livewire 的任务或问题。当用户提及 Livewire、wire: 指令，或 wire:model、wire:click、wire:sort、islands 等 Livewire 专有概念时，调用此技能。涵盖构建新组件、调试响应式问题、实时表单验证、拖放操作、加载状态、从 Livewire 3 迁移到 4、组件格式转换（SFC\u002FMFC\u002F基于类）以及性能优化。不适用于非 Livewire 的响应式 UI（React、Vue、仅 Alpine、Inertia.js），也不适用于不含 Livewire 的标准 Laravel 表单。","https:\u002F\u002Fgithub.com\u002Fkaruhun-developer\u002Ftemplate-laravel-livewire\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Flivewire-development\u002FSKILL.md",[201,202],{"categoryNo":120,"categoryName":121,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":154,"categoryName":155,"taxonomyType":28,"taxonomyTypeDesc":29},[204,179,127,131,205,132,206,207,208,136,209,210,211,212,213,34,107],"livewire development","react","debugging","validation","issues","vue","Optimization","real-time","js","performance optimization"]