Agent skill
relational-database-web-cloudbase
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.
Install this agent skill to your Project
npx add-skill https://github.com/TencentCloudBase/CloudBase-MCP/tree/main/config/source/skills/relational-database-web
SKILL.md
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
- SQL management and MCP operations ->
../relational-database-tool/SKILL.md - Web auth/login ->
../auth-web/SKILL.md - General Web app setup ->
../web-development/SKILL.md
Do NOT use for
- MCP-based SQL provisioning, schema changes, or security-rule management.
- Backend/Node service access.
- Document database operations.
Common mistakes / gotchas
- Initializing SDKs in an MCP management flow.
- Treating
appitself 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 provisioning/schema work to
relational-database-tool. - 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
npm install @cloudbase/js-sdk
Canonical initialization
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
dbclient 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
dbclient
Use relational-database-tool instead when
- you need to create/destroy MySQL
- you need DDL or write-SQL administration
- you need to inspect or change table security rules through MCP
Example: shared frontend DB client
import cloudbase from "@cloudbase/js-sdk";
const app = cloudbase.init({
env: "your-env-id"
});
export const db = app.rdb();
Example: Supabase-style query
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
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.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
cloudbase
Essential CloudBase (TCB, Tencent CloudBase, 云开发, 微信云开发) development guidelines. MUST read when working with CloudBase projects, developing web apps, mini programs, backend services, fullstack development, static deployment, cloud functions, mysql/nosql database, authentication, cloud storage, web search or AI(LLM streaming) using CloudBase platform. Great supabase alternative.
skill-authoring
Design, improve, and evaluate reusable agent skills with high-quality SKILL.md files, precise trigger descriptions, progressive disclosure, and testable behavior. This skill should be used when users ask to create a new skill, rewrite or review an existing skill, audit a skill collection such as `config/source/skills` for redundancy or overlap, improve skill trigger quality, organize skill references, or evaluate whether a skill should trigger and behave correctly.
git-workflows
Reusable git delivery workflows derived from local slash commands (commit, push, PR, release notes, and GitHub Actions failure triage with worktree-based fixes).
codebase-audit
Perform a full codebase review, categorize findings by severity, file GitHub issues, then fix each issue in an isolated git worktree and submit PRs. Use this skill when the user asks to audit the codebase, do a comprehensive code review, find and fix security/quality/reliability issues, or run a proactive health check across the entire repository.
manage-local-skills
Analyze, standardize, validate, and sync locally maintained skills into agent skill directories with a `skills` CLI-aligned workflow. Use this skill when Codex needs to turn ad-hoc prompt or rules folders into reusable `SKILL.md`-based skills, install or sync one or more local skills from `./skills` into Claude, Cursor, CodeBuddy, Codex, or similar agent directories, or manage local skill path mappings and symlink or copy installation behavior.
planning-workflows
Spec and no-spec planning workflows derived from local slash commands (requirements, design, tasks).
Didn't find tool you were looking for?