Skip to main content
skill CX Codex

relational-database-web-cloudbase — Claude Code skill for CloudBase

Sets the init pattern for @cloudbase/js-sdk in the browser so you get one shared CloudBase relational DB client and Supabase-style queries.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add TencentCloudBase/skills --skill relational-database-web-cloudbase -a claude-code
Open on GitHub

What relational-database-web-cloudbase does

This skill covers browser-side setup of CloudBase Relational Database. You get the canonical sequence: cloudbase.init({ env: "your-env-id" }), then app.auth for login, then app.rdb() for the database client. Queries after that look like db.from("posts").select("*"), with insert, update, delete and .eq() available.

The rules matter more than the snippet. Init runs synchronously. One db client is created and reused, not rebuilt inside every component. Lazy-loading the SDK with import("@cloudbase/js-sdk") is discouraged unless your framework forces it. Schema work and privileged administration stay out of browser code.

One thing to check before you install: the skill is marked deprecated. New environments should go to PostgreSQL with app.rdb() in the postgresql-development-cloudbase skill. MySQL administration, DDL and table security rules belong to relational-database-mcp-cloudbase, since provisioning is not offered through MCP. You need npm install @cloudbase/js-sdk and an environment id.

What it helps with

  • wire a browser app to CloudBase Relational Database
  • share one db client instead of initializing per component
  • swap a Supabase browser client for CloudBase
  • run Supabase-style table queries from the frontend
  • keep login and data access as separate steps

Example prompts for the agent

  • Initialize CloudBase in the browser with @cloudbase/js-sdk and export a shared db client from one module
  • Rewrite this component to use db.from("posts").select("*") instead of a direct fetch
  • Replace the Supabase client with CloudBase RDB, keep login on app.auth

How to install relational-database-web-cloudbase

1Skills CLI (Vercel)

npx skills add TencentCloudBase/skills --skill relational-database-web-cloudbase -a claude-code

2Manually: put the files in place

~/.claude/skills/relational-database-web-cloudbase/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/relational-database-web-cloudbase/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about relational-database-web-cloudbase

How do I install relational-database-web-cloudbase in Claude?

Run npx skills add TencentCloudBase/skills --skill relational-database-web-cloudbase -a claude-code. The skill file then sits at ~/.claude/skills/relational-database-web-cloudbase/SKILL.md.

What does relational-database-web-cloudbase do?

It gives the canonical browser init for CloudBase Relational Database: cloudbase.init, login through app.auth, and an app.rdb() client for Supabase-style queries.

Is this skill still current?

It is marked deprecated. For new environments the authors point to PostgreSQL with app.rdb() in the postgresql-development-cloudbase skill.

Source text

SKILL.md · MIT
---
name: relational-database-web-cloudbase
description: "[Deprecated] Use when building frontend Web apps that talk to CloudBase Relational Database via @cloudbase/js-sdk – provides the canonical init pattern so you can then use Supabase-style queries from the browser. New environments should use PostgreSQL with app.rdb() — see postgresql-development skill instead."
version: 2.36.1
license: MIT
alwaysApply: false
metadata:
  priority: "5"
  deprecated: "true"
---

## Sibling skills (local only)

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.

# CloudBase Relational Database Web SDK

## Activation Contract

### Use this first when

- A browser or Web app must access CloudBase Relational Database through `@cloudbase/js-sdk`.
- The task is specifically about frontend initialization and browser-side query usage.

### Read before writing code if

- You need to distinguish browser SDK usage from MCP database management or backend Node access.
- The request mentions Supabase migration, shared frontend DB client, or browser-side table queries.

### Then also read

- MySQL SQL management and MCP operations -> `../relational-database-mcp-cloudbase/SKILL.md`
- Web auth/login -> `../auth-web-cloudbase/SKILL.md`
- General Web app setup -> `../web-development/SKILL.md`

### Do NOT use for

- MCP-based SQL management, schema changes, or permissions management (provisioning is not offered through MCP).
- Backend/Node service access.
- Document database operations.

### Common mistakes / gotchas

- Initializing SDKs in an MCP management flow.
- Treating `app` itself as the relational database client.
- Re-initializing CloudBase in every component.
- Mixing frontend browser access with admin-style schema mutations.

### Minimal checklist

- Confirm the caller is a Web frontend.
- Keep one shared CloudBase app and one shared relational DB client.
- Route MySQL management/schema work on an existing instance to `relational-database-mcp-cloudbase` (it does not provision). If the task says PostgreSQL, CloudBase PG, PG mode, `app.rdb()`, `queryPgDatabase`, `managePgDatabase`, or RLS, route to `postgresql-development-cloudbase` instead.
- Handle auth separately before data access.

## Overview

This skill standardizes the **browser-side initialization pattern** for CloudBase Relational Database.

After initialization, use `db` with Supabase-style query patterns.

## Installation

```bash
npm install @cloudbase/js-sdk
```

## Canonical initialization

```javascript
import cloudbase from "@cloudbase/js-sdk";

const app = cloudbase.init({
  env: "your-env-id"
});

const auth = app.auth;
// Handle login separately

const db = app.rdb();
```

## Initialization rules

- Initialize synchronously.
- Do not lazy-load the SDK with `import("@cloudbase/js-sdk")` unless the framework absolutely requires it.
- Create one shared `db` client and reuse it.
- Do not invent unsupported `cloudbase.init()` options.

## Quick routing

### Use this skill when

- you are wiring browser components to relational tables
- you are replacing a Supabase browser client with CloudBase
- you need a canonical shared frontend `db` client

### Use `relational-database-mcp-cloudbase` instead when

- you need to create/destroy MySQL
- you need MySQL DDL or write-SQL administration
- you need to inspect or change MySQL table security rules through MCP

### Use `postgresql-development-cloudbase` instead when

- the task says PostgreSQL, CloudBase PG, PG mode, `app.rdb()`, `queryPgDatabase`, `managePgDatabase`, PostgREST, or RLS
- browser-side table code must use PG semantics rather than legacy NoSQL / MySQL management tools

## Example: shared frontend DB client

```javascript
import cloudbase from "@cloudbase/js-sdk";

const app = cloudbase.init({
  env: "your-env-id"
});

export const db = app.rdb();
```

## Example: Supabase-style query

```javascript
const { data, error } = await db
  .from("posts")
  .select("*")
  .order("created_at", { ascending: false });

if (error) {
  console.error("Failed to load posts", error.message);
}
```

## Example: insert / update / delete

```javascript
await db.from("posts").insert({ title: "Hello" });
await db.from("posts").update({ title: "Updated" }).eq("id", 1);
await db.from("posts").delete().eq("id", 1);
```

## Key principle

- `app.rdb()` gives you the relational database client.
- After that point, use Supabase-style query knowledge for table operations.
- Keep schema management and privileged administration outside browser code.

© TencentCloudBase · MIT · TencentCloudBase/skills

Similar skills

All skills for Data and databases →

From the same set18

data-model-creation Designs multi-entity relational schemas using Mermaid class diagrams for Tencent CloudBase. Useful when you need visual modeling before generating database tables. CX Codex +1 1,000installs ai-model-nodejs A skill that teaches the agent to call AI models from a Node.js backend through @cloudbase/node-sdk: text, images, cloud functions, CloudRun. CX Codex +1 998installs cloudrun-development Backend development rules for CloudBase Run: deploying services with long connections, VPC database access, and diagnosing container deploy failures. CX Codex +1 983installs http-api-cloudbase Guides coding agents through direct HTTP calls to Tencent CloudBase platform services. Useful for Python or Go backends, mobile apps, and scripts without official SDKs. CX Codex +1 977installs auth-nodejs-cloudbase A skill for configuring server-side identity, user lookup, and custom login tickets in CloudBase backend services with the Node.js SDK. CX Codex +1 960installs relational-database-mcp-cloudbase A skill that tells an agent how to run SQL, change schema and edit permissions on CloudBase Relational Database through MCP. Marked deprecated. CX Codex +1 956installs auth-web-cloudbase Guides frontend authentication and session handling for Tencent CloudBase in Web apps. Helps agents avoid deprecated methods and broken route guards. CX Codex +1 951installs ai-model-web Directs frontend apps to run AI models via @cloudbase/js-sdk straight from the browser without setting up a Node.js proxy. CX Codex +1 913installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor