Skip to content
Cloud & Infrastructure
Skill

/cloudrun-development

CloudBase Run backend development rules (Function mode/Container mode). Use this skill when deploying backend services that require long connections, multi-language support, custom environments, AI agent development, or migrating existing/GitHub apps that need VPC access to

BOOST
From plugin
awesome-cloudbase-examples
43334 skills3 commands3 MCP
Install
$ npx -y skills add tencentcloudbase/awesome-cloudbase-examples --skill cloudrun-development --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/cloudrun-development

Context preview

The summary Claude sees to decide when to auto-load this skill.

CloudBase Run backend development rules (Function mode/Container mode). Use this skill when deploying backend services that require long connections, multi-language support, custom environments, AI agent development, or migrating existing/GitHub apps that need VPC access to

SKILL.md

cloudrun-development.SKILL.md
name: cloudrun-development
description: CloudBase Run backend development rules (Function mode/Container mode). Use this skill when deploying backend services that require long connections, multi-language support, custom environments, AI agent development, or migrating existing/GitHub apps that need VPC access to MySQL/PostgreSQL/Redis. Also use when diagnosing CloudRun container deploy failures (deploy_failed, readiness/probe failed, image won't start, docker.io pull loops) or a deploy stuck behind a running deploy task. For stateless HTTP services, prefer HTTP cloud functions.
version: 2.36.1
license: MIT
alwaysApply: false

Sibling skills (local only)

Sibling CloudBase skills ship beside this skill. Use local relative paths such as `../auth-tool-cloudbase/SKILL.md`.

If a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do **not** HTTP-fetch remote skill or protocol markdown into the agent context.

**Cross-cutting protocols** (required before writing HTTP handlers or deploying images):

  • Sensitive Runtime Data Protection: `../cloudbase-platform/references/protocols/sensitive-runtime-data-protection.md`
  • Deployment Gate: `../cloudbase-platform/references/protocols/deployment-gate.md`

CloudBase Run Development

Activation Contract

Use this first when

  • The task is to initialize, run, deploy, inspect, or debug a CloudBase Run service.
  • The request needs a long-lived HTTP service, SSE, WebSocket, custom system dependencies, or container-style deployment.
  • The task is to create or run an Agent service on CloudBase Run.
  • The task migrates an **existing / GitHub / third-party** backend that uses classic `DATABASE_URL` / TCP database clients.
  • The service requires a **stable independent process** (long connections, custom runtime, VPC database access) — see the 「云托管 vs HTTP 云函数」 decision section below. A Dockerfile alone is **not** a strong trigger.

Read before writing code if

  • You still need to choose between Function mode and Container mode.
  • The prompt mentions `queryCloudRun`, `manageCloudRun`, Dockerfile, service domains, or public/private access.
  • The app depends on MySQL, PostgreSQL, Redis, or other VPC-private resources over TCP → **先做数据库访问方式决策(SDK/网关优先,见下方「数据库访问方式决策门」)**;确认必须 TCP 直连后 → also read `references/vpc-and-database.md`.
  • You are choosing between CloudRun and HTTP cloud functions for a stateless HTTP service.
  • The service calls CloudBase resources (PG `app.rdb()`, NoSQL, storage, functions) through an SDK → **先过「计算资源访问 CloudBase 的凭证决策门」**:凭证谁签发、怎么注入、怎么吊销,都必须在写代码之前定下来。
  • Container deploy fails (`deploy_failed`, Pod not ready, readiness/probe failed, third-party `imageUrl` won't stay up) → also read `references/image-deploy-troubleshooting.md` and follow the **Container deploy failure SOP** below. Do not start by raising `InitialDelaySeconds`.

Then also read

  • Cloud functions instead of CloudRun -> `../cloud-functions/SKILL.md`
  • Agent SDK and AG-UI specifics -> `../cloudbase-agent/SKILL.md`
  • Web authentication for browser callers -> `../auth-web-cloudbase/SKILL.md`
  • Existing app + TCP database networking -> `references/vpc-and-database.md`
  • Container image deploy failure / probe / `deploy_failed` -> `references/image-deploy-troubleshooting.md`
  • Service calls CloudBase resources through an SDK (credential source / injection / revocation) -> `../cloud-functions/references/http-function-credentials.md`
  • Billing questions about a CloudRun charge ("why was I charged when nothing was deployed", "the free quota wasn't used up") -> `../cloud-api-operations/references/recipes/billing-charges-explained.md` (the gifted quota is a **3-month total**, and a container bills while **instance count is not 0**)

Do NOT use for

  • Simple Event Function or HTTP Function workflows that fit the function model better.
  • Frontend-only projects with no backend service.
  • Database-schema design tasks.

Common mistakes / gotchas

  • Choosing CloudRun when the request only needs a normal cloud function.
  • **Forgetting to listen on the platform-provided `PORT` in Container mode** — and its mirror image in Function mode: calling `app.listen()` there, where the framework already owns the port and the second bind dies with `EADDRINUSE`.
  • **Guessing the credential environment variable name.** `@cloudbase/node-sdk` reads `CLOUDBASE_APIKEY`; an invented name (for example `TCB_API_KEY`) is silently ignored and only shows up later as "no credentials at runtime".
  • **Copying a server credential out of the local client login state** (`auth.json`, `.cloudbase/`) and injecting it into a deployed service. Issue the key with `manageAppAuth(action="createApiKey", keyType="api_key")` instead, so it has an owner, a rotation path, and a `keyId` you can revoke. See `../cloud-functions/references/http-function-credentials.md`.
  • **Baking static content into the image — media files, user uploads, or assets that change on their own cadence.** Three cases, one root cause: the image is rebuilt, re-pushed and re-pulled on every deploy *and* on every scale-up, so anything large or independently-changing makes every deploy slower for no reason.
  • **Media files** (`*.mp4`, large images, fonts) pulled in by a `COPY . .` — one demo video can turn a 30-second deploy into a multi-minute one. Media belongs in cloud storage, referenced by URL. Add a `.dockerignore` covering `*.mp4`, `*.mov`, `*.zip`, `*.psd`, and media directories such as `public/videos/`.
  • **User uploads written to the container filesystem** — the service is stateless; anything on local disk is gone on the next deploy, restart, or scale-out. Uploads go to cloud storage.
  • **Frequently-updated static resources served from the image** — if an asset changes on its own schedule, every change forces a full service redeploy. Serve it from cloud storage so the service only redeploys when the *code* changes.
  • Treating CloudR
Read more
Ships withawesome-cloudbase-examples

精选的腾讯云开发(Tencent CloudBase,TCB)示例项目和资源列表 云开发(Tencent CloudBase,TCB) 是腾讯云提供的云原生一体化开发环境和工具平台,为开发者提供高可用、自动弹性扩缩的后端云服务,包含计算、存储、托管等能力,可用于构建多种应用场景下的应用系统。

Get the whole plugin