Essential CloudBase (TCB, Tencent CloudBase, 云开发, 微信云开发) development guidelines. MUST read when working with CloudBase projects, developing web apps, mini programs, or backend services using CloudBase platform.
インストール
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Essential CloudBase (TCB, Tencent CloudBase, 云开发, 微信云开发) development guidelines. MUST read when working with CloudBase projects, developing web apps, mini programs, or backend services using CloudBase platform.
CloudBase Development Guidelines
💡 Recommended: MCP Installation
For enhanced CloudBase development experience, we recommend installing CloudBase MCP (Model Context Protocol).
CloudBase MCP provides essential tools for CloudBase development, including environment management, function deployment, database operations, and more. While not required, installing MCP will significantly improve your development workflow.
MCP Configuration Instructions
Most Coding Agents support project-level MCP configuration. The standard JSON configuration structure is:
Spec Workflow: spec-workflow - Standard software engineering process (requirements, design, tasks)
Core Behavior Rules
Project Understanding: Read current project's README.md, follow project instructions
Development Order: Prioritize frontend first, then backend
Backend Strategy: Prefer using SDK to directly call CloudBase database, rather than through cloud functions, unless specifically needed
Deployment Order: When there are backend dependencies, prioritize deploying backend before previewing frontend
Authentication Rules: Use built-in authentication functions, distinguish authentication methods by platform
Web Projects: Use CloudBase Web SDK built-in authentication (refer to auth-web)
Mini Program Projects: Naturally login-free, get OPENID in cloud functions (refer to auth-wechat)
Native Apps: Use HTTP API for authentication (refer to http-api)
Native App Development: CloudBase SDK is NOT available for native apps, MUST use HTTP API. Only MySQL database is supported.
Deployment Workflow
When users request deployment to CloudBase:
Check Existing Deployment:
Read README.md to check for existing deployment information
Identify previously deployed services and their URLs
Determine if this is a new deployment or update to existing services
Backend Deployment (if applicable):
Only for nodejs cloud functions: deploy directly using createFunction tools
Criteria: function directory contains index.js with cloud function format export: exports.main = async (event, context) => {}
For other languages backend server (Java, Go, PHP, Python, Node.js): deploy to Cloud Run
Ensure backend code supports CORS by default
Prepare Dockerfile for containerized deployment
Use manageCloudRun tool for deployment
Set MinNum instances to at least 1 to reduce cold start latency
Frontend Deployment (if applicable):
After backend deployment completes, update frontend API endpoints using the returned API addresses
Build the frontend application
Deploy to CloudBase static hosting using hosting tools
Display Deployment URLs:
Show backend deployment URL (if applicable)
Show frontend deployment URL with trailing slash (/) in path
Add random query string to frontend URL to ensure CDN cache refresh
Update Documentation:
Write deployment information and service details to README.md
Include backend API endpoints and frontend access URLs
Document CloudBase resources used (functions, cloud run, hosting, database, etc.)
This helps with future updates and maintenance
CloudBase Console Entry Points
After creating/deploying resources, provide corresponding console management page links. All console URLs follow the pattern: https://tcb.cloud.tencent.com/dev?envId=${envId}#/{path}
Core Function Entry Points
Overview (概览): #/overview - Main dashboard
Template Center (模板中心): #/cloud-template/market - Project templates