ai-model-nodejs
Use this skill for Node.js backend AI via @cloudbase/node-sdk (>=3.16.0) — cloud functions, CloudRun, Express/Koa/NestJS,…
Use when building, debugging, or evaluating CloudBase PostgreSQL / CloudBase PG / PG mode apps, including Postgres schema setup, queryPgDatabase/managePgDatabase, JS SDK v3 app.rdb() CRUD/RPC, PG HTTP API fallback, RLS-style permissions, username-password auth, and Web CMS/admin
Claude Code
$ npx -y skills add TencentCloudBase/CloudBase-AI-Toolkit --skill postgresql-development-cloudbase --agent claude-code
Codex
$ npx skills add TencentCloudBase/CloudBase-AI-Toolkit --skill postgresql-development-cloudbase -a codex -y
Cursor
$ npx skills add TencentCloudBase/CloudBase-AI-Toolkit --skill postgresql-development-cloudbase -a cursor -y
Gemini CLI
$ npx skills add TencentCloudBase/CloudBase-AI-Toolkit --skill postgresql-development-cloudbase -a gemini-cli -y
GitHub Copilot
$ npx skills add TencentCloudBase/CloudBase-AI-Toolkit --skill postgresql-development-cloudbase -a github-copilot -y
OpenCode
$ npx skills add TencentCloudBase/CloudBase-AI-Toolkit --skill postgresql-development-cloudbase -a opencode -y
Windsurf
$ npx skills add TencentCloudBase/CloudBase-AI-Toolkit --skill postgresql-development-cloudbase -a windsurf -y
name: postgresql-development-cloudbase description: "Use when building, debugging, or evaluating CloudBase PostgreSQL / CloudBase PG / PG mode apps, including Postgres schema setup, queryPgDatabase/managePgDatabase, JS SDK v3 app.rdb() CRUD/RPC, PG HTTP API fallback, RLS-style permissions, username-password auth, and Web CMS/admin CRUD flows backed by CloudBase PG." version: 2.37.6 license: MIT alwaysApply: false
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 PG (`app.rdb()`, `app.storage.from('bucket')`) uses **different API method names** than CloudBase NoSQL (`app.database()`, `app.uploadFile()`). Low-capability models often paste legacy NoSQL/auth snippets from training; reject that path immediately. If this task is PG-backed, **do not** write `app.database()`, `db.collection(...)`, `app.uploadFile()`, `getLoginState()`, or route guards based on `auth.getUser()`. Use `app.rdb()`, PG storage v3, and `auth.getSession()` instead. If you are used to writing `.where()`, `.orderBy()`, `.count()` from other ORMs or NoSQL — **stop and read the table below**.
| ❌ Do NOT use these (NoSQL / ORM habits) | ✅ Use these in PG mode | |------------------------------------------|------------------------| | `.where({ field: value })` | `.match({ field: value })` or `.eq("field", value)` | | `.where("field", "ilike", "%v%")` | `.ilike("field", "%v%")` | | `.orderBy("field", { ascending: false })` | `.order("field", { ascending: false })` | | `.count()` | `.select("*", { count: "exact" })` — count is in response | | `.offset(n)` | `.range(from, to)` | | `app.uploadFile()` (legacy NoSQL upload) | `app.storage.from('bucket').upload(key, file)` | | `app.getTempFileURL()` (legacy NoSQL URL) | `app.storage.from('bucket').createSignedUrl(key, expiresIn)` | | `app.storage.from()` (no bucket name) | `app.storage.from('bucket')` — **must** pass bucket name |
**If you find yourself typing `.where()` or `.orderBy()` or `.count()` — stop and use the correct method from the right column.**
> **pgdoc exception**: when the task moves an existing document-database app onto PG **without changing its SDK calls**, the client keeps `app.database()` / `db.collection(...)`. That is pgdoc, not a PG-mode rewrite — read `references/pgdoc.md` before reacting to those method names. This section's ban applies to NEW PG business tables that use `app.rdb()`.
0. **First, confirm this environment actually has PostgreSQL provisioned.** Call `queryEnv(action="info", envId=...)` and read the derived `EnvInfo.RuntimeBackends` block (`{ postgresql, nosql, mysql }`) along with `EnvInfo.RuntimeMode`. It is only safe to apply this skill's PG-specific guidance when `RuntimeBackends.postgresql === true` (equivalently, `EnvInfo.PostgreSQL` is non-empty AND/OR `EnvInfo.Meta` contains `postgresql=enable`).
AI writes the code. CloudBase runs the backend. The CloudBase integration layer for AI coding tools: Plugin installs the stack, Skills steer how code is written, MCP operates databases, functions, storage, and deploys from chat.
Use this skill for Node.js backend AI via @cloudbase/node-sdk (>=3.16.0) — cloud functions, CloudRun, Express/Koa/NestJS,…
Use this skill when a browser/Web app (React, Vue, Next, Nuxt, static sites, SPAs, dashboards, AI chat UI, 页面, 前端, 网页) needs AI…
Use this skill for WeChat Mini Program AI via wx.cloud.extend.AI (小程序, wx.cloud apps). Covers generateText and streamText with…
CloudBase Node SDK auth guide for server-side identity, user lookup, and custom login tickets. This skill should be used when…
CloudBase auth provider configuration and login-readiness guide. This skill should be used when users need to inspect, enable,…
CloudBase Web Authentication Quick Guide for frontend integration after auth-tool has already been checked. Provides concise and…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.