Designs database schemas from domain model descriptions. Generates ERD, migration scripts, and index strategies for PostgreSQL, MySQL, and MongoDB. Includes Prisma, Drizzle, SQLAlchemy, and raw SQL support.
Transforms domain descriptions into optimized database schemas with migrations, indexes, and relationship diagrams.
| Trigger | Behavior | |---------|----------| | New project data modeling | Full schema design workflow | | "database schema", "ERD" | Interactive schema builder | | Adding new entity/table | Incremental schema update |
From user description, extract:
Prisma Example:
model User {
id String @id @default(cuid())
email String @unique
name String?
role Role @default(USER)
posts Post[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([email])
}
model Post {
id String @id @default(cuid())
title String
content String?
published Boolean @default(false)
author User @relation(fields: [authorId], references: [id])
authorId String
tags Tag[]
createdAt DateTime @default(now())
@@index([authorId])
@@index([published, createdAt])
}
## Index Recommendations
| Table | Index | Type | Reason |
|-------|-------|------|--------|
| users | email | UNIQUE | Login lookup |
| posts | authorId | B-TREE | Filter by author |
| posts | (published, createdAt) | COMPOSITE | Published feed query |
| posts | title | GIN (trigram) | Full-text search |
Generate migration for chosen ORM/tool.
erDiagram
User ||--o{ Post : writes
Post }o--o{ Tag : has
User {
string id PK
string email UK
string name
enum role
}
Post {
string id PK
string title
string content
boolean published
string authorId FK
}
| Tool | Purpose |
|------|---------|
| Write | Generate schema files, migrations |
| Read | Analyze existing schema |
| Bash | Run migrations (npx prisma migrate, alembic upgrade) |
Will:
Will Not:
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer