tencentcloudbase/cloudbase-document-database-in-wechat-miniprogram
Use CloudBase document database WeChat MiniProgram SDK to query, create, update, and delete data. Supports complex queries, pagination, aggregation, and geolocation queries.
npx skills add https://github.com/TencentCloudBase/CloudBase-AI-Toolkit --skill cloudbase-document-database-in-wechat-miniprogram
If this environment only installed the current skill, start from the CloudBase main entry and use the published cloudbase/references/... paths for sibling skills.
https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/SKILL.mdhttps://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloudbase-document-database-in-wechat-miniprogram/SKILL.mdKeep local references/... paths for files that ship with the current skill directory. When this file points to a sibling skill such as auth-tool-cloudbase or web-development, use the standalone fallback URL shown next to that reference.
wx.cloud.database()._openid, or Mini Program-side permissions.../miniprogram-development/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/miniprogram-development/SKILL.md)../auth-wechat-miniprogram/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/auth-wechat-miniprogram/SKILL.md)../cloudbase-document-database-web-sdk/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloudbase-document-database-web-sdk/SKILL.md)@cloudbase/js-sdk._openid during create or update operations.wx.cloud correctly before database calls.auth.openid / _openid.This skill covers Mini Program-side document database access through wx.cloud.database().
Use it for:
Mini Program CloudBase access comes with built-in identity, but database operations are still constrained by collection permissions and security rules.
const db = wx.cloud.database();
const _ = db.command;
To target a specific environment:
const db = wx.cloud.database({
env: "test"
});
Important notes:
wxContext.OPENID.auth.openid / doc._openid../crud-operations.md./complex-queries.md./pagination.md./aggregation.md./geolocation.md./security-rules.mdwx.cloud.database()._openid is system-managed for SDK writes._openid manually in .add(), .set(), or .update() payloads.const todos = db.collection("todos");
const result = await todos.where({ completed: false }).get();
const todo = db.collection("todos").doc("todo-id");
const result = await todo.get();
Take tencentcloudbase/cloudbase-document-database-in-wechat-miniprogram from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.