This skill leverages NocoBase's data-modeling capabilities to inspect and modify collections, fields, and relations. It is designed for users who need to manage data models within the NocoBase framework.
$ npx skills add https://github.com/nocobase/skills --skill nocobase-data-modelingThe nocobase-data-modeling skill enables AI agents to programmatically inspect and modify data models within NocoBase applications. It handles the creation and management of collections, fields, relations, and view-backed schemas — the foundational layer of any NocoBase database. This skill is essential for developers and data architects who need to automate data model design, establish relationships between entities, and configure the structural backbone of their applications. By integrating with Claude Code, Cursor, and other AI agent CLIs, it allows teams to define complex data architectures through natural language instructions, significantly accelerating the data modeling phase of application development.
Install via CLI with the provided command.
Inspect existing data collections
Modify fields in a data model
Change relations between data entities
Manage view-backed schemas
$ npx skills add https://github.com/nocobase/skills --skill nocobase-data-modelinggit clone https://github.com/nocobase/skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as a NocoBase data modeling expert. Using NocoBase's data-modeling capabilities, inspect and modify the [COLLECTION_NAME] collection in my [COMPANY] [INDUSTRY] application. Specifically, [TASK: add/remove/update fields, define relations, or analyze schema]. Here’s the current schema: [PASTE_CURRENT_SCHEMA_IF_AVAILABLE]. Return the updated schema and a migration plan if changes are required.
**Updated Schema for `orders` Collection in Acme Retail (E-commerce Platform)**
```json
{
"name": "orders",
"fields": [
{
"name": "id",
"type": "primary",
"label": "Order ID"
},
{
"name": "customerId",
"type": "belongsTo",
"target": "customers",
"label": "Customer"
},
{
"name": "orderDate",
"type": "date",
"label": "Order Date",
"default": "now"
},
{
"name": "status",
"type": "string",
"label": "Status",
"enum": ["pending", "processing", "shipped", "delivered", "cancelled"]
},
{
"name": "totalAmount",
"type": "number",
"label": "Total Amount",
"precision": 2
},
{
"name": "shippingAddress",
"type": "json",
"label": "Shipping Address",
"description": "Stores address as structured JSON"
},
{
"name": "paymentMethod",
"type": "string",
"label": "Payment Method",
"enum": ["credit_card", "paypal", "bank_transfer"]
}
],
"relations": [
{
"name": "customer",
"type": "belongsTo",
"target": "customers",
"sourceKey": "customerId",
"targetKey": "id"
}
]
}
```
**Migration Plan**
1. **Backup**: Take a backup of the `orders` collection before making changes.
2. **Add Fields**: Use the NocoBase admin panel to add `shippingAddress` (JSON type) and `paymentMethod` (enum).
3. **Update Relations**: Ensure the `customerId` field is correctly linked to the `customers` collection.
4. **Test**: Validate the schema changes in a staging environment before applying to production.
5. **Deploy**: Apply the changes and monitor for errors in production.Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan