weapp-db-design

Design WeChat mini program database models and generate Mermaid ER diagrams.

1|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/hekinami/weapp-dev-workflow --skill weapp-db-design
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: weapp-db-design
Source: https://github.com/hekinami/weapp-dev-workflow/tree/main/skills/weapp-db-design
Command: npx skills add https://github.com/hekinami/weapp-dev-workflow --skill weapp-db-design

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

这个技能帮助你把需求文档里的数据需求快速转化为可执行的数据库设计,避免实体遗漏、关系混乱和模型风格不一致的问题。

Core Features & Use Cases

  • 需求提炼:从 User Story 中识别需要持久化的实体、字段、关系和约束。
  • 模型设计:根据现有架构与已有类图,扩展或修正数据库模型。
  • Mermaid 输出:生成可直接保存到项目中的 Mermaid ER 图,便于与架构文档同步。
  • 使用场景:当你在开发微信小程序全栈项目时,需要根据新需求补充订单、用户、内容或配置等数据模型,这个技能可以直接产出结构清晰的数据库图。

Quick Start

请将相关 User Story 和架构文档交给 weapp-db-design,让它生成并更新 docs/design/db/models.mmd 中的 Mermaid 类图。

Frequently Asked Questions about weapp-db-design

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

FAQPage Schema
How do I generate a database ER diagram from user stories?

To generate a database ER diagram from user stories, you analyze product requirements to identify persistent entities, fields, and constraints, then output a Mermaid ER diagram. This process extracts data needs directly from user stories to ensure no entities are missed.

What is the best way to design a database schema for a WeChat mini program?

The best way to design a database schema for a WeChat mini program is to derive entities and relationships directly from product requirements and architecture documents. This ensures the database model remains consistent with existing structures and project needs.

Does this database design approach support Django field conventions?

Yes, this database design approach supports Django field conventions. It applies Django field standards during schema modeling and extension, while also incorporating necessary timestamp and soft-delete considerations into the generated Mermaid ER diagram.

How to update an existing database model with new requirements?

To update an existing database model with new requirements, you extend or modify the current schema based on new user stories while maintaining consistency with existing class diagrams. The updated database design is then saved as a Mermaid ER diagram.

Where should I save the Mermaid ER diagram for full-stack workflow projects?

You should save the Mermaid ER diagram for full-stack workflow projects in the docs/design/db/models.mmd file. Saving the resulting database diagram here ensures it synchronizes properly with your architecture documents and project design.