$npx -y skills add tencentcloudbase/cloudbase-skills --skill cloudbaseUse this skill when you develop, design, build, deploy, debug, migrate, or troubleshoot CloudBase (腾讯云开发, 云开发, TCB, 微信云开发) projects. Covers Web apps (React, Vue, Vite, Next, Nuxt, dashboards, 管理后台), 微信小程序, 小程序, uni-app, native/mobile (iOS, Android, Flutter, React Native) via HTTP
| 1 | # CloudBase Development Guidelines |
| 2 | |
| 3 | ## 📁 Reference Files Location |
| 4 | |
| 5 | All reference documentation files are located in the `references/` directory relative to this file. |
| 6 | |
| 7 | **File Structure:** |
| 8 | ``` |
| 9 | cloudbase/ |
| 10 | ├── SKILL.md # This file (main entry) |
| 11 | └── references/ # All reference documentation |
| 12 | ├── auth-web/SKILL.md # Web authentication guide |
| 13 | ├── auth-wechat/SKILL.md # WeChat authentication guide |
| 14 | ├── no-sql-web-sdk/SKILL.md # NoSQL database for Web |
| 15 | ├── ui-design/ # UI design guidelines |
| 16 | └── ... # Other reference docs |
| 17 | ``` |
| 18 | |
| 19 | **How to use:** When this document mentions reading a reference file like `references/auth-web/SKILL.md`, simply read that file from the `references/` subdirectory. |
| 20 | |
| 21 | --- |
| 22 | |
| 23 | |
| 24 | ## Workflow |
| 25 | |
| 26 | Every CloudBase task follows this three-stage process: |
| 27 | |
| 28 | ``` |
| 29 | 1. Exploration → Read the matching skill completely before writing any code. |
| 30 | Search for it with searchKnowledgeBase(mode="skill"), then |
| 31 | Read the full SKILL.md content. Do not rely on search summaries. |
| 32 | 2. Implementation |
| 33 | ├── 2a. Resource preparation → Use MCP tools to prepare backend resources |
| 34 | │ (enable auth providers, create database tables, configure storage, |
| 35 | │ set up security rules — before writing any frontend code) |
| 36 | └── 2b. Frontend implementation → Write code, install deps, start server, test |
| 37 | 3. Close-out → Run cloudbase-code-review, fix errors, declare done |
| 38 | ``` |
| 39 | |
| 40 | **Key constraints:** |
| 41 | - Stage 2a (resource preparation) must precede frontend code. Always use MCP tools. |
| 42 | - Stage 3 is mandatory. The close-out includes automated lint checks and manual LLM review. Do not skip it. |
| 43 | |
| 44 | ## Activation Contract |
| 45 | |
| 46 | 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. |
| 47 | |
| 48 | ### Standalone skill fallback |
| 49 | |
| 50 | If the current environment only exposes a single published skill, start from the CloudBase main entry: |
| 51 | |
| 52 | - CloudBase main entry: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/SKILL.md` |
| 53 | - Sibling skill pattern: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/<skill-id>/SKILL.md` |
| 54 | |
| 55 | 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. |
| 56 | |
| 57 | 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. |
| 58 | |
| 59 | ### Global rules before action |
| 60 | |
| 61 | - Identify the scenario first, then read the matching source skill before writing code or calling CloudBase APIs. |
| 62 | - 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. |
| 63 | - Use MCP or mcporter first for CloudBase management tasks, and inspect tool schemas before execution. |
| 64 | - If the task includes UI, read `ui-design` first and output the design specification before interface code. |
| 65 | - If the task includes login, registration, or auth configuration, read `auth-tool` first and enable required providers before frontend implementation. |
| 66 | - Keep auth domains separate: management-side login uses `auth`; app-side auth configuration uses `queryAppA |