Standalone Install Note
If this environment only installed the current skill, start from the CloudBase main entry and use the published cloudbase/references/... paths for sibling skills.
- CloudBase main entry:
https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/SKILL.md
- Current skill raw source:
https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloudbase-platform/SKILL.md
Keep local references/... paths for files that ship with the current skill directory. When this file points to a sibling skill such as auth-tool or web-development, use the standalone fallback URL shown next to that reference.
Cross-cutting protocols (always load these when doing code changes or deployments in standalone mode):
- Change Safety Protocol:
https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloudbase-platform/references/protocols/change-safety-protocol.md
- Deployment Gate:
https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloudbase-platform/references/protocols/deployment-gate.md
Activation Contract
Use this first when
- The user asks which CloudBase capability, service, or tool to use, or needs a high-level understanding of hosting, storage, authentication, cloud functions, or database options.
- The task is about console navigation, cross-platform differences, permission models, or platform-level best practices before implementation.
Read before writing code if
- It is still unclear whether the task belongs to Web, mini program, cloud functions, storage, MySQL / NoSQL, or auth.
- The response needs platform selection, conceptual explanation, or control-plane navigation more than direct implementation steps.
Then also read
- Web app implementation ->
../web-development/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/web-development/SKILL.md)
- Web auth and provider setup ->
../auth-tool/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/auth-tool/SKILL.md), ../auth-web/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/auth-web/SKILL.md)
- Mini program development ->
../miniprogram-development/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/miniprogram-development/SKILL.md)
- WeChat Pay, Official Account OAuth, JSAPI Pay, or Native QR-code Pay through CloudBase Integration Center ->
../cloudbase-wechat-integration/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloudbase-wechat-integration/SKILL.md; official docs: https://docs.cloudbase.net/integration/introduce/index.md)
- Cloud functions ->
../cloud-functions/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloud-functions/SKILL.md)
- Official HTTP API clients ->
../http-api/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/http-api/SKILL.md)
- Document database ->
../no-sql-web-sdk/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/no-sql-web-sdk/SKILL.md) or ../no-sql-wx-mp-sdk/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/no-sql-wx-mp-sdk/SKILL.md)
- CloudBase PostgreSQL / PG ->
../postgresql-development/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/postgresql-development/SKILL.md)
- MySQL relational database / data modeling ->
../relational-database-tool/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/relational-database-tool/SKILL.md) or ../data-model-creation/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/data-model-creation/SKILL.md)
- Cloud storage ->
../cloud-storage-web/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloud-storage-web/SKILL.md)
Do NOT use for
- Direct implementation of web pages, auth flows, functions, or database operations when a more specific skill already fits.
- Low-level API parameter references or SDK recipes that belong in specialized skills.
Common mistakes / gotchas
- Treating this general skill as the default entry point for all CloudBase development.
- Staying here after the correct implementation skill is already clear.
- Mixing platform overview with platform-specific API shapes or SDK details.
- Using this overview skill as a detour in an existing application where the active auth, storage, and data files are already obvious.
- Making code or configuration changes without first following the Change Safety Protocol (
cloudbase-platform/references/protocols/change-safety-protocol.md).
- Starting any deployment, publish, custom domain, or CloudRun work without first completing the checks in
cloudbase-platform/references/protocols/deployment-gate.md.
- Confusing security domains with custom domains: These are two completely different tools for different purposes:
envDomainManagement (action: create/delete) = Security domains (安全域名) for CORS/request source validation - used for browser upload whitelisting. Does NOT accept certificateId.
manageGateway(action="bindCustomDomain") = Custom domains (自定义域名) for public HTTPS access with SSL certificates - requires domain and certificateId parameters.
When to use this skill
Use this skill for CloudBase platform knowledge when you need to:
- Understand CloudBase storage and hosting concepts
- Compare platform capabilities before implementation
- Understand cross-platform auth differences (Web vs Mini Program)
- Understand database permissions and access control
- Access CloudBase console management pages
This skill provides foundational knowledge that applies to all CloudBase projects, regardless of whether they are Web, Mini Program, or backend services.
How to use this skill (for a coding agent)
Understand platform differences
- Web and Mini Program have completely different authentication approaches
- Must strictly distinguish between platforms
- Never mix authentication methods across platforms
- If the workspace is already an application with TODOs or prebuilt handlers, do not stay in platform overview mode. Move quickly to the concrete implementation skill and the existing files that own the flow.
Follow best practices
- Use SDK built-in authentication features (Web)
- Understand natural login-free feature (Mini Program)
- Configure appropriate database permissions
- Use cloud functions for cross-collection operations
Use correct SDKs and APIs
- Different platforms require different SDKs for data models
- MySQL data models must use models SDK, not collection API
- PostgreSQL / CloudBase PG work must route to
postgresql-development; do not reuse NoSQL app.database() / db.collection(...) snippets or MySQL queryMysqlDatabase / manageMysqlDatabase for PG data paths
- Use
envQuery tool to get environment ID
- In an existing Web application with fixed structure, inspect the existing
src/lib/backend.*, src/lib/auth.*, src/lib/*service.*, and bound page handlers before broad concept reading.
Use the canonical CloudBase MCP setup from the main cloudbase guideline
- This platform overview intentionally does not duplicate the full MCP / mcporter config block
- For the canonical config snippet, CLI commands, and auth examples, read the main
cloudbase guideline first
- Keep the same core rules here: use MCP first, inspect tool schemas before execution, and do not hard-code Secret ID / Secret Key / Env ID in config
- Keep the auth split explicit: management-side login uses
auth, while application-side auth configuration uses queryAppAuth / manageAppAuth
CloudBase Platform Knowledge
Domain Management Tools: Clear Distinction
When working with domain-related tasks, use the correct tool based on the requirement:
| Requirement |
Tool |
Parameters |
Purpose |
| Security Domain (安全域名) |
envDomainManagement |
action, domains (array of host:port strings) |
CORS/request source validation for browser uploads. No certificate involved. |
| Custom Domain (自定义域名) |
manageGateway(action="bindCustomDomain") |
domain (string), certificateId (string) |
Public HTTPS access with SSL certificate. Requires certId from SSL console. |
| Delete Custom Domain |
manageGateway(action="deleteCustomDomain") |
domain (string) |
Remove custom domain binding. |
Key indicators for choosing the right tool:
- Task mentions "certificate ID" or "SSL" → Use
manageGateway(action="bindCustomDomain")
- Task mentions "浏览器上传" or "CORS" or "安全域名" → Use
envDomainManagement
- Task mentions "public access" or "HTTPS" with domain → Use
manageGateway
Recording Operation Results
When a task explicitly requires recording operation steps or results to a file (e.g., RESULT.json):
- Perform the tool calls first to get actual results
- Collect all operation steps with their success/failure status
- Write the complete record to the specified file in the required format
- Include both successful operations and failed attempts with error messages
Example structure for operation recording:
{
"steps": [
{"action": "listDomains", "success": true, "message": "Found 3 domains"},
{"action": "bindDomain", "success": false, "message": "Certificate not found"}
],
"summary": {
"totalAttempted": 2,
"succeeded": 1,
"failed": 1
}
}
Storage and Hosting
Static Hosting vs Cloud Storage:
- CloudBase static hosting and cloud storage are two different buckets
- Generally, publicly accessible files can be stored in static hosting, which provides a public web address
- Static hosting supports custom domain configuration (requires console operation)
- Cloud storage is suitable for files with privacy requirements, can get temporary access addresses via temporary file URLs
- If the task needs COS SDK polling, file metadata lookup, or temporary URLs for an uploaded object, use cloud storage tools (
manageStorage / queryStorage), not manageHosting(action="upload")
Static Hosting Domain:
- CloudBase static hosting domain and website document config can be obtained via
queryHosting(action="websiteConfig")
- Combine with static hosting file paths to construct final access addresses
- Important: If access address is a directory, it must end with
/
Cloud Storage Public URL:
- CRITICAL:
manageStorage(action=upload) and queryStorage(action=url) return temporaryUrl which is a temporary signed URL that expires (default 1 hour). Do NOT use this as a permanent public URL.
- To get the permanent public access URL for a cloud storage object:
- Call
envQuery(action=info) to get environment details
- Extract the storage CDN domain from
EnvInfo.Storages[0].CdnDomain (e.g., your-env-id.tcb.qcloud.la)
- Construct the public URL:
https://{CdnDomain}/{cloudPath}
- Example: If
CdnDomain is env-xxx.tcb.qcloud.la and cloudPath is uploads/avatar.jpg, the public URL is https://env-xxx.tcb.qcloud.la/uploads/avatar.jpg
- Note: The public URL is accessible only if the storage bucket ACL allows public read (default is
PRIVATE which requires signed URLs)
Environment and Authentication
SDK Initialization:
- CloudBase SDK initialization requires environment ID
- Can query environment ID via
envQuery tool
- If the user only provides an environment alias, nickname, or other short form, resolve it with
envQuery(action="list", alias=..., aliasExact=true) first and use the returned full EnvId
- Do not pass alias-like short forms directly into SDK init,
auth.set_env, console URLs, or generated config files
- For Web, always initialize synchronously:
import cloudbase from "@cloudbase/js-sdk"; const app = cloudbase.init({ env: "your-full-env-id" });
- Do not use dynamic imports like
import("@cloudbase/js-sdk") or async wrappers such as initCloudBase() with internal initPromise
- Then proceed with login using a verified method (username/password, phone, email, or WeChat)
Environment Management (via manageEnv):
The manageEnv tool provides full lifecycle management for CloudBase environments.
| Action |
Description |
Key Parameters |
listPackages |
Query available plans |
(none) |
create |
Create new environment (needs confirm) |
alias, packageId, resources, region, duration |
modifyPlan |
Change plan (upgrade/downgrade, needs confirm) |
envId, packageId |
renew |
Renew environment (needs confirm) |
envId, duration |
Creating an environment with specific resources:
manageEnv(action="create", alias="my-env", packageId="baas_personal",
resources=["flexdb","storage","function","postgresql"], confirm="yes")
resources (optional, create only): controls which CloudBase capabilities to enable:
flexdb — Document database (NoSQL)
storage — Cloud Storage
function — Cloud Functions
postgresql — PostgreSQL relational database (PG mode)
- Defaults to all enabled if omitted.
- ⚠️ All paid operations (create / modifyPlan / renew) require
confirm="yes".
Querying available packages before creating:
manageEnv(action="listPackages")
Changing plan (e.g. personal → standard):
manageEnv(action="modifyPlan", envId="your-env-id", packageId="baas_pf_standard", confirm="yes")
Renewing an environment:
manageEnv(action="renew", envId="your-env-id", duration=1, confirm="yes")
Authentication Best Practices
Important: Authentication methods for different platforms are completely different, must strictly distinguish!
Web Authentication
- Must use SDK built-in authentication: CloudBase Web SDK provides complete authentication features
- Recommended method: SMS login with
auth.getVerification(), for detailed, refer to web auth related docs
- Forbidden behavior: Do not use cloud functions to implement login authentication logic
- Session management: For route guards and login proof, use
auth.getSession() and require data.session; do not use deprecated getLoginState() or auth.getUser() / auth.getCurrentUser() as proof of real login.
- Provider and login-method setup: Use
queryAppAuth / manageAppAuth, not the MCP auth tool
- Anonymous login is disabled by default. The SDK initialized with
accessKey automatically creates an anonymous session. If the app uses AuthGuard or RLS for access control, ensure is_anonymous checks are in place when anonymous access is allowed.
- ⚠️ PG RLS: Use
auth.uid(), NOT current_user. When writing RLS policies for CloudBase PostgreSQL, the user identity must use auth.uid() (returns the JWT sub / actual user ID). Do NOT use current_user or current_setting(...) — these PostgreSQL built-in functions return the database role name (e.g. authenticated), not the CloudBase auth user ID. CloudBase PG provides four auth helper functions: auth.uid(), auth.role(), auth.email(), auth.jwt(). Verify availability with SELECT proname FROM pg_proc WHERE pronamespace = 'auth'::regnamespace.
Mini Program Authentication
- Login-free feature: Mini program CloudBase is naturally login-free, no login flow needed
- User identifier: In cloud functions, get
wxContext.OPENID via wx-server-sdk
- User management: Manage user data in cloud functions based on openid
- Forbidden behavior: Do not generate login pages or login flow code
Cloud Functions
- Node.js Cloud Functions:
- Node.js cloud functions need to include
package.json, declaring required dependencies
- Can use
manageFunctions(action="createFunction") to create functions
- Use
manageFunctions(action="updateFunctionCode") to deploy cloud functions
- Prioritize cloud dependency installation, do not upload node_modules
functionRootPath refers to the parent directory of function directories, e.g., cloudfunctions directory
Database Permissions
⚠️ CRITICAL: Always configure permissions BEFORE writing database operation code!
Permission Model:
- CloudBase database access has permissions
- Default basic permissions include:
- READONLY: Everyone can read, only creator/admin can write
- PRIVATE: Only creator/admin can read/write
- ADMINWRITE: Everyone can read, only admin can write (⚠️ NOT for Web SDK write!)
- ADMINONLY: Only admin can read/write
- CUSTOM: Fine-grained control with custom rules
Platform Compatibility (CRITICAL):
- ⚠️ Web SDK cannot use
ADMINWRITE or ADMINONLY for write operations
- ✅ For user-generated content in Web apps, use CUSTOM rules
- ✅ For admin-managed data (products, settings), use READONLY
- ✅ Cloud functions have full access regardless of permission type
Configuration Workflow:
Create collection → Configure security rules → Write code → Test
- Use
managePermissions(action="updateResourcePermission") to configure resource permissions
- If permissions were just changed, allow a short propagation window (typically 2-5 minutes) before retesting, but do not assume every failure is cache. Re-check the actual rule shape and active client write pattern first.
- See
no-sql-web-sdk/security-rules.md for detailed resourceType="noSqlDatabase" examples only; do not treat doc._openid, auth.openid, query-subset validation, or create / update / delete JSON templates as generic rules for functions, storage, or SQL tables
- Official references:
- General security rules overview:
https://cloud.tencent.com/document/product/876/41802
- NoSQL database security rules:
https://docs.cloudbase.net/database/security-rules
- Cloud function security rules:
https://docs.cloudbase.net/cloud-function/security-rules
- Storage security rules:
https://docs.cloudbase.net/storage/security-rules
Compatibility note:
- Canonical plugin name:
permissions
- Legacy plugin aliases
security-rule, security-rules, secret-rule, secret-rules, and access-control still resolve to the permissions plugin
- Legacy tools
readSecurityRule / writeSecurityRule are removed; prefer queryPermissions / managePermissions
Common Scenarios:
- E-commerce products:
READONLY (admin manages via cloud functions)
- Shopping carts:
CUSTOM with auth.uid check (users manage their own)
- Orders:
CUSTOM with ownership validation
- System logs:
PRIVATE or ADMINONLY
Cross-Collection Operations:
- If user has no special requirements, operations involving cross-database collections must be implemented via cloud functions
Role Management (MCP)
CloudBase MCP provides role management capabilities through the queryPermissions and managePermissions tools. These are equivalent to the CLI tcb role commands.
⚠️ CRITICAL: Role policies and resource permissions are two independent systems with NO automatic synchronization.
- Resource permissions (security rules) control access to specific resources (tables, collections, functions, storage)
- Roles (identity dimension) control policy bundles and member assignments
Available Actions
Query Operations (via queryPermissions):
| Action |
Description |
listRoles |
List all roles (system and custom) |
getRole |
Get detailed role information by roleId/roleIdentity/roleName |
Management Operations (via managePermissions):
| Action |
Description |
createRole |
Create a new custom role |
updateRole |
Update an existing role (add/remove policies or members) |
deleteRoles |
Delete one or more custom roles |
addRoleMembers |
Add members to a role |
removeRoleMembers |
Remove members from a role |
addRolePolicies |
Add policies to a role |
removeRolePolicies |
Remove policies from a role |
Usage Examples
List all roles:
queryPermissions(action="listRoles")
Get specific role details:
queryPermissions(action="getRole", roleId="role-xxx")
# or by identity
queryPermissions(action="getRole", roleIdentity="dev_role")
# or by name
queryPermissions(action="getRole", roleName="Developer")
Delete a custom role:
managePermissions(action="deleteRoles", roleIds=["role-xxx"])
Create a custom role:
managePermissions(action="createRole", roleName="Developer", roleIdentity="developer", policies=["FunctionsAccess"], memberUids=["user-uid-1"])
Update a role (add policies):
managePermissions(action="updateRole", roleId="role-xxx", addPolicies=["StoragesAccess"])
⚠️ Note: Only custom roles can be deleted. System roles are read-only.
See also: CLI equivalent commands in cloudbase-cli/references/permission.md
- Cloud Function Optimization:
- If involving cloud functions, while ensuring security, can minimize the number of cloud functions as much as possible
- For example: implement one cloud function for client-side requests, implement one cloud function for data initialization
Data Models
Get Data Model Operation Object:
- Mini Program: Need
@cloudbase/wx-cloud-client-sdk, initialize const client = initHTTPOverCallFunction(wx.cloud), use client.models
- Cloud Function: Need
@cloudbase/node-sdk@3.10+, initialize const app = cloudbase.init({env}), use app.models
- Web: Need
@cloudbase/js-sdk, initialize const app = cloudbase.init({env}), after login use app.models
Data Model Query:
- Can call MCP
manageDataModel tool to:
- Query model list
- Get model detailed information (including Schema fields)
- Get specific models SDK usage documentation
MySQL Data Model Invocation Rules:
- MySQL data models cannot use collection method invocation, must use data model SDK
- Wrong:
db.collection('model_name').get()
- Correct:
app.models.model_name.list({ filter: { where: {} } })
- Use
manageDataModel tool's docs method to get specific SDK usage
Console Management
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}.
The CloudBase console is updated frequently. If a live, logged-in console shows a different hash path from this document, prefer the live console path over stale documentation and then update this skill to match.
Core Function Entry Points
Overview (概览): https://tcb.cloud.tencent.com/dev?envId=${envId}#/overview
- Main dashboard showing environment status, resource usage, and quick access to key features
- Displays overview of all CloudBase services and their status
Template Center (模板中心): https://tcb.cloud.tencent.com/dev?envId=${envId}#/cloud-template/market
- Access project templates for React, Vue, Mini Program, UniApp, and backend frameworks
- AI Builder templates for rapid application generation
- Framework templates: React, Vue, Miniapp, UniApp, Gin, Django, Flask, SpringBoot, Express, NestJS, FastAPI
Document Database (文档型数据库): https://tcb.cloud.tencent.com/dev?envId=${envId}#/db/doc
- Manage NoSQL document database collections
- Collection Management:
https://tcb.cloud.tencent.com/dev?envId=${envId}#/db/doc/collection/${collectionName}
- View, edit, and manage collection data
- Configure security rules and permissions
- Data Model Management:
https://tcb.cloud.tencent.com/dev?envId=${envId}#/db/doc/model/${modelName}
- Create and manage data models with relationships
- View model schema and field definitions
MySQL Database (MySQL 数据库): https://tcb.cloud.tencent.com/dev?envId=${envId}#/db/mysql
- Manage MySQL relational database
- Table Management:
https://tcb.cloud.tencent.com/dev?envId=${envId}#/db/mysql/table/default/
- Create, modify, and manage database tables
- Execute SQL queries and manage table structure
- Important: Must enable MySQL database in console before use
Cloud Functions (云函数): https://tcb.cloud.tencent.com/dev?envId=${envId}#/scf
- Manage and deploy Node.js cloud functions
- Function List:
https://tcb.cloud.tencent.com/dev?envId=${envId}#/scf
- Function Detail:
https://tcb.cloud.tencent.com/dev?envId=${envId}#/scf/detail?id=${functionName}&NameSpace=${envId}
- View function code, logs, and configuration
- Manage function triggers and environment variables
- Monitor function invocations and performance
CloudRun (云托管): https://tcb.cloud.tencent.com/dev?envId=${envId}#/platform-run
- Manage containerized backend services
- Deploy services using Function mode or Container mode
- Configure service scaling, access types, and environment variables
- View service logs and monitoring data
Cloud Storage (云存储): https://tcb.cloud.tencent.com/dev?envId=${envId}#/storage
- Manage file storage buckets
- Upload, download, and organize files
- Configure storage permissions and access policies
- Generate temporary access URLs for private files
AI+: https://tcb.cloud.tencent.com/dev?envId=${envId}#/ai
- Access AI capabilities and services
- AI Builder for generating templates and code
- AI image recognition and other AI features
Static Website Hosting (静态网站托管): https://tcb.cloud.tencent.com/dev?envId=${envId}#/static-hosting
- Deploy and manage static websites
- Alternative URL:
https://console.cloud.tencent.com/tcb/hosting
- Configure custom domains and CDN settings
- View deployment history and access logs
Identity Authentication (身份认证): https://tcb.cloud.tencent.com/dev?envId=${envId}#/identity
- Configure authentication methods and user management
- Login Management:
https://tcb.cloud.tencent.com/dev?envId=${envId}#/identity/login-manage
- Enable/disable login methods (SMS, Email, Username/Password, WeChat, Custom Login)
- Configure SMS/Email templates
- Manage security domain whitelist
- Token Management:
https://tcb.cloud.tencent.com/dev?envId=${envId}#/identity/token-management
- Manage API Keys and Publishable Keys
- View and manage access tokens
Weida Low-Code (微搭低代码): https://tcb.cloud.tencent.com/dev?envId=${envId}#/lowcode/apps
- Access Weida low-code development platform
- Build applications using visual drag-and-drop interface
Logs & Monitoring (日志监控): https://tcb.cloud.tencent.com/dev?envId=${envId}#/devops/log
- View logs from cloud functions, CloudRun services, and other resources
- Monitor resource usage, performance metrics, and error rates
- Set up alerts and notifications
Environment Settings (环境配置): https://tcb.cloud.tencent.com/dev?envId=${envId}#/env/http-access
- Configure environment-level settings
- Manage security domains and CORS settings
- Configure environment variables and secrets
- View environment information and resource quotas
URL Construction Guidelines
- Base URL Pattern:
https://tcb.cloud.tencent.com/dev?envId=${envId}#/{path}
- Replace Variables: Always replace
${envId} with the actual environment ID queried via envQuery tool
- Alias Handling: If the conversation only contains an alias or shorthand, first resolve it with
envQuery(action="list", alias=..., aliasExact=true) and use the returned EnvId; if the alias is ambiguous or missing, ask the user to confirm before generating links
- Resource-Specific URLs: For specific resources (collections, functions, models), replace resource name variables with actual values
- Usage: After creating/deploying resources, provide these console links to users for management operations
Quick Reference
When directing users to console pages:
- Use the full URL with environment ID
- Explain what they can do on each page
- Provide context about why they need to access that specific page
- For configuration pages (like login management), guide users through the setup process
1---
2name: cloudbase-platform
3description: CloudBase platform overview and routing guide. This skill should be used when users need high-level capability selection, platform concepts, console navigation, or cross-platform best practices before choosing a more specific implementation skill.
4version: 2.23.8
5alwaysApply: false
6---
7
8## Standalone Install Note
9
10If this environment only installed the current skill, start from the CloudBase main entry and use the published `cloudbase/references/...` paths for sibling skills.
11
12- CloudBase main entry: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/SKILL.md`
13- Current skill raw source: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloudbase-platform/SKILL.md`
14
15Keep local `references/...` paths for files that ship with the current skill directory. When this file points to a sibling skill such as `auth-tool` or `web-development`, use the standalone fallback URL shown next to that reference.
16
17**Cross-cutting protocols** (always load these when doing code changes or deployments in standalone mode):
18- Change Safety Protocol: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloudbase-platform/references/protocols/change-safety-protocol.md`
19- Deployment Gate: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloudbase-platform/references/protocols/deployment-gate.md`
20
21## Activation Contract
22
23### Use this first when
24
25- The user asks which CloudBase capability, service, or tool to use, or needs a high-level understanding of hosting, storage, authentication, cloud functions, or database options.
26- The task is about console navigation, cross-platform differences, permission models, or platform-level best practices before implementation.
27
28### Read before writing code if
29
30- It is still unclear whether the task belongs to Web, mini program, cloud functions, storage, MySQL / NoSQL, or auth.
31- The response needs platform selection, conceptual explanation, or control-plane navigation more than direct implementation steps.
32
33### Then also read
34
35- Web app implementation -> `../web-development/SKILL.md` (standalone fallback: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/web-development/SKILL.md`)
36- Web auth and provider setup -> `../auth-tool/SKILL.md` (standalone fallback: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/auth-tool/SKILL.md`), `../auth-web/SKILL.md` (standalone fallback: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/auth-web/SKILL.md`)
37- Mini program development -> `../miniprogram-development/SKILL.md` (standalone fallback: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/miniprogram-development/SKILL.md`)
38- WeChat Pay, Official Account OAuth, JSAPI Pay, or Native QR-code Pay through CloudBase Integration Center -> `../cloudbase-wechat-integration/SKILL.md` (standalone fallback: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloudbase-wechat-integration/SKILL.md`; official docs: `https://docs.cloudbase.net/integration/introduce/index.md`)
39- Cloud functions -> `../cloud-functions/SKILL.md` (standalone fallback: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloud-functions/SKILL.md`)
40- Official HTTP API clients -> `../http-api/SKILL.md` (standalone fallback: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/http-api/SKILL.md`)
41- Document database -> `../no-sql-web-sdk/SKILL.md` (standalone fallback: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/no-sql-web-sdk/SKILL.md`) or `../no-sql-wx-mp-sdk/SKILL.md` (standalone fallback: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/no-sql-wx-mp-sdk/SKILL.md`)
42- CloudBase PostgreSQL / PG -> `../postgresql-development/SKILL.md` (standalone fallback: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/postgresql-development/SKILL.md`)
43- MySQL relational database / data modeling -> `../relational-database-tool/SKILL.md` (standalone fallback: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/relational-database-tool/SKILL.md`) or `../data-model-creation/SKILL.md` (standalone fallback: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/data-model-creation/SKILL.md`)
44- Cloud storage -> `../cloud-storage-web/SKILL.md` (standalone fallback: `https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloud-storage-web/SKILL.md`)
45
46### Do NOT use for
47
48- Direct implementation of web pages, auth flows, functions, or database operations when a more specific skill already fits.
49- Low-level API parameter references or SDK recipes that belong in specialized skills.
50
51### Common mistakes / gotchas
52
53- Treating this general skill as the default entry point for all CloudBase development.
54- Staying here after the correct implementation skill is already clear.
55- Mixing platform overview with platform-specific API shapes or SDK details.
56- Using this overview skill as a detour in an existing application where the active auth, storage, and data files are already obvious.
57- Making code or configuration changes without first following the Change Safety Protocol (`cloudbase-platform/references/protocols/change-safety-protocol.md`).
58- Starting any deployment, publish, custom domain, or CloudRun work without first completing the checks in `cloudbase-platform/references/protocols/deployment-gate.md`.
59- **Confusing security domains with custom domains**: These are two completely different tools for different purposes:
60 - `envDomainManagement` (action: create/delete) = Security domains (安全域名) for CORS/request source validation - used for browser upload whitelisting. Does NOT accept certificateId.
61 - `manageGateway(action="bindCustomDomain")` = Custom domains (自定义域名) for public HTTPS access with SSL certificates - requires domain and certificateId parameters.
62
63## When to use this skill
64
65Use this skill for **CloudBase platform knowledge** when you need to:
66
67- Understand CloudBase storage and hosting concepts
68- Compare platform capabilities before implementation
69- Understand cross-platform auth differences (Web vs Mini Program)
70- Understand database permissions and access control
71- Access CloudBase console management pages
72
73**This skill provides foundational knowledge** that applies to all CloudBase projects, regardless of whether they are Web, Mini Program, or backend services.
74
75---
76
77## How to use this skill (for a coding agent)
78
791. **Understand platform differences**
80 - Web and Mini Program have completely different authentication approaches
81 - Must strictly distinguish between platforms
82 - Never mix authentication methods across platforms
83 - If the workspace is already an application with TODOs or prebuilt handlers, do not stay in platform overview mode. Move quickly to the concrete implementation skill and the existing files that own the flow.
84
852. **Follow best practices**
86 - Use SDK built-in authentication features (Web)
87 - Understand natural login-free feature (Mini Program)
88 - Configure appropriate database permissions
89 - Use cloud functions for cross-collection operations
90
913. **Use correct SDKs and APIs**
92 - Different platforms require different SDKs for data models
93 - MySQL data models must use models SDK, not collection API
94 - PostgreSQL / CloudBase PG work must route to `postgresql-development`; do not reuse NoSQL `app.database()` / `db.collection(...)` snippets or MySQL `queryMysqlDatabase` / `manageMysqlDatabase` for PG data paths
95 - Use `envQuery` tool to get environment ID
96 - In an existing Web application with fixed structure, inspect the existing `src/lib/backend.*`, `src/lib/auth.*`, `src/lib/*service.*`, and bound page handlers before broad concept reading.
97
984. **Use the canonical CloudBase MCP setup from the main `cloudbase` guideline**
99 - This platform overview intentionally does **not** duplicate the full MCP / mcporter config block
100 - For the canonical config snippet, CLI commands, and auth examples, read the main `cloudbase` guideline first
101 - Keep the same core rules here: use MCP first, inspect tool schemas before execution, and do not hard-code Secret ID / Secret Key / Env ID in config
102 - Keep the auth split explicit: management-side login uses `auth`, while application-side auth configuration uses `queryAppAuth` / `manageAppAuth`
103
104---
105
106# CloudBase Platform Knowledge
107
108### Domain Management Tools: Clear Distinction
109
110When working with domain-related tasks, use the correct tool based on the requirement:
111
112| Requirement | Tool | Parameters | Purpose |
113|-------------|------|------------|---------|
114| **Security Domain (安全域名)** | `envDomainManagement` | `action`, `domains` (array of host:port strings) | CORS/request source validation for browser uploads. No certificate involved. |
115| **Custom Domain (自定义域名)** | `manageGateway(action="bindCustomDomain")` | `domain` (string), `certificateId` (string) | Public HTTPS access with SSL certificate. Requires certId from SSL console. |
116| **Delete Custom Domain** | `manageGateway(action="deleteCustomDomain")` | `domain` (string) | Remove custom domain binding. |
117
118**Key indicators for choosing the right tool:**
119- Task mentions "certificate ID" or "SSL" → Use `manageGateway(action="bindCustomDomain")`
120- Task mentions "浏览器上传" or "CORS" or "安全域名" → Use `envDomainManagement`
121- Task mentions "public access" or "HTTPS" with domain → Use `manageGateway`
122
123### Recording Operation Results
124
125When a task explicitly requires recording operation steps or results to a file (e.g., `RESULT.json`):
126
1271. Perform the tool calls first to get actual results
1282. Collect all operation steps with their success/failure status
1293. Write the complete record to the specified file in the required format
1304. Include both successful operations and failed attempts with error messages
131
132Example structure for operation recording:
133```json
134{
135 "steps": [
136 {"action": "listDomains", "success": true, "message": "Found 3 domains"},
137 {"action": "bindDomain", "success": false, "message": "Certificate not found"}
138 ],
139 "summary": {
140 "totalAttempted": 2,
141 "succeeded": 1,
142 "failed": 1
143 }
144}
145```
146
147## Storage and Hosting
148
1491. **Static Hosting vs Cloud Storage**:
150 - CloudBase static hosting and cloud storage are two different buckets
151 - Generally, publicly accessible files can be stored in static hosting, which provides a public web address
152 - Static hosting supports custom domain configuration (requires console operation)
153 - Cloud storage is suitable for files with privacy requirements, can get temporary access addresses via temporary file URLs
154 - If the task needs COS SDK polling, file metadata lookup, or temporary URLs for an uploaded object, use cloud storage tools (`manageStorage` / `queryStorage`), not `manageHosting(action="upload")`
155
1562. **Static Hosting Domain**:
157 - CloudBase static hosting domain and website document config can be obtained via `queryHosting(action="websiteConfig")`
158 - Combine with static hosting file paths to construct final access addresses
159 - **Important**: If access address is a directory, it must end with `/`
160
1613. **Cloud Storage Public URL**:
162 - **CRITICAL**: `manageStorage(action=upload)` and `queryStorage(action=url)` return `temporaryUrl` which is a temporary signed URL that expires (default 1 hour). Do NOT use this as a permanent public URL.
163 - To get the permanent public access URL for a cloud storage object:
164 1. Call `envQuery(action=info)` to get environment details
165 2. Extract the storage CDN domain from `EnvInfo.Storages[0].CdnDomain` (e.g., `your-env-id.tcb.qcloud.la`)
166 3. Construct the public URL: `https://{CdnDomain}/{cloudPath}`
167 - Example: If `CdnDomain` is `env-xxx.tcb.qcloud.la` and `cloudPath` is `uploads/avatar.jpg`, the public URL is `https://env-xxx.tcb.qcloud.la/uploads/avatar.jpg`
168 - Note: The public URL is accessible only if the storage bucket ACL allows public read (default is `PRIVATE` which requires signed URLs)
169
170## Environment and Authentication
171
1721. **SDK Initialization**:
173 - CloudBase SDK initialization requires environment ID
174 - Can query environment ID via `envQuery` tool
175 - If the user only provides an environment alias, nickname, or other short form, resolve it with `envQuery(action="list", alias=..., aliasExact=true)` first and use the returned full `EnvId`
176 - Do not pass alias-like short forms directly into SDK init, `auth.set_env`, console URLs, or generated config files
177 - For Web, always initialize synchronously:
178 - `import cloudbase from "@cloudbase/js-sdk"; const app = cloudbase.init({ env: "your-full-env-id" });`
179 - Do **not** use dynamic imports like `import("@cloudbase/js-sdk")` or async wrappers such as `initCloudBase()` with internal `initPromise`
180 - Then proceed with login using a verified method (username/password, phone, email, or WeChat)
181
1822. **Environment Management (via manageEnv)**:
183 The `manageEnv` tool provides full lifecycle management for CloudBase environments.
184
185 | Action | Description | Key Parameters |
186 |--------|-------------|----------------|
187 | `listPackages` | Query available plans | (none) |
188 | `create` | Create new environment (needs confirm) | `alias`, `packageId`, `resources`, `region`, `duration` |
189 | `modifyPlan` | Change plan (upgrade/downgrade, needs confirm) | `envId`, `packageId` |
190 | `renew` | Renew environment (needs confirm) | `envId`, `duration` |
191
192 **Creating an environment with specific resources:**
193 ```
194 manageEnv(action="create", alias="my-env", packageId="baas_personal",
195 resources=["flexdb","storage","function","postgresql"], confirm="yes")
196 ```
197
198 - **`resources`** (optional, create only): controls which CloudBase capabilities to enable:
199 - `flexdb` — Document database (NoSQL)
200 - `storage` — Cloud Storage
201 - `function` — Cloud Functions
202 - `postgresql` — PostgreSQL relational database (PG mode)
203 - Defaults to all enabled if omitted.
204 - ⚠️ **All paid operations** (create / modifyPlan / renew) require `confirm="yes"`.
205
206 **Querying available packages before creating:**
207 ```
208 manageEnv(action="listPackages")
209 ```
210
211 **Changing plan (e.g. personal → standard):**
212 ```
213 manageEnv(action="modifyPlan", envId="your-env-id", packageId="baas_pf_standard", confirm="yes")
214 ```
215
216 **Renewing an environment:**
217 ```
218 manageEnv(action="renew", envId="your-env-id", duration=1, confirm="yes")
219 ```
220
221## Authentication Best Practices
222
223**Important: Authentication methods for different platforms are completely different, must strictly distinguish!**
224
225### Web Authentication
226- **Must use SDK built-in authentication**: CloudBase Web SDK provides complete authentication features
227- **Recommended method**: SMS login with `auth.getVerification()`, for detailed, refer to web auth related docs
228- **Forbidden behavior**: Do not use cloud functions to implement login authentication logic
229- **Session management**: For route guards and login proof, use `auth.getSession()` and require `data.session`; do not use deprecated `getLoginState()` or `auth.getUser()` / `auth.getCurrentUser()` as proof of real login.
230- **Provider and login-method setup**: Use `queryAppAuth` / `manageAppAuth`, not the MCP `auth` tool
231- **Anonymous login is disabled by default.** The SDK initialized with `accessKey` automatically creates an anonymous session. If the app uses AuthGuard or RLS for access control, ensure `is_anonymous` checks are in place when anonymous access is allowed.
232- **⚠️ PG RLS: Use `auth.uid()`, NOT `current_user`.** When writing RLS policies for CloudBase PostgreSQL, the user identity must use `auth.uid()` (returns the JWT `sub` / actual user ID). Do NOT use `current_user` or `current_setting(...)` — these PostgreSQL built-in functions return the database role name (e.g. `authenticated`), not the CloudBase auth user ID. CloudBase PG provides four auth helper functions: `auth.uid()`, `auth.role()`, `auth.email()`, `auth.jwt()`. Verify availability with `SELECT proname FROM pg_proc WHERE pronamespace = 'auth'::regnamespace`.
233
234### Mini Program Authentication
235- **Login-free feature**: Mini program CloudBase is naturally login-free, no login flow needed
236- **User identifier**: In cloud functions, get `wxContext.OPENID` via wx-server-sdk
237- **User management**: Manage user data in cloud functions based on openid
238- **Forbidden behavior**: Do not generate login pages or login flow code
239
240## Cloud Functions
241
2421. **Node.js Cloud Functions**:
243 - Node.js cloud functions need to include `package.json`, declaring required dependencies
244 - Can use `manageFunctions(action="createFunction")` to create functions
245 - Use `manageFunctions(action="updateFunctionCode")` to deploy cloud functions
246 - Prioritize cloud dependency installation, do not upload node_modules
247 - `functionRootPath` refers to the parent directory of function directories, e.g., `cloudfunctions` directory
248
249## Database Permissions
250
251**⚠️ CRITICAL: Always configure permissions BEFORE writing database operation code!**
252
2531. **Permission Model**:
254 - CloudBase database access has permissions
255 - Default basic permissions include:
256 - **READONLY**: Everyone can read, only creator/admin can write
257 - **PRIVATE**: Only creator/admin can read/write
258 - **ADMINWRITE**: Everyone can read, **only admin can write** (⚠️ NOT for Web SDK write!)
259 - **ADMINONLY**: Only admin can read/write
260 - **CUSTOM**: Fine-grained control with custom rules
261
2622. **Platform Compatibility** (CRITICAL):
263 - ⚠️ **Web SDK cannot use `ADMINWRITE` or `ADMINONLY` for write operations**
264 - ✅ For user-generated content in Web apps, use **CUSTOM** rules
265 - ✅ For admin-managed data (products, settings), use **READONLY**
266 - ✅ Cloud functions have full access regardless of permission type
267
2683. **Configuration Workflow**:
269 ```
270 Create collection → Configure security rules → Write code → Test
271 ```
272 - Use `managePermissions(action="updateResourcePermission")` to configure resource permissions
273 - If permissions were just changed, allow a short propagation window (typically 2-5 minutes) before retesting, but do not assume every failure is cache. Re-check the actual rule shape and active client write pattern first.
274 - See `no-sql-web-sdk/security-rules.md` for detailed `resourceType="noSqlDatabase"` examples only; do not treat `doc._openid`, `auth.openid`, query-subset validation, or `create` / `update` / `delete` JSON templates as generic rules for functions, storage, or SQL tables
275 - Official references:
276 - General security rules overview: `https://cloud.tencent.com/document/product/876/41802`
277 - NoSQL database security rules: `https://docs.cloudbase.net/database/security-rules`
278 - Cloud function security rules: `https://docs.cloudbase.net/cloud-function/security-rules`
279 - Storage security rules: `https://docs.cloudbase.net/storage/security-rules`
280
281Compatibility note:
282- Canonical plugin name: `permissions`
283- Legacy plugin aliases `security-rule`, `security-rules`, `secret-rule`, `secret-rules`, and `access-control` still resolve to the `permissions` plugin
284- Legacy tools `readSecurityRule` / `writeSecurityRule` are removed; prefer `queryPermissions` / `managePermissions`
285
2864. **Common Scenarios**:
287 - **E-commerce products**: `READONLY` (admin manages via cloud functions)
288 - **Shopping carts**: `CUSTOM` with `auth.uid` check (users manage their own)
289 - **Orders**: `CUSTOM` with ownership validation
290 - **System logs**: `PRIVATE` or `ADMINONLY`
291
2925. **Cross-Collection Operations**:
293 - If user has no special requirements, operations involving cross-database collections must be implemented via cloud functions
294
295## Role Management (MCP)
296
297CloudBase MCP provides role management capabilities through the `queryPermissions` and `managePermissions` tools. These are equivalent to the CLI `tcb role` commands.
298
299**⚠️ CRITICAL: Role policies and resource permissions are two independent systems with NO automatic synchronization.**
300
301- Resource permissions (security rules) control access to specific resources (tables, collections, functions, storage)
302- Roles (identity dimension) control policy bundles and member assignments
303
304### Available Actions
305
306**Query Operations** (via `queryPermissions`):
307| Action | Description |
308|--------|-------------|
309| `listRoles` | List all roles (system and custom) |
310| `getRole` | Get detailed role information by roleId/roleIdentity/roleName |
311
312**Management Operations** (via `managePermissions`):
313| Action | Description |
314|--------|-------------|
315| `createRole` | Create a new custom role |
316| `updateRole` | Update an existing role (add/remove policies or members) |
317| `deleteRoles` | Delete one or more custom roles |
318| `addRoleMembers` | Add members to a role |
319| `removeRoleMembers` | Remove members from a role |
320| `addRolePolicies` | Add policies to a role |
321| `removeRolePolicies` | Remove policies from a role |
322
323### Usage Examples
324
325**List all roles:**
326```
327queryPermissions(action="listRoles")
328```
329
330**Get specific role details:**
331```
332queryPermissions(action="getRole", roleId="role-xxx")
333# or by identity
334queryPermissions(action="getRole", roleIdentity="dev_role")
335# or by name
336queryPermissions(action="getRole", roleName="Developer")
337```
338
339**Delete a custom role:**
340```
341managePermissions(action="deleteRoles", roleIds=["role-xxx"])
342```
343
344**Create a custom role:**
345```
346managePermissions(action="createRole", roleName="Developer", roleIdentity="developer", policies=["FunctionsAccess"], memberUids=["user-uid-1"])
347```
348
349**Update a role (add policies):**
350```
351managePermissions(action="updateRole", roleId="role-xxx", addPolicies=["StoragesAccess"])
352```
353
354> ⚠️ Note: Only custom roles can be deleted. System roles are read-only.
355
356See also: CLI equivalent commands in `cloudbase-cli/references/permission.md`
357
3583. **Cloud Function Optimization**:
359 - If involving cloud functions, while ensuring security, can minimize the number of cloud functions as much as possible
360 - For example: implement one cloud function for client-side requests, implement one cloud function for data initialization
361
362## Data Models
363
3641. **Get Data Model Operation Object**:
365 - **Mini Program**: Need `@cloudbase/wx-cloud-client-sdk`, initialize `const client = initHTTPOverCallFunction(wx.cloud)`, use `client.models`
366 - **Cloud Function**: Need `@cloudbase/node-sdk@3.10+`, initialize `const app = cloudbase.init({env})`, use `app.models`
367 - **Web**: Need `@cloudbase/js-sdk`, initialize `const app = cloudbase.init({env})`, after login use `app.models`
368
3692. **Data Model Query**:
370 - Can call MCP `manageDataModel` tool to:
371 - Query model list
372 - Get model detailed information (including Schema fields)
373 - Get specific models SDK usage documentation
374
3753. **MySQL Data Model Invocation Rules**:
376 - MySQL data models cannot use collection method invocation, must use data model SDK
377 - **Wrong**: `db.collection('model_name').get()`
378 - **Correct**: `app.models.model_name.list({ filter: { where: {} } })`
379 - Use `manageDataModel` tool's `docs` method to get specific SDK usage
380
381## Console Management
382
383After creating/deploying resources, provide corresponding console management page links. All console URLs follow the pattern: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/{path}`.
384
385The CloudBase console is updated frequently. If a live, logged-in console shows a different hash path from this document, prefer the live console path over stale documentation and then update this skill to match.
386
387### Core Function Entry Points
388
3891. **Overview (概览)**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/overview`
390 - Main dashboard showing environment status, resource usage, and quick access to key features
391 - Displays overview of all CloudBase services and their status
392
3932. **Template Center (模板中心)**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/cloud-template/market`
394 - Access project templates for React, Vue, Mini Program, UniApp, and backend frameworks
395 - AI Builder templates for rapid application generation
396 - Framework templates: React, Vue, Miniapp, UniApp, Gin, Django, Flask, SpringBoot, Express, NestJS, FastAPI
397
3983. **Document Database (文档型数据库)**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/db/doc`
399 - Manage NoSQL document database collections
400 - **Collection Management**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/db/doc/collection/${collectionName}`
401 - View, edit, and manage collection data
402 - Configure security rules and permissions
403 - **Data Model Management**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/db/doc/model/${modelName}`
404 - Create and manage data models with relationships
405 - View model schema and field definitions
406
4074. **MySQL Database (MySQL 数据库)**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/db/mysql`
408 - Manage MySQL relational database
409 - **Table Management**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/db/mysql/table/default/`
410 - Create, modify, and manage database tables
411 - Execute SQL queries and manage table structure
412 - **Important**: Must enable MySQL database in console before use
413
4145. **Cloud Functions (云函数)**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/scf`
415 - Manage and deploy Node.js cloud functions
416 - **Function List**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/scf`
417 - **Function Detail**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/scf/detail?id=${functionName}&NameSpace=${envId}`
418 - View function code, logs, and configuration
419 - Manage function triggers and environment variables
420 - Monitor function invocations and performance
421
4226. **CloudRun (云托管)**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/platform-run`
423 - Manage containerized backend services
424 - Deploy services using Function mode or Container mode
425 - Configure service scaling, access types, and environment variables
426 - View service logs and monitoring data
427
4287. **Cloud Storage (云存储)**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/storage`
429 - Manage file storage buckets
430 - Upload, download, and organize files
431 - Configure storage permissions and access policies
432 - Generate temporary access URLs for private files
433
4348. **AI+**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/ai`
435 - Access AI capabilities and services
436 - AI Builder for generating templates and code
437 - AI image recognition and other AI features
438
4399. **Static Website Hosting (静态网站托管)**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/static-hosting`
440 - Deploy and manage static websites
441 - Alternative URL: `https://console.cloud.tencent.com/tcb/hosting`
442 - Configure custom domains and CDN settings
443 - View deployment history and access logs
444
44510. **Identity Authentication (身份认证)**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/identity`
446 - Configure authentication methods and user management
447 - **Login Management**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/identity/login-manage`
448 - Enable/disable login methods (SMS, Email, Username/Password, WeChat, Custom Login)
449 - Configure SMS/Email templates
450 - Manage security domain whitelist
451 - **Token Management**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/identity/token-management`
452 - Manage API Keys and Publishable Keys
453 - View and manage access tokens
454
45511. **Weida Low-Code (微搭低代码)**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/lowcode/apps`
456 - Access Weida low-code development platform
457 - Build applications using visual drag-and-drop interface
458
45912. **Logs & Monitoring (日志监控)**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/devops/log`
460 - View logs from cloud functions, CloudRun services, and other resources
461 - Monitor resource usage, performance metrics, and error rates
462 - Set up alerts and notifications
463
46413. **Environment Settings (环境配置)**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/env/http-access`
465 - Configure environment-level settings
466 - Manage security domains and CORS settings
467 - Configure environment variables and secrets
468 - View environment information and resource quotas
469
470### URL Construction Guidelines
471
472- **Base URL Pattern**: `https://tcb.cloud.tencent.com/dev?envId=${envId}#/{path}`
473- **Replace Variables**: Always replace `${envId}` with the actual environment ID queried via `envQuery` tool
474- **Alias Handling**: If the conversation only contains an alias or shorthand, first resolve it with `envQuery(action="list", alias=..., aliasExact=true)` and use the returned `EnvId`; if the alias is ambiguous or missing, ask the user to confirm before generating links
475- **Resource-Specific URLs**: For specific resources (collections, functions, models), replace resource name variables with actual values
476- **Usage**: After creating/deploying resources, provide these console links to users for management operations
477
478### Quick Reference
479
480When directing users to console pages:
481- Use the full URL with environment ID
482- Explain what they can do on each page
483- Provide context about why they need to access that specific page
484- For configuration pages (like login management), guide users through the setup process