AI Agent Hub
Back to skills
Tencent CloudBase icon

Tencent CloudBase

Development Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @tencent-adm/cloudbase according to the guide at https://skillhub.cn/install/skillhub.md.

About this skill

The Core Problem in CloudBase Full-Stack Development

When building applications with Tencent CloudBase, developers frequently encounter a critical challenge: making correct technical decisions and integrations across a complex technology stack and multiple backend services. Specific scenarios include:

  • Routing Confusion: Unsure of which documentation to consult or which API set to use when faced with web authentication, WeChat mini-programs, relational databases, cloud functions, CloudRun, and AI model calls.
  • Incorrect Integration Sequence: For example, attempting to write frontend authentication UI code before configuring the necessary backend authentication providers, causing workflow disruptions.
  • Toolchain Ambiguity: Unclear whether to prioritize MCP tools, the tcb CLI, or other SDKs within a given session, and how they relate to each other in terms of dependencies and fallback strategies.
  • Violation of Implicit Rules: Such as incorrectly using the hosting update endpoint for a project's first deployment instead of the dedicated application creation workflow.

How This Skill Works: A Structured Guide with Enforced Rules

This skill (@tencent-adm/cloudbase) is not a collection of simple code snippets but a highly structured development decision framework. It addresses the above issues through these core mechanisms:

  1. Scenario-Based Routing Table: It provides a detailed table mapping common development needs (e.g., "Web Login", "Cloud Functions", "AI Model Call") to specific child skill documents (e.g., auth-web-cloudbase, cloud-functions, ai-model-web) that must be read first. This forces developers to acquire the correct context before coding.

  2. Mandatory Workflow and Pre-requisites: It defines non-skippable stages. For instance, Stage 2a must precede frontend code (typically involving backend resource preparation), and certain steps are mandatory. This ensures development follows a secure and correct sequence.

  3. Global Rules and Engineering Constitution: It establishes foundational rules that override convenience, such as:

    • Always specify EnvId explicitly, prohibiting reliance on implicit or CLI-selected environment states.
    • Prepare backend resources before writing frontend code. Prioritize using MCP tools for auth providers, tables, storage domains, and security rules.
    • Prohibit the use of any to bypass type errors.
    • Self-verify before claiming completion, using both static checks (tsc, lint) and runtime verification (agent-browser for user-visible flows).
  4. Clear Toolchain Fallback Strategies: It specifies how to proceed using the tcb CLI and local reference files when preferred tools (like MCP) are unavailable, preventing development stalls.

Applicable Boundaries and Key Caveats

While the skill provides comprehensive guidance, developers must be aware of its scope and several key points:

  • Focused on the CloudBase Ecosystem: Its routing and rules are tightly coupled with Tencent CloudBase services (e.g., cloud functions, CloudRun, relational databases, document databases) and integration patterns (e.g., WeChat mini-programs, Web SDK, OpenAPI).

  • Special Case for Frontend Deployment: For the first deployment of a Web frontend project, you must use manageApps(action="createApp", ...). Subsequent updates can use manageHosting. This is a common pitfall.

  • Prerequisite Checks for AI Model Calls: Before invoking large model APIs, you must run DescribeEnvPostpayPackage (to check Token Credits packages) and DescribeActivityInfo (to check WeChat Mini Program Growth Plan eligibility). Omitting this will likely cause call failures.

  • Strict Technology Stack Differentiation: You must carefully distinguish the CloudBase PostgreSQL path (using app.rdb(), queryPgDatabase) from the traditional NoSQL/MySQL paths. Confusing these leads to fundamental errors in permission models and SDK usage.

Use Cases

  • Before developing a login/registration page for a web app, you must first read the `auth-tool-cloudbase` document per the routing table to enable and configure required auth providers (e.g., email, SMS) in MCP tools, and obtain a publishable key.
  • When integrating CloudBase into a WeChat mini-program project, you need to follow the `miniprogram-development` guide to correctly initialize the environment and configure document database permissions before calling `wx.cloud` APIs, ensuring the correct user OPENID is used.
  • When needing to use CloudBase PostgreSQL features (e.g., `app.rdb()` or `queryPgDatabase`), you must route to `postgresql-development-cloudbase` and first complete username/password login setup and RLS security rule configuration, rather than attempting to operate it like NoSQL.
  • Before integrating a large model streaming dialogue feature in a web frontend project, you must run prerequisite checks (`DescribeActivityInfo` and `DescribeEnvPostpayPackage`) to confirm Token Credits package status, after which you can safely call the AI model API.

Best For

  • A full-stack engineer responsible for maintaining both web frontend interfaces and CloudBase backend services (auth, database, cloud functions), who needs to ensure correct integration sequence and adherence to security best practices.
  • A WeChat mini-program developer looking to leverage `wx.cloud` cloud development capabilities for rapid app building, but is confused about CloudBase environment initialization, database permission configuration, and how it differs from web auth systems.
  • A backend developer migrating an existing application to CloudBase PostgreSQL, who needs to understand the prerequisites for using new SDKs like `app.rdb()`, the RLS permission model, and how it differs from traditional NoSQL operations.
  • A frontend developer responsible for integrating AI dialogue or image generation into a web project, who needs to know the mandatory resource checks (eligibility verification, package queries) that must be completed before calling the large model API.