skills/sirn/dotfiles/code-design-schema

code-design-schema

SKILL.md

Design data models, database schemas, and ORM definitions.

Process

  1. Identify context:

    • Identify the database technology (Postgres, MySQL, SQLite, Mongo, etc.)
    • Identify the ORM/Framework (Prisma, TypeORM, SQLAlchemy, Django, etc.)
    • Understand the entity relationships (1:1, 1:N, M:N)
  2. Research and design:

    • Lookup framework best practices for defining models and relationships (use WebSearch/WebFetch)
    • Design the schema/entity relationship considering scalability and normalization
  3. Execute based on goal:

    • New Schema: Generate SQL DDL or ORM model definitions
    • Modification: Analyze current schema vs desired state, generate migration steps
    • Validation: Check for normalization issues or N+1 query risks in relationships

Output

  1. Schema Design (ER Diagram description or Model code)
  2. Migration Plan (SQL or CLI commands)
  3. Rationale (Why these types/indices were chosen)
Weekly Installs
12
Repository
sirn/dotfiles
GitHub Stars
8
First Seen
12 days ago
Installed on
qoder12
gemini-cli12
qwen-code12
claude-code12
github-copilot12
codex12