一键导入
database-design
Generate Prisma/PostgreSQL database schemas
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate Prisma/PostgreSQL database schemas
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Design REST/WebSocket API contracts with TypeScript types
Generate REST APIs from TypeScript contracts with CRUD operations
Implements authentication (JWT, OAuth2) and authorization (RBAC) from requirements
Review quality of generated code. Checks for empty files, broken imports, missing modules, duplicate code, TypeScript errors, and rates overall quality. Identifies files that need regeneration.
Quick health check of all Coding Engine infrastructure. Checks containers, DB connectivity, API endpoints, Discord bot, sandbox preview, LLM API keys, and generation process. Takes 15 seconds.
Diagnoses pipeline problems and outputs actionable fix commands. Combines insights from status-report, code-quality, task-audit, and health-check into concrete recommendations with copy-paste-ready commands. Answers "what should I do next?" and "why is generation stuck?"
| name | database-design |
| description | Generate Prisma/PostgreSQL database schemas |
| tier_tokens | {"minimal":120,"standard":300,"full":600} |
Generate complete Prisma schema from enriched requirements.
Valid Prisma schema with:
id, createdAt, updatedAt on all models@id @default(uuid())any or loose types@updatedAt on updatedAt fieldmodel Entity {
id String @id @default(uuid())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
// Foreign key
parentId String
parent Parent @relation(fields: [parentId], references: [id], onDelete: Cascade)
@@index([parentId])
}
| Concept | Prisma Type | Attributes |
|---|---|---|
| Identifier | String | @id @default(uuid()) |
| Created timestamp | DateTime | @default(now()) |
| Updated timestamp | DateTime | @updatedAt |
| String | @unique | |
| Large text | String | @db.Text |
| Money | Decimal | @db.Decimal(10, 2) |
| JSON data | Json | |
| Coordinates | Float | (latitude, longitude) |
| Status | Enum | Define enum type |
| Boolean flag | Boolean | @default(false) |
model User {
id String @id @default(uuid())
posts Post[]
}
model Post {
id String @id @default(uuid())
userId String
user User @relation(fields: [userId], references: [id])
@@index([userId])
}
model Post {
id String @id @default(uuid())
tags PostTag[]
}
model Tag {
id String @id @default(uuid())
posts PostTag[]
}
model PostTag {
postId String
tagId String
post Post @relation(fields: [postId], references: [id])
tag Tag @relation(fields: [tagId], references: [id])
@@id([postId, tagId])
}
model Entity {
id String @id @default(uuid())
deletedAt DateTime?
isDeleted Boolean @default(false)
@@index([isDeleted])
}
model Comment {
id String @id @default(uuid())
commentableId String
commentableType String // "Post" | "Photo"
@@index([commentableId, commentableType])
}
model AuditLog {
id String @id @default(uuid())
entityType String
entityId String
action String // CREATE, UPDATE, DELETE
changes Json
userId String
createdAt DateTime @default(now())
@@index([entityType, entityId])
@@index([userId])
}
model Document {
id String @id @default(uuid())
version Int @default(1)
@@unique([id, version])
}
| Query Pattern | Index Type |
|---|---|
| WHERE field = value | Single column |
| WHERE a = x AND b = y | Composite @@index([a, b]) |
| ORDER BY field | Single column |
| Full-text search | Use pg_trgm extension |
| Geo queries | PostGIS GIST index |