postgresql-development-cloudbase
FreeNo executable scriptsNot checkedUse when building, debugging, or evaluating CloudBase PostgreSQL / CloudBase PG / PG mode apps, including Postgres schema setup…
by TencentCloudBase★ 83 GitHub starsAbout this skill
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 PostgreSQL Development
Activation Contract
Use this first when
- The task says CloudBase PG, PostgreSQL, Postgres, PG mode, RLS, JS SDK v3 PostgreSQL,
app.rdb(),app.realtime(),queryPgDatabase,managePgDatabase, or a Realtime action (describeRealtime/enableRealtime/modifyRealtime). - A Web app or CMS must persist business data in CloudBase PostgreSQL.
Then also read
- Access-pattern design or slow-query work ->
../postgresql-best-practices-cloudbase/SKILL.md - Web auth provider readiness ->
../auth-tool-cloudbase/SKILL.md - Web login implementation ->
../auth-web-cloudbase/SKILL.md - General Web implementation and verification ->
../web-development/SKILL.md - Browser storage upload ->
../cloud-storage-web/SKILL.md - Raw HTTP API details only when SDK coverage is blocked ->
../http-api-cloudbase/SKILL.md - PG reference index ->
references/index.md - pgdoc (document API carried by PostgreSQL) ->
references/pgdoc.md - PG mode overview ->
references/pg-mode-overview.md - Auth / GRANT / RLS details ->
references/auth-and-rls.md - End-to-end PG app closure ->
references/app-workflow.md - PG storage details — MUST read before writing any bucket / upload / URL code ->
references/storage-pg.md - Realtime (broadcast / presence / live table changes) ->
references/realtime.md - HTTP API fallback ->
references/http-api.md - Troubleshooting ->
references/troubleshooting.md
Do NOT use first
relational-database-mcp-cloudbase/queryMysqlDatabase/manageMysqlDatabasefor new relational work. Those skills are only for an environment that already has MySQL.cloudbase-document-database-web-sdk/ collection APIs for business data that must live in CloudBase PG.- Exception: moving an existing document-database app onto PG while keeping its SDK calls is pgdoc, not a PG rewrite — read
references/pgdoc.md. The ban above covers NEW business tables only.
- Exception: moving an existing document-database app onto PG while keeping its SDK calls is pgdoc, not a PG rewrite — read
Required Flow
🚨 CRITICAL: PG mode API is NOT the same as NoSQL
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 — readreferences/pgdoc.mdbefore reacting to those method names. This section's ban applies to NEW PG business tables that useapp.rdb().
- First, confirm this environment actually has PostgreSQL provisioned. Call
queryEnv(action="info", envId=...)and read the derivedEnvInfo.RuntimeBackendsblock ({ postgresql, nosql, mysql }) along withEnvInfo.RuntimeMode. It is only safe to apply this skill's PG-specific guidance whenRuntimeBackends.postgresql === true(equivalently,EnvInfo.PostgreSQLis non-empty AND/OREnvInfo.Metacontainspostgresql=enable).- PG mode is a new-environment mode selected when creating a CloudBase environment with PostgreSQL. Do not try to "upgrade" a legacy environment in place; create/select a PG-mode environment instead.
- If `RuntimeBackends.postg
Install postgresql-development-cloudbase in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the postgresql-development-cloudbase skill do?
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. Also use when an existing document-database app (app.database() / db.collection() / wx.cloud.database() / wx-server-sdk cloud functions) must run on a PostgreSQL environment without rewriting its SDK calls — that is the pgdoc / PG Document plugin (EnablePGDocumentExt), not a PG rewrite; see references/pgdoc.md.
How do I install the postgresql-development-cloudbase skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the postgresql-development-cloudbase skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
by AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
by Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
by Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
by Anthropic