cloudbase-platform
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.
Install
mkdir -p .claude/skills/cloudbase-platform && curl -L -o skill.zip "https://mcp.directory/api/skills/download/6368" && unzip -o skill.zip -d .claude/skills/cloudbase-platform && rm skill.zipInstalls to .claude/skills/cloudbase-platform
About this skill
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 - Web auth and provider setup ->
../auth-tool/SKILL.md,../auth-web/SKILL.md - Mini program development ->
../miniprogram-development/SKILL.md - Cloud functions ->
../cloud-functions/SKILL.md - Official HTTP API clients ->
../http-api/SKILL.md - Document database ->
../no-sql-web-sdk/SKILL.mdor../no-sql-wx-mp-sdk/SKILL.md - Relational database / data modeling ->
../relational-database-tool/SKILL.mdor../data-model-creation/SKILL.md - Cloud storage ->
../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.
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
-
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
- Use
envQuerytool to get environment ID
-
Use CloudBase MCP via mcporter (CLI) when IDE MCP is not available
- You do not need to hard-code Secret ID / Secret Key / Env ID in config
- CloudBase MCP will support device-code login via the
authtool, so credentials can be obtained interactively - Add CloudBase MCP server in
config/mcporter.json: If other MCP servers already exist, keep them and only add thecloudbaseentry.{ "mcpServers": { "cloudbase": { "command": "npx", "args": ["@cloudbase/cloudbase-mcp@latest"], "description": "CloudBase MCP", "lifecycle": "keep-alive" } } } - Discover tools and schemas:
npx mcporter list— list configured serversnpx mcporter describe cloudbase --all-parameters— inspect CloudBase server config and get full tool schemas with all parameters (⚠️ 必须加--all-parameters才能获取完整参数信息)npx mcporter list cloudbase --schema— get full JSON schema for all CloudBase toolsnpx mcporter call cloudbase.help --output json— discover available CloudBase tools and their schemas
- Call CloudBase tools (auth flow examples):
npx 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 json
CloudBase Platform Knowledge
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), notuploadFiles
-
Static Hosting Domain:
- CloudBase static hosting domain can be obtained via
getWebsiteConfigtool - Combine with static hosting file paths to construct final access addresses
- Important: If access address is a directory, it must end with
/
- CloudBase static hosting domain can be obtained via
Environment and Authentication
- SDK Initialization:
- CloudBase SDK initialization requires environment ID
- Can query environment ID via
envQuerytool - For Web, always initialize synchronously:
import cloudbase from "@cloudbase/js-sdk"; const app = cloudbase.init({ env: "xxxx-yyy" });- Do not use dynamic imports like
import("@cloudbase/js-sdk")or async wrappers such asinitCloudBase()with internalinitPromise
- Then proceed with login, for example using anonymous login
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
- User management: After login, get user information via
auth.getCurrentUser()
Mini Program Authentication
- Login-free feature: Mini program CloudBase is naturally login-free, no login flow needed
- User identifier: In cloud functions, get
wxContext.OPENIDvia 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
functionRootPathrefers to the parent directory of function directories, e.g.,cloudfunctionsdirectory
- Node.js cloud functions need to include
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
ADMINWRITEorADMINONLYfor 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
- ⚠️ Web SDK cannot use
-
Configuration Workflow:
Create collection → Configure security rules → Write code → Test- Use
writeSecurityRuleMCP tool to configure permissions - Wait 2-5 minutes for cache to clear before testing
- See
no-sql-web-sdk/security-rules.mdfor detailed examples
- Use
-
Common Scenarios:
- E-commerce products:
READONLY(admin manages via cloud functions) - Shopping carts:
CUSTOMwithauth.uidcheck (users manage their own) - Orders:
CUSTOMwith ownership validation - System logs:
PRIVATEorADMINONLY
- E-commerce products:
-
Cross-Collection Operations:
- If user has no special requirements, operations involving cross-database collections must be implemented via cloud functions
-
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, initializeconst client = initHTTPOverCallFunction(wx.cloud), useclient.models - Cloud Function: Need
@cloudbase/node-sdk@3.10+, initializeconst app = cloudbase.init({env}), useapp.models - Web: Need
@cloudbase/js-sdk, initializeconst app = cloudbase.init({env}), after login useapp.models
- Mini Program: Need
-
Data Model Query:
- Can call MCP
manageDataModeltool to:- Query model list
- Get model detailed information (including Schema fields)
- Get specific models SDK usage documentation
- Can call MCP
-
MySQL Data Model Invocation Rules:
- MySQL data models cannot use collection
Content truncated.
More by TencentCloudBase
View all skills by TencentCloudBase →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversSupercharge AI platforms with Azure MCP Server for seamless Azure API Management and resource automation. Public Preview
Boost productivity with Task Master: an AI-powered tool for project management and agile development workflows, integrat
n8n offers conversational workflow automation, enabling seamless software workflow creation and management without platf
Mobile Next offers fast, seamless mobile automation for iOS and Android. Automate apps, extract data, and simplify mobil
pg-aiguide — Version-aware PostgreSQL docs and best practices tailored for AI coding assistants. Improve queries, migrat
Outline: Connect AI to search, read, edit, and manage documents in a secure knowledge management platform via cloud or s
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.