tencentcloudbase/cloudbase-ai-toolkit-cloudbase-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 MySQL/PostgreSQL/Redis.
This is a copy. The original lives at tencentcloudbase/cloudrun-development.
npx skills add https://github.com/TencentCloudBase/CloudBase-AI-Toolkit --skill cloudrun-development
If this environment only installed the current skill, start from the CloudBase main entry and use the published cloudbase/references/... paths for sibling skills.
https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/SKILL.mdhttps://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloudrun-development/SKILL.mdKeep local references/... paths for files that ship with the current skill directory. When this file points to a sibling skill such as auth-tool-cloudbase or web-development, use the standalone fallback URL shown next to that reference.
DATABASE_URL / TCP database clients.queryCloudRun, manageCloudRun, Dockerfile, service domains, or public/private access.references/vpc-and-database.md.../cloud-functions/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloud-functions/SKILL.md)../cloudbase-agent/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloudbase-agent/SKILL.md)../auth-web-cloudbase/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/auth-web-cloudbase/SKILL.md)references/vpc-and-database.mdPORT.DATABASE_URL / MySQL / PostgreSQL / Redis but omitting serverConfig.VpcConf — deploy appears to succeed, then runtime DB connections fail.OpenAccessTypes (how users reach the service) with VpcConf (how the service reaches VPC databases).VpcConf (egress / private network) before deploy — see references/vpc-and-database.md.Use CloudBase Run when the task needs a deployed backend service rather than a short-lived serverless function.
| Dimension | Function mode | Container mode |
| --- | --- | --- |
| Best for | Fast start, Node.js service patterns, built-in framework, Agent flows | Existing containers, arbitrary runtimes, custom system dependencies |
| Port model | Framework-managed local mode, deployed service still follows platform rules | App must listen on injected PORT |
| Dockerfile | Not required | Required |
| Local run through tools | Supported | Not supported |
| Typical use | Streaming APIs, low-latency backend, Agent service | Custom language stack, migrated container app |
PORTMem = 2 × CPUqueryCloudRunmanageCloudRunforce: truetargetPathDATABASE_URL, docker-compose DB services, ORM configs)references/vpc-and-database.md before deployVpcConf when neededqueryCloudRun(action="list") -> list servicesqueryCloudRun(action="detail") -> inspect one service and its latest deploy status when availablequeryCloudRun(action="templates") -> see available startersqueryCloudRun(action="getDeployLog") -> retrieve the latest deploy log or a specified buildIdmanageCloudRun(action="init") -> create local projectmanageCloudRun(action="download") -> pull remote codemanageCloudRun(action="run") -> local run for Function modemanageCloudRun(action="deploy") -> deploy local project (existing services: RMW preserves remote VpcConf / EnvParams keys / OpenAccessTypes)manageCloudRun(action="updateConfig") -> config-only update (no code upload; VPC / EnvParams / scaling / access types)manageCloudRun(action="delete") -> delete servicemanageCloudRun(action="createAgent") -> create Agent serviceOpenAccessTypes. You must set serverConfig.VpcConf and use the database private address. Read references/vpc-and-database.md.{ "action": "init", "serverName": "my-svc", "targetPath": "/abs/ws/my-svc" }
{ "action": "run", "serverName": "my-svc", "targetPath": "/abs/ws/my-svc", "runOptions": { "port": 3000 } }
{
"action": "deploy",
"serverName": "my-svc",
"targetPath": "/abs/ws/my-svc",
"serverConfig": {
"OpenAccessTypes": ["PUBLIC"],
"Cpu": 0.5,
"Mem": 1,
"MinNum": 1,
"MaxNum": 5
}
}
{
"action": "deploy",
"serverName": "my-existing-app",
"targetPath": "/abs/ws/my-existing-app",
"serverConfig": {
"OpenAccessTypes": ["PUBLIC"],
"Cpu": 0.5,
"Mem": 1,
"MinNum": 1,
"MaxNum": 5,
"EnvParams": "{\"DATABASE_URL\":\"postgres://user:[email protected]:5432/app\"}",
"VpcConf": {
"VpcId": "vpc-xxxxxxxx",
"SubnetId": "subnet-xxxxxxxx"
}
}
}
Valid OpenAccessTypes values: OA (办公网访问), PUBLIC (公网访问), MINIAPP (小程序访问), VPC (VPC访问). Use PUBLIC for web applications that need public HTTPS access.
MinNum: 1 is the recommended default when you want to reduce cold-start latency. If the user explicitly prefers lower cost and accepts more cold starts, explain the tradeoff and let them reduce MinNum to 0.
VpcConf in the same VPC/region as the database.queryCloudRun(action="detail").VpcConf, wrong private host, or security group. Follow references/vpc-and-database.md before rewriting application code.All packaged reference files (required for skill lint reachability):
Take tencentcloudbase/cloudbase-ai-toolkit-cloudbase-cloudrun-development 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.