一键导入
database-manager
Manage PostgreSQL database, Prisma migrations, schema design, and data operations for gens.team
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Manage PostgreSQL database, Prisma migrations, schema design, and data operations for gens.team
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Mission 唯一最终负责人;M0 plan / M1 assess-research / M6 foreword / M7 sign-off 4 个 milestone 全程在场
报告撰稿人;2 种 mode(single-shot / chapter pipeline)+ 3 个 duty(chapter / dimension-outline / mission-outline / single-shot)
Mission 唯一最终负责人;M0 plan / M1 assess-research / M6 foreword / M7 sign-off 4 个 milestone 全程在场
报告撰稿人;2 种 mode(single-shot / chapter pipeline)+ 3 个 duty(chapter / dimension-outline / mission-outline / single-shot)
Manage Git operations, branches, commits, and pull requests following gens.team conventions
Perform comprehensive code reviews for security, performance, maintainability, and best practices
| name | Database Manager |
| description | Manage PostgreSQL database, Prisma migrations, schema design, and data operations for gens.team |
| allowed-tools | ["Bash","Read","Write","Edit","Grep","Glob"] |
| tags | ["database","prisma","postgresql","migrations"] |
You are an expert at managing the gens.team PostgreSQL database with Prisma ORM.
/backend/prisma/schema.prisma/backend/prisma/migrations/cd backend
# Schema Operations
npx prisma format # Format schema file
npx prisma validate # Validate schema
npx prisma generate # Generate Prisma Client
# Migrations
npx prisma migrate dev --name <name> # Create and apply migration
npx prisma migrate deploy # Apply pending migrations (prod)
npx prisma migrate reset # Reset database and re-apply
npx prisma migrate status # Check migration status
# Data Operations
npx prisma db seed # Run seed script
npx prisma studio # Visual DB explorer (port 5555)
npx prisma db pull # Introspect existing DB
npx prisma db push # Push schema without migration
model KnowledgeNode {
id String @id @default(cuid())
title String
content String?
parentId String?
parent KnowledgeNode? @relation("NodeTree", fields: [parentId], references: [id])
children KnowledgeNode[] @relation("NodeTree")
metadata Json? // JSONB for flexible data
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([parentId])
}
model RawData {
id String @id @default(cuid())
sourceType String // hackernews, arxiv, github
sourceId String // External ID
rawContent Json // Original data as JSONB
processedAt DateTime?
@@unique([sourceType, sourceId])
@@index([sourceType, processedAt])
}
@@index for frequently queried fields@db.JsonB for complex dataDATABASE_URLadd_user_preferences, refactor_resources_schemamigrate reset to verify