data-model-creation
Skill78 starsChanged 2 months agoMITView on GitHub
[Deprecated] Optional advanced tool for complex data modeling. For simple MySQL table creation, use relational-database-tool directly; for PostgreSQL / CloudBase PG schema work, use postgresql-development. New environments should use PostgreSQL DDL via queryPgDatabase/managePgDatabase — see postgresql-development skill instead.
In this repository33 other files it gives its agents.
- ai-model-nodejsSkill
- ai-model-webSkill
- ai-model-wechatSkill
- auth-nodejs-cloudbaseSkill
- auth-tool-cloudbaseSkill
- auth-web-cloudbaseSkill
- auth-wechat-miniprogramSkill
- cloud-api-operationsSkill
- cloudbase-agent-pythonSkill
- cloudbase-agentSkill
- cloudbase-agentSkill
- cloudbase-cliSkill
- cloudbase-code-reviewSkill
- cloudbase-declarative-deploySkill
- cloudbase-document-database-in-wechat-miniprogramSkill
- cloudbase-document-database-web-sdkSkill
- cloudbase-platformSkill
- cloudbaseSkill
- cloudbase-wechat-integrationSkill
- cloud-functionsSkill
- cloudrun-developmentSkill
- cloud-storage-webSkill
- http-api-cloudbaseSkill
- minimal-web-baas-demoSkill
- miniprogram-developmentSkill
- ops-inspectorSkill
- postgresql-best-practices-cloudbaseSkill
- postgresql-development-cloudbaseSkill
- relational-database-mcp-cloudbaseSkill
- relational-database-web-cloudbaseSkill
- spec-workflowSkill
- ui-designSkill
- web-developmentSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 10 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
If a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing …
- Distinctive: line 56
Keep the initial model small unless the user explicitly wants a large enterprise schema.
- Distinctive: line 63
Use this skill only when diagram-driven modeling adds value.
- Distinctive: line 85
Prefer 3-5 core entities unless the user clearly asks for more.
- Very specific: line 92
Read/list existing models -> manageDataModel(action="list"|"get"|"docs")
- Very specific: line 93
Create a new model -> modifyDataModel (compatibility name.
- Distinctive: line 96
Prefer creating with unpublished or draft-like intent first.
- Distinctive: line 106
Keep enum values human-readable when needed
- Very specific: line 130
Use required() only for fields the user explicitly marks as required.
- Very specific: line 131
Use unique() only for explicit uniqueness needs.
- Very specific: line 132
Use display_field() for the human-facing label field.
- Very specific: line 133
Add concise <<description>> notes to important fields.
- Distinctive: line 134
Keep relationship labels tied to actual field names rather than vague business prose.
- Distinctive: line 167
Use this before creating related models, checking naming consistency, or assessing how an existing model is defined:
- Distinctive: line 184
Prefer direct SQL unless the user clearly benefits from model-first design.
- Distinctive: line 185
Keep the first model iteration small and reviewable.
- Very specific: line 188
After modeling, hand off actual MySQL SQL/table work to relational-database-mcp-cloudbase when needed.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.
Data Model Creation
Activation Contract
Use this first when
- The user explicitly wants Mermaid
classDiagrammodeling. - The task needs complex multi-entity relational design, visual ER-style output, or generated data-model structure rather than direct SQL.
- You need to create CloudBase data models through the dedicated modeling tools, or you need to inspect an existing model before planning follow-up changes.
Read before writing code if
- The request mentions data model, ER diagram, Mermaid, relationship graph, or enterprise schema design.
- The user wants to reuse or update an existing published model.
Then also read
- Direct MySQL SQL creation or schema change ->
../relational-database-mcp-cloudbase/SKILL.md - PostgreSQL / CloudBase PG schema work ->
../postgresql-development-cloudbase/SKILL.md - Broader feature planning before schema work ->
../spec-workflow/SKILL.md
Do NOT use for
- Simple
CREATE TABLE,ALTER TABLE, or CRUD tasks. - Document-database collection design.
- Frontend-only data-shape discussions with no modeling requirement.
Common mistakes / gotchas
- Using Mermaid modeling for a task that only needs one or two SQL statements.
- Mixing SQL-table design and NoSQL collection design in the same model.
- Generating diagrams without first deciding entity boundaries and ownership relations.
- Publishing a new model before validating the generated fields and relationships.
Minimal checklist
- Confirm Mermaid modeling is actually needed.
- List the core entities and relationships first.
- Decide whether this is a new model or an update.
- Keep the initial model small unless the user explicitly wants a large enterprise schema.
Overview
This skill is an advanced modeling path, not the default path for database work.
- For most MySQL database tasks, use
relational-database-mcp-cloudbaseand write SQL directly. If the task says PostgreSQL, CloudBase PG, PG mode,app.rdb(),queryPgDatabase,managePgDatabase, or RLS, usepostgresql-development-cloudbaseinstead. - Use this skill only when diagram-driven modeling adds value.
Quick routing
Use relational-database-mcp-cloudbase instead when
- You need MySQL
CREATE TABLE,ALTER TABLE,INSERT,UPDATE,DELETE, orSELECT - The schema is small and already clear
- The user never asked for a visual model
- The task does not mention PostgreSQL / CloudBase PG / PG mode /
app.rdb()/queryPgDatabase/managePgDatabase/ RLS
Use this skill when
- You need multi-entity relationship modeling
- You need Mermaid
classDiagramoutput - You want generated model structure and documentation
- You need a clean modeling pass before SQL implementation
How to use this skill (for a coding agent)
- Clarify the entity set
- Extract business entities, ownership, and relationship cardinality from the request.
- Prefer 3-5 core entities unless the user clearly asks for more.
- Model first, then generate
- Draft Mermaid
classDiagramcontent. - Validate names, field types, and relationships before calling modeling tools.
- Draft Mermaid
- Use the right tools
- Read/list existing models ->
manageDataModel(action="list"|"get"|"docs") - Create a new model ->
modifyDataModel(compatibility name; create-only)
- Read/list existing models ->
- Publish carefully
- Prefer creating with unpublished or draft-like intent first.
- Publish only after checking field names, required constraints, and relationship directions.
Mermaid generation rules
Naming
- Class names -> PascalCase
- Field names -> camelCase
- Convert Chinese business descriptions into clear English identifiers
- Keep enum values human-readable when needed
Type mapping
| Business meaning | Mermaid type |
| text | string |
| number | number |
| boolean | boolean |
| enum | x-enum |
email | |
| phone | phone |
| URL | url |
| image | x-image |
| file | x-file |
| rich text | x-rtf |
| date | date |
| datetime | datetime |
| region | x-area-code |
| location | x-location |
| array | string[] or another explicit array type |
Required structure conventions
- Use
required()only for fields the user explicitly marks as required. - Use
unique()only for explicit uniqueness needs. - Use
display_field()for the human-facing label field. - Add concise
<<description>>notes to important fields. - Keep relationship labels tied to actual field names rather than vague business prose.
Minimal example
classDiagram
class User {
username: string <<Username>>
email: email <<Email>>
display_field() "username"
required() ["username", "email"]
unique() ["username", "email"]
}
class Order {
orderNo: string <<Order Number>>
totalAmount: number <<Total Amount>>
userId: string <<User ID>>
display_field() "orderNo"
unique() ["orderNo"]
}
Order "n" --> "1" User : userId
%% Class naming
note for User "用户"
note for Order "订单"Tool usage guidance
Read existing models
Use this before creating related models, checking naming consistency, or assessing how an existing model is defined:
manageDataModel(action="list")manageDataModel(action="get", name="ModelName")manageDataModel(action="docs", name="ModelName")
Create model
Use modifyDataModel with:
- a complete
mermaidDiagram action="create"when you want to create new models- a deliberate publish decision
- clear awareness that updating existing model structures is not currently supported by this tool
Best practices
- Prefer direct SQL unless the user clearly benefits from model-first design.
- Keep the first model iteration small and reviewable.
- Separate business entities from implementation-only helper fields.
- Validate relationship direction and ownership before publishing.
- After modeling, hand off actual MySQL SQL/table work to
relational-database-mcp-cloudbasewhen needed. For PostgreSQL / CloudBase PG tables, hand off topostgresql-development-cloudbaseinstead.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

