CloudBase Models Skill

Perform ORM-like CRUD and SQL operations on MySQL in CloudBase cloud functions.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/dang0705/planting --skill cloudbase-models-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: CloudBase Models Skill
Source: https://github.com/dang0705/planting/tree/main/.claude/skills/cloudbase-models
Command: npx skills add https://github.com/dang0705/planting --skill cloudbase-models-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @cloudbase/node-sdk, and includes scripts (resource) components.

What problem does it solve?

This Skill simplifies and streamlines database operations in CloudBase cloud functions, especially for MySQL, providing an ORM-like interface and handling complex SQL queries.

Core Features & Use Cases

  • ORM API: Automates CRUD operations, data validation, and relationship management.
  • Complex SQL Queries: Executes advanced SQL queries using $runSQL(), suitable for JOIN, GROUP BY, and aggregations.
  • Integration: Seamlessly integrates with CloudBase cloud functions and SDKs.
  • Use Case: Ideal for automating database tasks in CloudBase applications, such as user data management, content creation, and analytics.

Quick Start

Use the CloudBase Models Skill to create a new plant record with ORM API: app.models.plants.create({data: {nickname: "Rose", location: "Garden"}}).

Frequently Asked Questions about CloudBase Models Skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage MySQL database operations in CloudBase cloud functions?

To manage MySQL database operations in CloudBase cloud functions, you can use an ORM-like interface that automates CRUD operations, handles data validation, and manages relationships without writing raw SQL manually.

Can I execute complex SQL queries like JOIN and GROUP BY in CloudBase?

Yes, you can execute complex SQL queries like JOIN and GROUP BY in CloudBase by using the $runSQL() function, which supports advanced aggregations and multi-table operations directly within cloud functions.

Does this ORM approach support data validation and relationship management?

Yes, the ORM approach supports data validation and relationship management, automatically handling input verification and relational data mapping to ensure secure and structured database records in CloudBase.

Do I need the CloudBase node-sdk to use this ORM in cloud functions?

Yes, you need the @cloudbase/node-sdk dependency to use this ORM in cloud functions, as the Skill seamlessly integrates with the CloudBase ecosystem and relies on its SDK for environment initialization.

What is the best way to create a new database record in CloudBase?

The best way to create a new database record in CloudBase is using the ORM API, such as calling app.models.plants.create({data: {nickname: "Rose"}}) to effortlessly insert validated data into your MySQL database.

What are the limitations of using an ORM for MySQL in CloudBase?

The main limitation of using an ORM for MySQL in CloudBase is that highly complex SQL queries may exceed standard ORM capabilities, requiring you to bypass the ORM and use the $runSQL() function for advanced aggregations.