Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

cloudbase-platform

БесплатноБез исполняемых скриптовНе проверен

CloudBase platform knowledge and best practices. Use this skill for general CloudBase platform understanding, including storage, hosting, authentication…

bighardpersonот bighardperson★ 71 звезда на GitHub

Об этом скилле

When to use this skill

Use this skill for CloudBase platform knowledge when you need to:

  • Understand CloudBase storage and hosting concepts
  • Configure authentication for different platforms (Web vs Mini Program)
  • Deploy and manage cloud functions
  • Understand database permissions and access control
  • Work with data models (MySQL and NoSQL)
  • 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)

  1. Understand platform differences

    • Web and Mini Program have completely different authentication approaches
    • Must strictly distinguish between platforms
    • Never mix authentication methods across platforms
  2. 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
  3. Use correct SDKs and APIs

    • Different platforms require different SDKs for data models
    • MySQL data models must use models SDK, not collection API
    • Use envQuery tool to get environment ID
  4. 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 auth tool, 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 the cloudbase entry.
      {
        "mcpServers": {
          "cloudbase": {
            "command": "npx",
            "args": ["@cloudbase/cloudbase-mcp@latest"],
            "description": "CloudBase MCP",
            "lifecycle": "keep-alive"
          }
        }
      }
      
    • Discover tools and schemas:
      • npx mcporter list — list configured servers
      • npx 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 tools
      • npx 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 json
      • npx mcporter call cloudbase.auth action=start_auth authMode=device --output json
      • npx mcporter call cloudbase.auth action=set_env envId=env-xxx --output json

CloudBase Platform Knowledge

Storage and Hosting

  1. 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 uploadFiles
  2. Static Hosting Domain:

    • CloudBase static hosting domain can be obtained via getWebsiteConfig tool
    • Combine with static hosting file paths to construct final access addresses
    • Important: If access address is a directory, it must end with /

Environment and Authentication

  1. SDK Initialization:
    • CloudBase SDK initialization requires environment ID
    • Can query environment ID via envQuery tool
    • 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 as initCloudBase() with internal initPromise
    • 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.OPENID via wx-server-sdk
  • **User man
Полный SKILL.md на GitHub

Установить cloudbase-platform в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл 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.

Как установить скилл cloudbase-platform?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл cloudbase-platform запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить cloudbase-platform с