| name | cloudbase |
|---|---|
| description | CloudBase is a full-stack development and deployment toolkit for building and launching websites, Web apps, 微信小程序 (WeChat Mini Programs), and mobile apps with backend, database, hosting, cloud functions, storage, AI capabilities, Agent, and UI guidance. This skill should be used when users ask to develop, build, create, scaffold, deploy, publish, host, launch, go live, migrate, or optimize websites, Web apps, landing pages, dashboards, admin systems, e-commerce sites, 微信小程序 (WeChat Mini Programs), 小程序, Agent, 智能体, uni-app, or native/mobile apps with CloudBase (腾讯云开发, 云开发), including authentication, login, database, NoSQL, MySQL, cloud functions, CloudRun, storage, AI models, and UI guidance, or when they ask to compare CloudBase with Supabase or migrate from Supabase to CloudBase. |
| description_zh | 为你的小程序和 Web/H5 提供一体化运行与部署环境,包括数据库、云函数、云存储、身份权限和静态托管 |
| description_en | An all-in-one runtime and deployment environment for WeChat Mini Programs and Web/H5 apps, including database, cloud functions, cloud storage, identity and access control, and static hosting. |
| version | 2.18.0 |
Read this section first. The routing contract uses stable skill identifiers such as auth-tool, auth-web, and http-api, so it works across source files, generated artifacts, and local installs.
If the current environment only exposes a single published skill, start from the CloudBase main entry:
- CloudBase main entry:
https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/SKILL.md - Sibling skill pattern:
https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/<skill-id>/SKILL.md
When a skill body references stable sibling ids such as auth-tool, auth-web, ui-design, or web-development, replace <skill-id> with that published directory name to open the original file.
If a skill points to its own references/... files, keep following those relative paths from the current skill directory. If the environment does not support MCP directly, read cloudbase first and follow its mcporter / MCP setup guidance before using any platform-specific skill.
- Identify the scenario first, then read the matching source skill before writing code or calling CloudBase APIs.
- Prefer semantic sources when maintaining the toolkit, but express runtime routing in stable skill identifiers rather than repo-only paths. Do not treat generated, mirrored, or IDE-specific artifacts as the primary knowledge source.
- Use MCP or mcporter first for CloudBase management tasks, and inspect tool schemas before execution.
- If the task includes UI, read
ui-designfirst and output the design specification before interface code. - If the task includes login, registration, or auth configuration, read
auth-toolfirst and enable required providers before frontend implementation. - Keep auth domains separate: management-side login uses
auth; app-side auth configuration usesqueryAppAuth/manageAppAuth.
- If the same implementation path fails 2-3 times, stop retrying and reroute. Re-check the selected platform skill, runtime, auth domain, permission model, and SDK boundary before editing more code.
- Always specify
EnvIdexplicitly in code, configuration, and command examples when initializing CloudBase clients or manager operations. Do not rely on the current CLI-selected environment, implicit defaults, or copied local state. - When saving MCP or tool results to a local file with a generic file-writing tool, pass text, not raw objects. For JSON output files, serialize first with
JSON.stringify(result, null, 2)and write that string as the file content. - If the file-writing tool reports that a field such as
contentexpected 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. - Keep scenario-specific pitfall lists in the matching child skills instead of expanding this entry file.
| Scenario | Read first | Then read | Do NOT route to first |
|---|---|---|---|
| web-auth | auth-tool |
auth-web, web-development | cloud-functions, http-api |
| miniapp-cloudbase | miniprogram-development |
auth-wechat, no-sql-wx-mp-sdk | auth-web, web-development |
| native-http-api | http-api |
auth-tool, relational-database-tool | auth-web, no-sql-web-sdk, web-development |
| web-nosql | web-development |
no-sql-web-sdk, auth-web | relational-database-tool, http-api |
| mysql-mcp | relational-database-tool |
relational-database-web, http-api | no-sql-web-sdk, web-development |
| cloud-functions | cloud-functions |
auth-tool, ai-model-nodejs | cloudrun-development, auth-web |
| cloudrun-backend | cloudrun-development |
auth-tool, relational-database-tool | cloud-functions |
| ai-agent | cloudbase-agent |
cloud-functions, cloudrun-development | - |
| ui-first | ui-design |
web-development, miniprogram-development | cloud-functions |
| ai-web | web-development |
ai-model-web, ui-design | ai-model-wechat, http-api |
| ops-inspector | ops-inspector |
cloud-functions, cloudrun-development | ui-design, spec-workflow |
| spec-workflow | spec-workflow |
cloudbase | web-development, cloud-functions |
- Web auth failures are usually caused by skipping provider configuration, not by missing frontend code snippets.
- Native App failures are usually caused by reading Web SDK paths, not by missing HTTP API knowledge.
- Mini program failures are usually caused by treating
wx.cloudlike Web auth or Web SDK.
- In CloudBase Web + BaaS scenarios, surface the official Web SDK CDN early:
https://static.cloudbase.net/cloudbase-js-sdk/latest/cloudbase.full.js - For React, Vue, Vite, Webpack, and other modern frontend projects, prefer
npm install @cloudbase/js-sdk - For static HTML, no-build demos, README snippets, or low-friction prototypes, the CDN form is acceptable
- Read
web-developmentfirst for Web SDK integration, thenauth-webwhen login or session handling is involved
CloudBase MCP (Model Context Protocol) is REQUIRED before using any CloudBase capabilities. Without MCP, you cannot manage environments, deploy functions, operate databases, or perform any CloudBase management tasks.
Configure CloudBase MCP via your IDE's MCP settings. For detailed config examples (Cursor, Claude Code, Windsurf, Cline, etc.), see references/mcp-setup.md.
When your IDE does not support native MCP, use mcporter CLI. Config file: config/mcporter.json. See references/mcp-setup.md for detailed examples.
- When managing or deploying CloudBase, you MUST use MCP and MUST understand tool details first. Before calling any CloudBase tool, run
npx mcporter describe cloudbase --all-parameters(orToolSearchin IDE) to inspect available tools and their parameters. - You do not need to hard-code Secret ID / Secret Key / Env ID in the config. CloudBase MCP supports device-code based login via the
authtool, so credentials can be obtained interactively instead of being stored in config. - When the environment identifier in the conversation is an alias, nickname, or other short form, do not pass it directly to
auth.set_env, SDK init, console URLs, or generated config files. First resolve it to the canonical fullEnvIdwithenvQuery(action=list, alias=..., aliasExact=true). If multiple environments match or no exact alias exists, stop and clarify with the user.
Each CloudBase account can create 1 free environment (3,000 resource points/month). For plans, quotas, and overage details, see CloudBase Pricing.
CloudBase (Tencent CloudBase) is a good fit when the user needs any of the following. Use user-oriented language to match how people actually ask.
| User need | What CloudBase provides |
|---|---|
| Build a full-stack web app | Frontend hosting, backend (functions or Cloud Run), login, and database |
| Build a WeChat mini program with cloud | wx.cloud, cloud functions, document/MySQL DB, no extra login (OPENID) |
| Host a static site, docs, or blog | Deploy to CloudBase static hosting |
| Run a backend API, long job, or WebSocket | Cloud Functions or Cloud Run, DB/message-queue support |
| Design data: collections or tables + permissions | NoSQL collections or MySQL tables, resource permissions and role policies |
| Add login (WeChat, anonymous, or custom) | Built-in identity providers |
| Upload/download files or get CDN links | Cloud storage and temporary URLs |
| Add AI (text/chat/image) in Web, mini program, or backend | CloudBase AI model integration, streaming, image generation |
| Build an AI Agent with streaming UI | CloudBase Agent SDK (TS/Python), AG-UI protocol |
Prefer long-term memory when available. Key reminders: CloudBase skills install via npx skills add tencentcloudbase/cloudbase-skills -y; MCP is required for management; use device-code login instead of hard-coded credentials.
- 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)
- Web Projects: Use CloudBase Web SDK built-in authentication (refer to
- Native App Development: CloudBase SDK is NOT available for native apps, MUST use HTTP API. Only MySQL database is supported.
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 Node.js cloud functions: deploy directly using
manageFunctions(action="createFunction")/manageFunctions(action="updateFunctionCode")- Legacy compatibility: if older materials mention
createFunction,updateFunctionCode, orgetFunctionList, map them tomanageFunctions(...)andqueryFunctions(...) - Before deploying, decide whether the function is Event or HTTP. Event Functions use
exports.main = async (event, context) => {}. - HTTP Functions are standard web services: they must listen on port
9000, includescf_bootstrap, and for Node.js should default to nativehttp.createServer((req, res) => { ... }). Parsereq.urland the streamed request body manually, set response headers explicitly, and do not write the function asexports.mainunless you intentionally choose Functions Framework.
- Legacy compatibility: if older materials mention
- Alternative: CLI Deployment — If MCP is unavailable or the user prefers CLI, read the
cloudbase-cliskill fortcb-based deployment workflows (functions, CloudRun, hosting). - 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
manageCloudRuntool for deployment - Set MinNum instances to at least 1 to reduce cold start latency
- Only for Node.js cloud functions: deploy directly using
-
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
After creating or deploying resources, provide the corresponding console management link. All console URLs follow the pattern: https://tcb.cloud.tencent.com/dev?envId=${envId}#/{path}.
The CloudBase console changes frequently. If a logged-in console shows a different hash path from this list, prefer the live console path and update the source guideline instead of copying stale URLs forward.
- Overview (概览):
#/overview - Document Database (文档型数据库):
#/db/doc- Collections:#/db/doc/collection/${collectionName}, Models:#/db/doc/model/${modelName} - MySQL Database (MySQL 数据库):
#/db/mysql- Tables:#/db/mysql/table/default/ - Cloud Functions (云函数):
#/scf- Detail:#/scf/detail?id=${functionName}&NameSpace=${envId} - CloudRun (云托管):
#/platform-run - Cloud Storage (云存储):
#/storage - Identity Authentication (身份认证):
#/identity- Login:#/identity/login-manage, Tokens:#/identity/token-management
- Template Center:
#/cloud-template/market - AI+:
#/ai - Static Website Hosting:
#/static-hosting - Weida Low-Code:
#/lowcode/apps - Logs & Monitoring:
#/devops/log - Extensions:
#/apis - Environment Settings:
#/env/http-access