Best for
- Understand CloudBase storage and hosting concepts
- Compare platform capabilities before implementation
- Understand cross-platform auth differences (Web vs Mini Program)
TencentCloudBase/CloudBase-AI-Toolkit/config/source/skills/cloudbase-platform/SKILL.md
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.
Decision brief
Sibling CloudBase skills ship beside this skill. Use local relative paths such as ../auth-tool-cloudbase/SKILL.md.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/TencentCloudBase/CloudBase-AI-Toolkit --skill "config/source/skills/cloudbase-platform"Inspect the Agent Skill "cloudbase-platform" from https://github.com/TencentCloudBase/CloudBase-AI-Toolkit/blob/43b60e5cdee1bae336a00ed3a8cc7e5b85ae5dca/config/source/skills/cloudbase-platform/SKILL.md at commit 43b60e5cdee1bae336a00ed3a8cc7e5b85ae5dca. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. 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 han…
Get specific role details: queryPermissions(action="getRole", roleId="role-xxx")
Sibling CloudBase skills ship beside this skill. Use local relative paths such as ../auth-tool-cloudbase/SKILL.md.
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 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.
Permission review
The documentation includes network, browsing, or remote request actions.
If a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do **not** HTTP-fetch remote skill or protocol markdown into the agent context.The documentation asks the agent to read local files, directories, or repositories.
Cloud storage is suitable for files with privacy requirements, can get temporary access addresses via temporary file URLsThe documentation asks the agent to read local files, directories, or repositories.
**Important**: If access address is a directory, it must end with `/`Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 94/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 1,082 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Sibling CloudBase skills ship beside this skill. Use local relative paths such as ../auth-tool-cloudbase/SKILL.md.
If a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do not HTTP-fetch remote skill or protocol markdown into the agent context.
Cross-cutting protocols (required before code changes or deployments):
references/protocols/change-safety-protocol.mdreferences/protocols/deployment-gate.mdreferences/protocols/sensitive-runtime-data-protection.md../minimal-web-baas-demo/SKILL.md
envQuery → lock one DB plane → MCP schema → @cloudbase/js-sdk CRUD → preview.../web-development/SKILL.md../auth-tool-cloudbase/SKILL.md, ../auth-web-cloudbase/SKILL.md../miniprogram-development/SKILL.md../cloudbase-wechat-integration/SKILL.md (official docs: https://docs.cloudbase.net/integration/introduce/index.md)../cloud-functions/SKILL.md../http-api-cloudbase/SKILL.md../cloudbase-document-database-web-sdk/SKILL.md or ../cloudbase-document-database-in-wechat-miniprogram/SKILL.md../postgresql-development-cloudbase/SKILL.md../relational-database-mcp-cloudbase/SKILL.md or ../data-model-creation/SKILL.md../cloud-storage-web/SKILL.mdcloudbase-platform/references/protocols/change-safety-protocol.md).cloudbase-platform/references/protocols/deployment-gate.md.x-cloudbase-context, full req.headers, or process.env from Cloud Functions / CloudRun (including httpbin-style debug images) — follow references/protocols/sensitive-runtime-data-protection.md.envDomainManagement (action: create/delete) = Security domains (安全域名) for CORS/request source validation - used for browser upload whitelisting. Does NOT accept certificateId.manageGateway(action="bindCustomDomain") = Bind a new custom domain (自定义域名) for public HTTPS — requires domain + certificateId. If queryGateway(action="listCustomDomains") already returns a usable custom domain, prefer manageGateway(action="createRoute", domain="<existing-domain>") instead; routing does not need certificateId.Use this skill for CloudBase platform knowledge when you need to:
This skill provides foundational knowledge that applies to all CloudBase projects, regardless of whether they are Web, Mini Program, or backend services.
Understand platform differences
Follow best practices
@cloudbase/js-sdk direct DB access for browser CRUD; use cloud functions only for secrets, scheduled/background jobs, or elevated cross-collection logic that security rules / RLS cannot express (see ../minimal-web-baas-demo/SKILL.md for the demo default)Use correct SDKs and APIs
postgresql-development-cloudbase; do not reuse NoSQL app.database() / db.collection(...) snippets or MySQL queryMysqlDatabase / manageMysqlDatabase for PG data pathsenvQuery tool to get environment IDsrc/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
cloudbase guideline firsttcb CLI now (../cloudbase-cli/SKILL.md, ../cloudbase/references/tooling-fallback.md). Inspect tool schemas before MCP execution. Do not hard-code Secret ID / Secret Key / Env ID in configauth, while application-side auth configuration uses queryAppAuth / manageAppAuthWhen 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. |
| Reuse existing Custom Domain | queryGateway(listCustomDomains) → manageGateway(createRoute) | domain = existing custom domain; route fields | Expose a service/path on an already-bound custom domain. No certificateId. Prefer this when a custom domain already exists. |
| Bind new Custom Domain (自定义域名) | manageGateway(action="bindCustomDomain") | domain (string), certificateId (string) | First-time bind of a new public HTTPS domain. Requires certId from SSL console. |
| Delete Custom Domain | manageGateway(action="deleteCustomDomain") | domain (string) | Remove custom domain binding (only after routes on that domain are deleted). |
| Disable / enable gateway route | manageGateway(action="disableRoute" | "enableRoute") | path (required), prefer explicit domain | Toggle Routes[].Enable via ModifyHTTPServiceRoute (not ModifyGatewayRoute). |
| Disable static hosting default domain | queryGateway(listRoutes) → manageGateway(disableRoute) | domain = *.tcloudbaseapp.com (DomainType=STATIC_STORE, IsDefault=true), usually path="/" | Turns off public access on the shared hosting CDN default host. Do not use manageHosting. |
Key indicators for choosing the right tool:
listCustomDomains then createRoute(domain=...) (no certificateId)manageGateway(action="bindCustomDomain")envDomainManagementcreateRoute when possible; only bindCustomDomain for first-time domain bind*.tcloudbaseapp.com → queryGateway(listRoutes) then manageGateway(disableRoute) with that STATIC_STORE domain; never invent ModifyGatewayRouteWhen a task explicitly requires recording operation steps or results to a file (e.g., RESULT.json):
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
}
}
Static Hosting vs Cloud Storage:
manageStorage / queryStorage), not manageHosting(action="upload")Static Hosting Domain:
queryHosting(action="websiteConfig")<envId>-<appId>.tcloudbaseapp.com (DomainType=STATIC_STORE, often IsDefault=true in queryGateway(listRoutes))manageGateway(action="disableRoute", domain="<that-host>", path="/") (or updateRoute with enable=false). Re-enable with enableRoute. Do not look for a manageHosting disable-default-domain action; do not call non-existent ModifyGatewayRoute — the API is ModifyHTTPServiceRoute/Cloud Storage Public URL:
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.envQuery(action=info) to get environment detailsEnvInfo.Storages[0].CdnDomain (e.g., your-env-id.tcb.qcloud.la)https://{CdnDomain}/{cloudPath}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.jpgPRIVATE which requires signed URLs)SDK Initialization:
envQuery toolenvQuery(action="list", alias=..., aliasExact=true) first and use the returned full EnvIdauth.set_env, console URLs, or generated config filesimport cloudbase from "@cloudbase/js-sdk"; const app = cloudbase.init({ env: "your-full-env-id" });import("@cloudbase/js-sdk") or async wrappers such as initCloudBase() with internal initPromiseEnvironment 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, 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 Storagefunction — Cloud Functionspostgresql — PostgreSQL relational database (PG mode)Resources to CreateEnv.region: CreateEnv does not accept Region; environment region is determined by account/package.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")
Important: Authentication methods for different platforms are completely different, must strictly distinguish!
auth.getVerification(), for detailed, refer to web auth related docsauth.getSession() and require data.session; do not use deprecated getLoginState() or auth.getUser() / auth.getCurrentUser() as proof of real login.queryAppAuth / manageAppAuth, not the MCP auth toolaccessKey alone does not create a gateway-authenticated anonymous session. With @cloudbase/js-sdk 3.x, call await auth.signInAnonymously() (or an equivalent authenticated session) before NoSQL app.database() CRUD, or the gateway returns 401. If the app uses AuthGuard or RLS for access control, ensure is_anonymous checks are in place when anonymous access is allowed.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 as text, not uuid — unlike Supabase). Prefer owner columns as varchar(64) / text; if the column is uuid, cast with auth.uid()::uuid or you get operator does not exist: uuid = text. 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.wxContext.OPENID via wx-server-sdkpackage.json, declaring required dependenciesmanageFunctions(action="createFunction") to create functionsmanageFunctions(action="updateFunctionCode") to deploy cloud functionsfunctionRootPath refers to the parent directory of function directories, e.g., cloudfunctions directory⚠️ CRITICAL: Always configure permissions BEFORE writing database operation code!
Permission Model:
Platform Compatibility (CRITICAL):
ADMINWRITE or ADMINONLY for write operationsConfiguration Workflow:
Create collection → Configure security rules → Write code → Test
managePermissions(action="updateResourcePermission") to configure resource permissionsno-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 tableshttps://cloud.tencent.com/document/product/876/41802https://docs.cloudbase.net/database/security-ruleshttps://docs.cloudbase.net/cloud-function/security-ruleshttps://docs.cloudbase.net/storage/security-rulesCompatibility note:
permissionssecurity-rule, security-rules, secret-rule, secret-rules, and access-control still resolve to the permissions pluginreadSecurityRule / writeSecurityRule are removed; prefer queryPermissions / managePermissionsCommon Scenarios:
READONLY (admin manages via cloud functions)CUSTOM with auth.uid check (users manage their own)CUSTOM with ownership validationPRIVATE or ADMINONLYCross-Collection Operations:
../minimal-web-baas-demo/SKILL.mdCloudBase 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.
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 |
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
@cloudbase/js-sdk → database (see ../minimal-web-baas-demo/SKILL.md)Get Data Model Operation Object:
@cloudbase/wx-cloud-client-sdk, initialize const client = initHTTPOverCallFunction(wx.cloud), use client.models@cloudbase/[email protected]+, initialize const app = cloudbase.init({env}), use app.models@cloudbase/js-sdk, initialize const app = cloudbase.init({env}), after login use app.modelsData Model Query:
manageDataModel tool to:
MySQL Data Model Invocation Rules:
db.collection('model_name').get()app.models.model_name.list({ filter: { where: {} } })manageDataModel tool's docs method to get specific SDK usageAfter 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.
Overview (概览): https://tcb.cloud.tencent.com/dev?envId=${envId}#/overview
Template Center (模板中心): https://tcb.cloud.tencent.com/dev?envId=${envId}#/cloud-template/market
Document Database (文档型数据库): https://tcb.cloud.tencent.com/dev?envId=${envId}#/db/doc
https://tcb.cloud.tencent.com/dev?envId=${envId}#/db/doc/collection/${collectionName}
https://tcb.cloud.tencent.com/dev?envId=${envId}#/db/doc/model/${modelName}
MySQL Database (MySQL 数据库): https://tcb.cloud.tencent.com/dev?envId=${envId}#/db/mysql
https://tcb.cloud.tencent.com/dev?envId=${envId}#/db/mysql/table/default/
Cloud Functions (云函数): https://tcb.cloud.tencent.com/dev?envId=${envId}#/scf
https://tcb.cloud.tencent.com/dev?envId=${envId}#/scfhttps://tcb.cloud.tencent.com/dev?envId=${envId}#/scf/detail?id=${functionName}&NameSpace=${envId}
CloudRun (云托管): https://tcb.cloud.tencent.com/dev?envId=${envId}#/platform-run
Cloud Storage (云存储): https://tcb.cloud.tencent.com/dev?envId=${envId}#/storage
AI+: https://tcb.cloud.tencent.com/dev?envId=${envId}#/ai
Static Website Hosting (静态网站托管): https://tcb.cloud.tencent.com/dev?envId=${envId}#/static-hosting
https://console.cloud.tencent.com/tcb/hostingIdentity Authentication (身份认证): https://tcb.cloud.tencent.com/dev?envId=${envId}#/identity
https://tcb.cloud.tencent.com/dev?envId=${envId}#/identity/login-manage
https://tcb.cloud.tencent.com/dev?envId=${envId}#/identity/token-management
Weida Low-Code (微搭低代码): https://tcb.cloud.tencent.com/dev?envId=${envId}#/lowcode/apps
Logs & Monitoring (日志监控): https://tcb.cloud.tencent.com/dev?envId=${envId}#/devops/log
Environment Settings (环境配置): https://tcb.cloud.tencent.com/dev?envId=${envId}#/env/http-access
https://tcb.cloud.tencent.com/dev?envId=${envId}#/{path}${envId} with the actual environment ID queried via envQuery toolenvQuery(action="list", alias=..., aliasExact=true) and use the returned EnvId; if the alias is ambiguous or missing, ask the user to confirm before generating linksWhen directing users to console pages:
All packaged reference files (required for skill lint reachability):
Frequently asked questions
Sibling CloudBase skills ship beside this skill. Use local relative paths such as ../auth-tool-cloudbase/SKILL.md.
The source record exposes this install command: npx skills add https://github.com/TencentCloudBase/CloudBase-AI-Toolkit --skill "config/source/skills/cloudbase-platform". Inspect the command and pinned source before running it.
Static rules flagged network, read-files in the source; the page lists the matching lines and excerpts.
Alternatives
vasilyu1983/AI-Agents-public
Guides iOS testing with XCTest, XCUITest, Swift Testing, simctl, and xcresult. Use when choosing destinations, controlling flakes, or parsing test artifacts for native apps.
garrytan/gbrain
Generate a publication-quality PDF from any brain page via the gstack make-pdf binary. Strips YAML frontmatter, sanitizes emoji, applies running headers and page numbers. Brain page is always the source of truth; PDF is a rendering.
NVIDIA/skills
How to swap the DeepStream CV detection model in the VSS Alerts Blueprint verification (2d_cv) mode - covers ONNX export, custom bbox parsers, compose mount gotchas, nvinfer config, runtime TRT engine build, deployment, and a segmentation-capable model addendum handoff.
awslabs/agent-plugins
Evaluate, configure, and migrate workloads to AWS Lambda Managed Instances (LMI). Triggers on: Lambda Managed Instances, LMI, capacity provider, multi-concurrency Lambda, dedicated instance Lambda, EC2-backed Lambda, cold start elimination, Graviton Lambda, instance type for Lambda, scheduled scaling for LMI, Lambda cost optimization with Reserved Instances or Savings Plans. Also trigger when users describe high-volume predictable workloads seeking cost savings, want to scale LMI capacity on a s