Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Optional advanced tool for complex data modeling. For simple table creation, use relational-database-tool directly with SQL statements.
.claude/skills/microck-data-model-creation/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 19% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 88% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 42% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 373% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 175% | 0% |
This is an OPTIONAL advanced modeling tool for complex database design. Most simple table creation should use relational-database-tool directly with SQL statements.
ONLY use this skill when you specifically need:
For most cases, use rules/relational-database-tool/rule.md instead:
Do NOT use for:
⚠️ NOTE: This is OPTIONAL. For simple tasks, skip this and use relational-database-tool directly.
When you do use this advanced modeling approach:
mermaidDiagram parameter with complete mermaid classDiagram codepublish to false initially, create then publish separatelyupdateMode for new or existing modelsMost Database Tasks → rules/relational-database-tool/rule.md
Complex Modeling Only → This rule (rules/data-model-creation/rule.md)
For most database table creation tasks, use rules/relational-database-tool/rule.md directly:
CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(255))ALTER TABLE users ADD COLUMN email VARCHAR(255)INSERT, UPDATE, SELECT, DELETEOnly use this advanced Mermaid modeling approach when:
This rule exists for complex modeling scenarios, but most development should use direct SQL execution.
As an expert in data modeling and a senior architect in software development, you are proficient in Mermaid. Your main task is to provide model structures in mermaid classDiagram format based on user descriptions, following the detailed rules below:
| Business Field | type | | --- | --- | | Text | string | | Number | number | | Boolean | boolean | | Enum | x-enum | | Email | email | | Phone | phone | | URL | url | | File | x-file | | Image | x-image | | Rich Text | x-rtf | | Region | x-area-code | | Time | time | | Date | date | | DateTime | datetime | | Object | object | | Array | string] | | Location | x-location |
required() ["name", "age"]. By default, fields are not required.unique() ["name", "age"]. By default, fields are not unique.age: number = 0. By default, fields have no default values.<<description>> format at the end of the definition line, e.g., name: string <<Name>>.display_field() "name" means the main display field is name. Otherwise, default to the implicit _id of the data model.A "n" <-- "1" B: field1 means A has many-to-one relationship with B, data exists in A's field1 field. Refer to examples for specifics.mermaidclassDiagram class Student { name: string <<Name>> age: number = 18 <<Age>> gender: x-enum = "Male" <<Gender>> classId: string <<Class ID>> identityId: string <<Identity ID>> course: Course[] <<Courses>> required() ["name"] unique() ["name"] enum_gender() ["Male", "Female"] display_field() "name" } class Class { className: string <<Class Name>> display_field() "className" } class Course { name: string <<Course Name>> students: Student[] <<Students>> display_field() "name" } class Identity { number: string <<ID Number>> display_field() "number" } %% Relationships Student "1" --> "1" Identity : studentId Student "n" --> "1" Class : student2class Student "n" --> "m" Course : course Student "n" <-- "m" Course : students %% Class naming note for Student "Student Model" note for Class "Class Model" note for Course "Course Model" note for Identity "Identity Model"
string → VARCHAR/TEXTnumber → INT/BIGINT/DECIMALboolean → BOOLEAN/TINYINTdate → DATEdatetime → DATETIMEtime → TIMEx-enum → ENUM typex-file/x-image → File path storagex-rtf → LONGTEXT rich textx-area-code → Region codex-location → Geographic location coordinatesemail/phone/url → VARCHAR with validationexecuteWriteSQL with CREATE TABLEexecuteWriteSQL with ALTER TABLEexecuteReadOnlySQLmermaidDiagram: Complete mermaid classDiagram codepublish: Whether to publish model immediately (recommend default to false, create then publish)updateMode: Create new model or update existing modelmermaidclassDiagram class User { username: string <<Username>> email: email <<Email>> password: string <<Password>> avatar: x-image <<Avatar>> status: x-enum = "active" <<Status>> required() ["username", "email"] unique() ["username", "email"] enum_status() ["active", "inactive", "banned"] display_field() "username" }
mermaidclassDiagram class Product { name: string <<Product Name>> price: number <<Price>> description: x-rtf <<Product Description>> images: x-image[] <<Product Images>> category: string <<Category>> stock: number = 0 <<Stock>> required() ["name", "price"] display_field() "name" } class Order { orderNo: string <<Order Number>> totalAmount: number <<Total Amount>> status: x-enum = "pending" <<Order Status>> createTime: datetime <<Create Time>> required() ["orderNo", "totalAmount"] unique() ["orderNo"] enum_status() ["pending", "paid", "shipped", "completed", "cancelled"] display_field() "orderNo" }
mermaidclassDiagram class Article { title: string <<Title>> content: x-rtf <<Content>> author: string <<Author>> publishTime: datetime <<Publish Time>> status: x-enum = "draft" <<Status>> tags: string[] <<Tags>> required() ["title", "content", "author"] enum_status() ["draft", "published", "archived"] display_field() "title" }
These rules will guide AI Agents to generate high-quality, business-requirement-compliant data models during the data modeling process.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-24 | pass→pass | 16,208 | 13,465 | -17% | 1 | 1 | 0% | 3,200 | 5,913 | +85% | 0 | 0 | — |
case-01 | fail→pass | 23,729 | 12,026 | -49% | 1 | 1 | 0% | 4,953 | 5,879 | +19% | 0 | 0 | — |
case-02 | fail→pass | 12,922 | 8,748 | -32% | 1 | 1 | 0% | 2,731 | 5,145 | +88% | 0 | 0 | — |
case-03 | fail→pass | 20,273 | 13,567 | -33% | 1 | 1 | 0% | 4,329 | 6,132 | +42% | 0 | 0 | — |
case-04 | fail→pass | 5,134 | 8,655 | +69% | 1 | 1 | 0% | 1,010 | 4,776 | +373% | 0 | 0 | — |
case-05 | pass→pass | 2,771 | 4,329 | +56% | 1 | 1 | 0% | 473 | 3,801 | +704% | 0 | 0 | — |
case-06 | fail→pass | 7,580 | 4,747 | -37% | 1 | 1 | 0% | 1,461 | 4,017 | +175% | 0 | 0 | — |
case-07 | fail→pass | 8,286 | 6,072 | -27% | 1 | 1 | 0% | 1,560 | 4,118 | +164% | 0 | 0 | — |
case-08 | fail→pass | 4,299 | 4,715 | +10% | 1 | 1 | 0% | 743 | 3,992 | +437% | 0 | 0 | — |
case-09 | fail→pass | 5,736 | 5,823 | +2% | 1 | 1 | 0% | 998 | 4,209 | +322% | 0 | 0 | — |
case-10 | fail→pass | 7,622 | 3,488 | -54% | 1 | 1 | 0% | 1,208 | 3,667 | +204% | 0 | 0 | — |
case-11 | fail→pass | 8,184 | 6,273 | -23% | 1 | 1 | 0% | 1,568 | 4,306 | +175% | 0 | 0 | — |
case-12 | fail→pass | 2,118 | 3,660 | +73% | 1 | 1 | 0% | 368 | 3,736 | +915% | 0 | 0 | — |
case-13 | fail→pass | 8,002 | 2,433 | -70% | 1 | 1 | 0% | 1,265 | 3,490 | +176% | 0 | 0 | — |
case-14 | fail→pass | 5,210 | 3,104 | -40% | 1 | 1 | 0% | 1,020 | 3,645 | +257% | 0 | 0 | — |
case-15 | pass→pass | 8,135 | 6,089 | -25% | 1 | 1 | 0% | 1,622 | 4,265 | +163% | 0 | 0 | — |
case-16 | fail→pass | 5,062 | 3,125 | -38% | 1 | 1 | 0% | 948 | 3,603 | +280% | 0 | 0 | — |
case-17 | pass→pass | 2,498 | 4,125 | +65% | 1 | 1 | 0% | 426 | 3,754 | +781% | 0 | 0 | — |
case-23 | pass→pass | 3,715 | 2,446 | -34% | 1 | 1 | 0% | 602 | 3,424 | +469% | 0 | 0 | — |
case-18 | fail→pass | 6,970 | 3,859 | -45% | 1 | 1 | 0% | 1,242 | 3,782 | +205% | 0 | 0 | — |
case-19 | fail→pass | 11,292 | 6,392 | -43% | 1 | 1 | 0% | 2,089 | 4,466 | +114% | 0 | 0 | — |
case-20 | fail→pass | 7,146 | 7,807 | +9% | 1 | 1 | 0% | 1,378 | 4,693 | +241% | 0 | 0 | — |
case-21 | pass→pass | 4,864 | 2,175 | -55% | 1 | 1 | 0% | 830 | 3,415 | +311% | 0 | 0 | — |
case-22 | pass→pass | 3,182 | 3,427 | +8% | 1 | 1 | 0% | 605 | 3,593 | +494% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of +71 percentage points is the difference between those two pass rates over the 24 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.