Cloudbase

From TencentCloudBase/CloudBase-MCP · View interactive version

Cloudbase is an AI agent skill from the GitHub repository TencentCloudBase/CloudBase-MCP. Use this skill when you develop, design, build, deploy, debug, migrate, or troubleshoot CloudBase (腾讯云开发, 云开发, TCB, 微信云开发) projects — Web, 微信小程序, 小程序, uni-app, mobile (iOS, Android, Flutter, React Native). Covers UI (页面, 界面, 表单, dashboard, prototype, 原型); auth (登录, 注册, OAuth, publishable key); datab

How to use this skill

Skill file

CloudBase Development Guidelines

Step 0 — Confirm the site (domestic vs international)

CloudBase has two independent account systems: 国内站 (domestic, cloud.tencent.com) and 国际站 (international, tencentcloud.com). Environments, consoles, API keys, and login state do not cross over. A wrong-site login usually looks like "logged in, but no environments visible" rather than a clear error — so settle the site before installing MCP, logging in, or binding an env.

Infer it when you can (console domain, envId, an existing error); otherwise ask the user once. Do not guess.

| | 国内站 domestic | 国际站 international |

|---|---|---|

| Remote MCP (preferred) | https://tcb-api.cloud.tencent.com/mcp/v1 | https://tcb-api.tencentcloud.com/mcp/v1 |

| Local stdio MCP | nothing to set (TCB_SITE is domestic by default) | TCB_SITE=intl + TCB_REGION=ap-singapore |

| tcb CLI | default | TCB_IS_INTL=true (or tcb config set isIntl true) |

| Project record .cloudbase/project.json | site omitted, or "domestic" | "site": "intl", "region": "ap-singapore" |

| Console | tcb.cloud.tencent.com | tcb.tencentcloud.com |

| Default region | ap-shanghai | ap-singapore |

| NoSQL / document DB tools | available | not available |

Details and copy-paste configs: references/mcp-setup.md. CLI specifics: references/tooling-fallback.md. First-run orchestration (trigger/skip, conflict arbitration, MCP-down fallback): references/site-onboarding.md.

Step 0.1 — Decide the project type before installing anything

Read the project root, or the user's own words (e.g. "我主要做微信小程序开发"). A WeChat mini program has project.config.json plus app.json / miniprogram/app.json. For a mini program project, generic CloudBase setup only connects the backend — it does not let the agent open the simulator or preview the mini program. Route to miniprogram-development first, recommend configuring the 微信开发者工具 Skill (WeChat DevTools Skill), and verify the simulator preview before taking business requests. The mini program tutorial is not a fallback-only step.

Workflow

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 → Prefer MCP; if MCP tools are missing in THIS session,
   │     configure MCP for next session and use `tcb` CLI now (see tooling-fallback.md)
   └── 2b. Frontend implementation → Write code, install deps, start server, test
3. Close-out  →  Run cloudbase-code-review, fix errors, declare done
                   (after a verified deploy: optionally offer Deployment Share once — see references/deployment-workflow.md §5)

Key constraints: Stage 2a must precede frontend code. Stage 3 is mandatory.

Activation Contract

Routing uses stable skill ids (auth-tool-cloudbase, auth-web-cloudbase, http-api-cloudbase, …) across source, generated artifacts, and installs.

Standalone skill fallback

If only one published skill is exposed:

Follow relative references/... paths from the current skill. If MCP is unavailable in this session, follow references/tooling-fallback.md: configure MCP via references/mcp-setup.md for the next session, and use tcb CLI via the cloudbase-cli skill (read core.md + the matching domain reference — not tcb deploy) to finish login/manage now. If npm/npx are missing, follow the “No npm/npx” section in tooling-fallback.md.

Global rules before action

Universal guardrails

Engineering constitution (applies to every scenario)

These rules override convenience. Full rationale lives in web-development.

High-priority routing

<!-- DO NOT EDIT: auto-generated from references/activation-map.yaml -->

| Scenario | Read first | Then read | Do NOT route to first | Must check before action |

|----------|------------|-----------|------------------------|--------------------------|

| Minimal Web BaaS demo (fast path) | minimal-web-baas-demo | web-development, no-sql-web-sdk, postgresql-development | cloud-functions, cloudrun, spec-workflow, ui-design | BaaS-first Web SDK CRUD, MCP schema only, zero cloud functions unless secrets/cron/rules-cannot-express |

| 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, postgresql-development | 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. New relational work uses PostgreSQL |

| Existing MySQL (do not recommend) | relational-database-mcp-cloudbase | relational-database-web | postgresql-development, no-sql-web-sdk | Only when the environment already has MySQL. New relational work uses PostgreSQL |

| 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, postgresql-development | 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; use queryEnv(action=metrics) for QPS/CPU (never callCloudApi); time range for logs |

| Spec workflow / architecture design | spec-workflow | cloudbase | web-development, cloud-functions | Requirements, design, tasks confirmed |

Routing reminders

MCP + CLI prerequisite

Prefer CloudBase MCP for management/deploy when tools are loaded in the current session. Setup: references/mcp-setup.md. First-session / unavailable path: references/tooling-fallback.md.

On-demand references

Load only when needed (do not expand this entry):

Reference index

All packaged reference files (required for skill lint reachability):

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.