Essential CloudBase (TCB, Tencent CloudBase, 云开发, 微信云开发) development guidelines. MUST read for CloudBase Web apps, mini programs, backend services, cloud functions, MySQL/NoSQL/PostgreSQL, auth, storage, CloudRun, or AI/LLM work. Do NOT use for non-Tencent-Cloud / non-CloudBase projects, pure frontend with no CloudBase backend, or self-hosted backends with no CloudBase dependency.
1. Exploration → Read the matching skill completely before writing any code.
Search with searchKnowledgeBase(mode="skill"), then Read full SKILL.md.
2. Implementation
├── 2a. Resource preparation → MCP tools first (auth, DB, storage, security rules)
└── 2b. Frontend implementation → Write code, install deps, start server, test
3. Close-out → Run cloudbase-code-review, fix errors, declare doneKey constraints: Stage 2a must precede frontend code. Stage 3 is mandatory.
Routing uses stable skill ids (auth-tool-cloudbase, auth-web-cloudbase, http-api-cloudbase, …) across source, generated artifacts, and installs.
If only one published skill is exposed, start from the CloudBase main entry:
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/<skill-id>/SKILL.mdReplace <skill-id> with the published directory name. Follow relative references/... paths from the current skill. If MCP is unavailable, read cloudbase and follow references/mcp-setup.md / mcporter setup first.
ui-design first and output the design spec before interface code.auth-tool-cloudbase first and enable providers before frontend implementation.auth; app-side auth uses queryAppAuth / manageAppAuth.EnvId explicitly; do not rely on CLI-selected or implicit env state.auth.set_env, SDK init, console URLs, or generated config. First resolve it to the canonical full EnvId with envQuery(action=list, alias=..., aliasExact=true). If multiple environments match or no exact alias exists, stop and clarify with the user.JSON.stringify(result, null, 2)), not raw objects. If a write tool says content expected a string but received an object, do not retry with the same raw object. Serialize the object first, then retry once with the serialized text, and make sure the retried call actually passes the serialized string rather than the original object.manageApps(action="createApp", ...). manageHosting is only for incremental updates of projects originally deployed via hosting.These rules override convenience. Full rationale lives in web-development.
any to bypass type errors. Prefer unknown + type guards / precise interfaces.tsc / lint / build / tests) and runtime (agent-browser for user-visible flows). Name gaps explicitly if a layer cannot run.try/catch, no deleting failing tests to go green.ai.createModel(...) / wx.cloud.extend.AI.createModel(provider) takes a GroupName, not a vendor/model id. Legal: "cloudbase", "hunyuan-exp", or "custom-<name>". Model ids go in generateText / streamText model field. See ai-model-web / ai-model-nodejs / ai-model-wechat.app.rdb() / queryPgDatabase / managePgDatabase, route to postgresql-development-cloudbase — do not use NoSQL/manageMysqlDatabase for that path. For Web auth guards, use auth.getSession() and require data.session; do not use deprecated getLoginState() / auth.getUser() as login proof.| Scenario | Read first | Then read | Do NOT route to first | Must check before action |
|---|---|---|---|---|
| Web login / registration / auth UI | auth-tool-cloudbase | auth-web, web-development | cloud-functions, http-api | Provider status and publishable key |
| WeChat mini program + CloudBase | miniprogram-development | auth-wechat, no-sql-wx-mp-sdk | auth-web, web-development | Whether the project really uses CloudBase / wx.cloud |
| Native App / Flutter / React Native | http-api-cloudbase | auth-tool, relational-database-tool | auth-web, cloudbase-document-database-web-sdk, web-development | SDK boundary, OpenAPI, auth method |
| Web projects + NoSQL Database | web-development | no-sql-web-sdk, auth-web | relational-database-tool, http-api | Login state and database access permission model |
| CloudBase PostgreSQL / PG | postgresql-development-cloudbase | auth-tool, auth-web-cloudbase, web-development, miniprogram-development, cloud-storage-web, http-api | relational-database-tool, no-sql-web-sdk | PG schema, usernamePassword login, backend/RLS permission model |
| MySQL Database (relational) | relational-database-mcp-cloudbase | relational-database-web, http-api | no-sql-web-sdk, web-development | Distinguish MCP management vs app code access |
| Cloud Functions | cloud-functions | auth-tool, ai-model-nodejs | cloudrun-development, auth-web | Event vs HTTP function, runtime, scf_bootstrap |
| CloudRun backend | cloudrun-development | auth-tool, relational-database-tool | cloud-functions | Container boundary, Dockerfile, CORS |
| AI Agent (智能体开发) | cloudbase-agent | cloud-functions, cloudrun-development | cloud-functions, cloudrun-development | AG-UI protocol, scf_bootstrap, SSE streaming |
| AI model call (大模型调用 / 文本生成 / 图片生成 / 流式对话) | ai-model-web | ai-model-nodejs, ai-model-wechat | cloudbase-agent, cloud-functions, cloudrun-development | 先跑「调用前必须的资格检查」:DescribeActivityInfo(小程序成长计划) + DescribeEnvPostpayPackage(Token Credits 资源包) |
| UI generation | ui-design | web-development, miniprogram-development | cloud-functions | Design specification first |
| AI Model (Web) | web-development | ai-model-web, ui-design | ai-model-wechat, http-api | Platform and streaming interaction mode |
| Resource health inspection / troubleshooting | ops-inspector | cloud-functions, cloudrun-development | ui-design, spec-workflow | CLS enabled, time range for logs |
| Spec workflow / architecture design | spec-workflow | cloudbase | web-development, cloud-functions | Requirements, design, tasks confirmed |
wx.cloud like Web auth/SDK.app.rdb() / documented OpenAPI.DescribeEnvPostpayPackage / DescribeActivityInfo before changing code.CloudBase MCP is required for management/deploy. Setup details: references/mcp-setup.md. Verify with npx mcporter list | grep cloudbase or the IDE MCP panel before any CloudBase tool call. Prefer device-code login via auth; do not hard-code secrets.
Load only when needed (do not expand this entry):
references/deployment-workflow.md — deploy backend/frontend, manageApps vs hosting, URL/docs updatesreferences/console-links.md — console hash paths after creating resourcesreferences/scenarios.md — user-need → CloudBase capability mappingreferences/mcp-setup.md — IDE MCP / mcporter config and auth examplesreferences/activation-map.yaml — canonical routing contract source3dcff8b
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.