cloudbase-document-database-web-sdk
Use CloudBase document database Web SDK to query, create, update, and delete data. Supports complex queries, pagination, aggregation, and geolocation queries.
Install / Use
npx skills add Microck/ordinary-claude-skills --skill cloudbase-document-database-web-sdkInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Data & AnalyticsSupported Platforms
Our assessment of cloudbase-document-database-web-sdk
cloudbase-document-database-web-sdk scores 83/100 on our quality scale, 441st of 592 Data & Analytics skills we index.
Its SKILL.md is 5.2 KB long, well organised into 22 sections with 7 code examples: a solid amount of guidance for an agent.
It has 399 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated 30 days ago, so cloudbase-document-database-web-sdk is actively maintained.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
cloudbase-document-database-web-sdk compared with similar skills
All 4 of these similar skills score higher than cloudbase-document-database-web-sdk; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| cloudbase-document-database-web-sdk (this skill)by Microck | 83 | 399 | 30d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 14d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 14d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 15d ago | SKILL.md |
| ui-ux-pro-maxby nextlevelbuilder | 100 | 130.2k | 15d ago | SKILL.md |
Frequently asked questions
- How do I install cloudbase-document-database-web-sdk?
- Run
npx skills add Microck/ordinary-claude-skills --skill cloudbase-document-database-web-sdk. The install tabs above show the steps for each supported agent. - Which AI agents does cloudbase-document-database-web-sdk 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-web-sdk safe to use?
- It declares no license and scores 88/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-web-sdk still maintained?
- The repository was last updated 30 days ago, so cloudbase-document-database-web-sdk is actively maintained.
Skill content
View source on GitHubname: cloudbase-document-database-web-sdk description: Use CloudBase document database Web SDK to query, create, update, and delete data. Supports complex queries, pagination, aggregation, and geolocation queries.
CloudBase Document Database Web SDK
This skill provides guidance on using the CloudBase document database Web SDK for data operations in web applications.
Core Concepts
Initialization
Before using any database operations, initialize the CloudBase SDK:
import cloudbase from "@cloudbase/js-sdk";
// UMD version
// If you are not using npm, And want to use UMD version instead. You should refer to https://docs.cloudbase.net/quick-start/#web-%E5%BF%AB%E9%80%9F%E4%BD%93%E9%AA%8C for latest version of UMD version.
const app = cloudbase.init({
env: "your-env-id", // Replace with your environment id
});
const db = app.database();
const _ = db.command; // Get query operators
// ... login
Initialization rules (Web, @cloudbase/js-sdk):
- Always use synchronous initialization with the pattern above
- Do not lazy-load the SDK with
import("@cloudbase/js-sdk") - Do not wrap SDK initialization in async helpers such as
initCloudBase()with internalinitPromisecaches
Remember to sign in(auth) is *REQUIRED before actually querying the database.
Collection Reference
Access collections using:
db.collection('collection-name')
Query Operators
CloudBase provides query operators via db.command (aliased as _):
_.gt(value)- Greater than_.gte(value)- Greater than or equal_.lt(value)- Less than_.lte(value)- Less than or equal_.eq(value)- Equal to_.neq(value)- Not equal to_.in(array)- Value in array_.nin(array)- Value not in array
Basic Operations
Query Single Document
Query by document ID:
const result = await db.collection('todos')
.doc('docId')
.get();
Query Multiple Documents
Query with conditions:
const result = await db.collection('todos')
.where({
completed: false,
priority: 'high'
})
.get();
Note: get() returns 100 records by default, maximum 1000.
Query Methods Chaining
Combine methods for complex queries:
.where(conditions)- Filter conditions.orderBy(field, direction)- Sort by field ('asc' or 'desc').limit(number)- Limit results (default 100, max 1000).skip(number)- Skip records for pagination.field(object)- Specify fields to return (true/false)
Advanced Features
For detailed information on specific topics, refer to:
CRUD Operations
See ./crud-operations.md for:
- Creating documents (add, batch add)
- Updating documents (partial updates, operators)
- Deleting documents (conditional delete, soft delete)
- Complete CRUD manager examples
Complex Queries
See ./complex-queries.md for:
- Using query operators
- Combining multiple conditions
- Field selection
- Sorting and limiting results
Pagination
See ./pagination.md for:
- Implementing page-based navigation
- Calculating skip and limit values
- Cursor-based pagination
- Infinite scroll patterns
Aggregation Queries
See ./aggregation.md for:
- Grouping data
- Statistical calculations
- Pipeline operations
- Time-based aggregations
Geolocation Queries
See ./geolocation.md for:
- Proximity searches
- Area-based queries
- Geographic indexing requirements
- Distance-based features
Security Rules
See ./security-rules.md for:
- Configuring database permissions
- Simple permissions vs custom rules
- Permission categories and usage
- Security rule syntax and examples
Common Patterns
Error Handling
Always wrap database operations in try-catch:
try {
const result = await db.collection('todos').get();
console.log(result.data);
} catch (error) {
console.error('Database error:', error);
}
Return Value Structure
Database operations return:
{
data: [...], // Array of documents
// Additional metadata
}
Important Notes
- Environment ID: Replace
"your-env-id"with actual CloudBase environment ID - Default Limits:
get()returns 100 records by default - Collection Names: Use string literals for collection names
- Geolocation Index: Geographic queries require proper indexing
- Async/Await: All database operations are asynchronous
Best Practices
- Initialize SDK once at application startup
- Reuse database instance across the application
- Use query operators for complex conditions
- Implement pagination for large datasets
- Select only needed fields to reduce data transfer
- Handle errors appropriately
- Create indexes for frequently queried fields
Quick Reference
Common query examples:
// Simple query
db.collection('todos').where({ status: 'active' }).get()
// With operators
db.collection('users').where({ age: _.gt(18) }).get()
// Pagination
db.collection('posts')
.orderBy('createdAt', 'desc')
.skip(20)
.limit(10)
.get()
// Field selection
db.collection('users')
.field({ name: true, email: true, _id: false })
.get()
For more detailed examples and advanced usage patterns, refer to the companion reference files in this directory.
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.
