/tencentcloudbase:setup-cloudbase-openclawfrom tencentcloudbase
CloudBase platform knowledge and best practices. Use this skill for general CloudBase platform understanding, including storage, hosting, authentication, cloud functions, database permissions, and data models.
Ships in tencentcloudbase. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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
Use correct SDKs and APIs
envQuery tool to get environment IDUse CloudBase MCP via mcporter (CLI) when IDE MCP is not available
auth tool, so credentials can be obtained interactivelynpx mcporter config add cloudbase \
--command "npx" \
--arg "@cloudbase/cloudbase-mcp@latest" \
--description "CloudBase MCP"
npx mcporter list — list configured serversnpx mcporter describe cloudbase — inspect CloudBase server config and available toolsnpx mcporter list cloudbase --schema — get full JSON schema for all CloudBase toolsnpx mcporter call cloudbase.help --output json — discover available CloudBase tools and their schemasnpx mcporter call cloudbase.auth action=status --output jsonnpx mcporter call cloudbase.auth action=start_auth authMode=device --output jsonnpx mcporter call cloudbase.auth action=set_env envId=env-xxx --output jsonStatic Hosting vs Cloud Storage:
Static Hosting Domain:
getWebsiteConfig tool/envQuery toolimport cloudbase from "@cloudbase/js-sdk"; const app = cloudbase.init({ env: "xxxx-yyy" });import("@cloudbase/js-sdk") or async wrappers such as initCloudBase() with internal initPromiseImportant: Authentication methods for different platforms are completely different, must strictly distinguish!
auth.getVerification(), for detailed, refer to web auth related docsauth.getCurrentUser()wxContext.OPENID via wx-server-sdkpackage.json, declaring required dependenciescreateFunction to create functionsupdateFunctionCode 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
writeSecurityRule MCP tool to configure permissionsno-sql-web-sdk/security-rules.md for detailed examplesCommon Scenarios:
READONLY (admin manages via cloud functions)CUSTOM with auth.uid check (users manage their own)CUSTOM with ownership validationPRIVATE or ADMINONLYCross-Collection Operations:
Cloud Function Optimization:
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}
Overview (概览): https://tcb.cloud.tencent.com/dev?envId=${envId}#/overview
Template Center (模板中心): https://tcb.cloud.tencent.com/dev?envId=${envId}#/template
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}#/cloudrun
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}#/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}#/weida
Logs & Monitoring (日志监控): https://tcb.cloud.tencent.com/dev?envId=${envId}#/logs
Environment Settings (环境配置): https://tcb.cloud.tencent.com/dev?envId=${envId}#/settings
https://tcb.cloud.tencent.com/dev?envId=${envId}#/{path}${envId} with the actual environment ID queried via envQuery toolWhen directing users to console pages:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ulpi-io/plugin-marketplace --plugin tencentcloudbase24 skills in this plugin
/ai-model-nodejsUse this skill when developing Node.js backend services or CloudBase cloud functions (Express/Koa/NestJS, serverless, backend APIs) that need AI capabilities. Features text generation (generateText), streaming (streamText), AND image generation (generateImage) via @cloudbase/node-sdk ≥3.16.0. Built-in models include Hunyuan (hunyuan-2.0-instruct-20251111 recommended), DeepSeek (deepseek-v3.2 recommended), and hunyuan-image for images. This is the ONLY SDK that supports image generation. NOT for browser/Web apps (use ai-model-web) or WeChat Mini Program (use ai-model-wechat)./ai-model-webUse this skill when developing browser/Web applications (React/Vue/Angular, static websites, SPAs) that need AI capabilities. Features text generation (generateText) and streaming (streamText) via @cloudbase/js-sdk. Built-in models include Hunyuan (hunyuan-2.0-instruct-20251111 recommended) and DeepSeek (deepseek-v3.2 recommended). NOT for Node.js backend (use ai-model-nodejs), WeChat Mini Program (use ai-model-wechat), or image generation (Node SDK only)./ai-model-wechatUse this skill when developing WeChat Mini Programs (小程序, 企业微信小程序, wx.cloud-based apps) that need AI capabilities. Features text generation (generateText) and streaming (streamText) with callback support (onText, onEvent, onFinish) via wx.cloud.extend.AI. Built-in models include Hunyuan (hunyuan-2.0-instruct-20251111 recommended) and DeepSeek (deepseek-v3.2 recommended). API differs from JS/Node SDK - streamText requires data wrapper, generateText returns raw response. NOT for browser/Web apps (use ai-model-web), Node.js backend (use ai-model-nodejs), or image generation (not supported).