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.
71
87%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
High
Do not use without reviewing
The canonical home for this skill is cloudrun-development in TencentCloudBase/CloudBase-AI-Toolkit
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 |
Choose mode first
Follow mandatory runtime rules
PORTMem = 2 × CPUUse the correct tools
queryCloudRunmanageCloudRunforce: truetargetPathFollow the deployment sequence
DATABASE_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 projectmanageCloudRun(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:pass@10.x.x.x: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):
3dcff8b
Canonical home
since Jul 28, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.