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.
Install / Use
npx skills add TencentCloudBase/CloudBase-AI-Toolkit --skill cloudbase-document-database-in-wechat-miniprogramInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Data & AnalyticsSupported Platforms
Our assessment of cloudbase-document-database-in-wechat-miniprogram
cloudbase-document-database-in-wechat-miniprogram scores 88/100 on our quality scale, 273rd of 513 Data & Analytics skills we index.
Its SKILL.md is 4.7 KB long, well organised into 17 sections with 4 code examples: a solid amount of guidance for an agent.
With 1,124 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 9 days ago, so cloudbase-document-database-in-wechat-miniprogram is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
cloudbase-document-database-in-wechat-miniprogram compared with similar skills
All 4 of these similar skills score higher than cloudbase-document-database-in-wechat-miniprogram; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| cloudbase-document-database-in-wechat-miniprogram (this skill)by TencentCloudBase | 88 | 1.1k | 9d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 12d ago | SKILL.md |
| ui-ux-pro-maxby nextlevelbuilder | 100 | 130.2k | 12d ago | SKILL.md |
Frequently asked questions
- How do I install cloudbase-document-database-in-wechat-miniprogram?
- Run
npx skills add TencentCloudBase/CloudBase-AI-Toolkit --skill cloudbase-document-database-in-wechat-miniprogram. The install tabs above show the steps for each supported agent. - Which AI agents does cloudbase-document-database-in-wechat-miniprogram work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is cloudbase-document-database-in-wechat-miniprogram safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is cloudbase-document-database-in-wechat-miniprogram still maintained?
- The repository was last updated 9 days ago, so cloudbase-document-database-in-wechat-miniprogram is actively maintained.
Skill content
View source on GitHubname: cloudbase-document-database-in-wechat-miniprogram description: Use CloudBase document database WeChat MiniProgram SDK to query, create, update, and delete data. Supports complex queries, pagination, aggregation, and geolocation queries. version: 2.34.8 alwaysApply: false
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 Document Database WeChat Mini Program SDK
Activation Contract
Use this first when
- A WeChat Mini Program must access CloudBase document database through
wx.cloud.database(). - The request mentions Mini Program collection CRUD, pagination, aggregation, or geolocation queries.
Read before writing code if
- The task is Mini Program database work but you still need to separate it from Web SDK, cloud functions, or SQL tasks.
- The request depends on built-in user identity,
_openid, or Mini Program-side permissions.
Then also read
- Mini Program project rules and CloudBase integration ->
../miniprogram-development/SKILL.md - Mini Program auth and identity flow ->
../auth-wechat-miniprogram/SKILL.md - Browser-side document database code ->
../cloudbase-document-database-web-sdk/SKILL.md
Do NOT use for
- Browser/Web code using
@cloudbase/js-sdk. - Server-side or cloud-function database access.
- MySQL / relational database work.
Common mistakes / gotchas
- Copying Web SDK code into Mini Program pages.
- Manually writing
_openidduring create or update operations. - Assuming built-in Mini Program identity means security rules can be ignored.
- Mixing collection CRUD and backend-wide admin workflows in the same client path.
Minimal checklist
- Confirm the caller is a Mini Program page/component or Mini Program-side logic.
- Initialize
wx.cloudcorrectly before database calls. - Verify whether the collection rules rely on
auth.openid/_openid. - Read the specific companion reference file for the operation you need.
Overview
This skill covers Mini Program-side document database access through wx.cloud.database().
Use it for:
- collection CRUD in Mini Program pages
- query composition and pagination
- aggregation
- geolocation queries
Mini Program CloudBase access comes with built-in identity, but database operations are still constrained by collection permissions and security rules.
Canonical initialization
const db = wx.cloud.database();
const _ = db.command;
To target a specific environment:
const db = wx.cloud.database({
env: "test"
});
Important notes:
- Users are authenticated through the Mini Program CloudBase context.
- In cloud functions, caller identity is available through
wxContext.OPENID. - In client-side collection rules, ownership checks usually use
auth.openid/doc._openid.
Quick routing
- CRUD ->
./crud-operations.md - Complex queries ->
./complex-queries.md - Pagination ->
./pagination.md - Aggregation ->
./aggregation.md - Geolocation ->
./geolocation.md - Security rules ->
./security-rules.md
Working rules for a coding agent
-
Keep Mini Program code Mini Program-native
- Use
wx.cloud.database(). - Do not substitute browser SDK initialization patterns.
- Use
-
Respect ownership fields
_openidis system-managed for SDK writes.- Never set or override
_openidmanually in.add(),.set(), or.update()payloads.
-
Remember that security rules validate requests
- If a rule requires ownership conditions, the query shape must match that rule model.
- Permission errors usually mean the rule/query relationship is wrong, not only that the user is logged out.
-
Route admin-style operations to backend flows
- If the task needs privileged global access, use backend tools or functions instead of exposing that path directly in Mini Program client code.
Quick examples
Basic collection access
const todos = db.collection("todos");
const result = await todos.where({ completed: false }).get();
Document reference
const todo = db.collection("todos").doc("todo-id");
const result = await todo.get();
Best practices
- Create clear collection naming conventions.
- Use typed wrappers or model helpers in app code where possible.
- Design rules around real ownership and sharing patterns.
- Use pagination instead of large unbounded reads.
- Keep admin/operations logic in backend code, not Mini Program direct access.
Related Skills
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse 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 presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
ui-ux-pro-max
130.2kUI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
