relational-database-web-cloudbase

Initializes CloudBase Relational Database in browser apps using @cloudbase/js-sdk with Supabase-style queries.

Updated May 14, 2026
One-click install
npx skills add https://github.com/study-yang/Vieb-Coding-- --skill relational-database-web-cloudbase-study-yang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: relational-database-web-cloudbase
Source: https://github.com/study-yang/Vieb-Coding--/tree/main/%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F-%E5%BF%AB%E8%AE%B0/.codebuddy/skills/relational-database-web
Command: npx skills add https://github.com/study-yang/Vieb-Coding-- --skill relational-database-web-cloudbase-study-yang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @cloudbase/js-sdk.

What problem does it solve? Frontend developers building Web apps on CloudBase often struggle with the correct browser-side initialization pattern for the Relational Database, mixing it up with MCP-based management or backend Node access. This Skill provides the canonical init pattern so you can immediately use Supabase-style queries from the browser. ## Core Features & Use Cases - Canonical Initialization: Standardizes the cloudbase.init() plus app.rdb() pattern for a single shared frontend database client. - Supabase-Style Queries: After initialization, use familiar db.from("posts").select() patterns for select, insert, update, and delete operations. - Clear Routing Boundaries: Distinguishes browser SDK usage from MCP schema management, backend Node access, and document database operations. - Use Case: You are migrating a React app from Supabase to CloudBase and need a shared db client that all components can import for table queries. ## Quick Start Ask the AI to initialize a CloudBase relational database client in your Web app using @cloudbase/js-sdk and write a Supabase-style query against one of your tables.

Frequently Asked Questions about relational-database-web-cloudbase

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I initialize CloudBase Relational Database in a Web app?

Install @cloudbase/js-sdk, call cloudbase.init({ env: "your-env-id" }) once, then create the relational client with app.rdb(). Export this single db client and reuse it across components instead of re-initializing.

How to query CloudBase relational tables from the browser?

Use Supabase-style query syntax on the db client, such as db.from("posts").select("*").order("created_at", { ascending: false }). Insert, update, and delete follow the same pattern with .insert(), .update(), and .delete().

Can I migrate from Supabase to CloudBase Relational Database?

Yes, the browser query API mirrors Supabase patterns, so existing db.from().select() style code transfers with minimal changes. Replace the Supabase client initialization with cloudbase.init() and app.rdb().

When should I not use the CloudBase Web SDK for database work?

Do not use the browser SDK for MCP-based SQL provisioning, schema changes, permission management, or backend Node service access. Route those tasks to the relational-database-tool skill or backend services instead.

Why is my CloudBase Web app creating multiple database clients?

This happens when cloudbase.init() is called inside individual components. Initialize once at the app entry point, export the shared db client from a single module, and import it wherever data access is needed.