
data-model-creation
[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.
- Installs
- 50
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/tencentcloudbase/cloudbase-ai-toolkit --skill data-model-creation- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads data-model-creation automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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.
FAQ
What does the data-model-creation skill do?
[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.
How do I install data-model-creation?
Run npx skills add https://github.com/tencentcloudbase/cloudbase-ai-toolkit --skill data-model-creation in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/data-model-creation/ (personal) or .claude/skills/data-model-creation/ (project).
Which AI agents can use data-model-creation?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is data-model-creation safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains data-model-creation?
It is published by tencentcloudbase in tencentcloudbase/cloudbase-ai-toolkit. It has 50 recorded installs.
More from tencentcloudbase/cloudbase-ai-toolkit
miniprogram-development
tencentcloudbase/cloudbase-ai-toolkit
WeChat Mini Program development skill for building, debugging, previewing, testing, publishing, and optimizing mini program projects (小程序开发、调试、预览、发布). Covers project structure and config (project.config.json, appid, miniprogramRoot, tabBar, routing/navigation, icon assets), WeChat Developer Tools Nightly workflows (wechatide CLI, WeChat IDE Skills/MCP), miniprogram-ci preview/upload, console/network debugging, message push (消息推送) and customer-service auto-reply (客服消息), mini program SEO / search indexing (小程序搜索优化、页面收录、搜索推广、mpcrawler), and CloudBase integration (wx.cloud, 腾讯云开发, 云开发) when explicitly used. Use when users create, develop, modify, debug, preview, deploy, publish, or promote WeChat Mini Programs. NOT for Web frontend (use web-development), pure backend services (use cloudrun-development / cloud-functions), or UI-design-only tasks (use ui-design).
auth-wechat-miniprogram
tencentcloudbase/cloudbase-ai-toolkit
CloudBase WeChat Mini Program native authentication guide. This skill should be used when users need mini program identity handling, OPENID/UNIONID access, or wx.cloud auth behavior in projects where login is native and automatic.
web-development
tencentcloudbase/cloudbase-ai-toolkit
Use when users need to implement, integrate, debug, build, deploy, or validate a Web frontend after the product direction is already clear, especially for React, Vue, Vite, browser flows, or CloudBase Web integration.
cloudbase-document-database-in-wechat-miniprogram
tencentcloudbase/cloudbase-ai-toolkit
Use CloudBase document database WeChat MiniProgram SDK to query, create, update, and delete data. Supports complex queries, pagination, aggregation, and geolocation queries.
cloudbase-platform
tencentcloudbase/cloudbase-ai-toolkit
CloudBase platform overview and routing guide. This skill should be used when users need high-level capability selection, platform concepts, console navigation, realtime (broadcast / presence / live database changes), or cross-platform best practices before choosing a more specific implementation skill.
cloud-functions
tencentcloudbase/cloudbase-ai-toolkit
CloudBase function runtime guide for building, deploying, and debugging your own Event Functions or HTTP Functions. This skill should be used when users need application runtime code on CloudBase, not when they are merely calling CloudBase official platform APIs.
Popular data & databases skills
supabase-postgres-best-practices
supabase/agent-skills
Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pgcron, pgmq), vector/semantic search (pgvector), and restoring dumps (pgrestore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.
prisma-client-api
prisma/skills
Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".
prisma-database-setup
prisma/skills
Deprecated compatibility name for prisma-orm-setup. Use only when a user or existing integration explicitly invokes prisma-database-setup; otherwise select prisma-orm-setup.
prisma-cli
prisma/skills
Prisma ORM 7 CLI reference for existing Prisma 7 applications or explicitly selected Prisma 7 workflows. Covers prisma init, generate, migrate, db, dev, studio, and mcp. For setup, connection repair, or Prisma 8, use prisma-orm-setup; not the Prisma Platform CLI.
prisma-postgres
prisma/skills
Deprecated compatibility name for prisma-postgres-setup. Use only when a user or existing integration explicitly invokes prisma-postgres; otherwise select prisma-postgres-setup.
prisma-driver-adapter-implementation
prisma/skills
Required reference for Prisma ORM 7 SQL driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter, Transaction, savepoint, result mapping, or DriverAdapterError behavior. Covers current transaction lifecycle, optional savepoint hooks, original database-error preservation, and verification.