ソース情報
- リポジトリ
- tools-only/X-Skills
- ソースの最終更新活動
- 2026年2月9日 04:36
- 検出された SKILL.md の言語
- 英語
- スター
- 7
- フォーク
- 1
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
メニュー
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/tools-only/X-Skills --skill prisma-schema-genコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
Index of Build Systems Skills
Coordination patterns for distributed dataflow systems including barriers, epochs, and distributed snapshots
Windowing, sessionization, time-series aggregation, and late data handling for streaming systems
SOC 職業分類に基づく
SKILL.md を表示中
| name | prisma-schema-gen |
| description | Generate Prisma schema from natural language descriptions |
| shortcut | psg |
| category | database |
| difficulty | beginner |
| estimated_time | 3-5 minutes |
Generates complete Prisma schema files from natural language descriptions, including models, relationships, indexes, and validation.
Generated Schema:
Output: Complete schema.prisma file ready for migration
Time: 3-5 minutes
# Generate schema from description
/prisma-schema-gen "Blog with users, posts, and comments"
# Shortcut
/psg "E-commerce with products, orders, and customers"
# Specify database
/psg "Task management app" --database postgresql
# With specific relationships
/psg "Social network with users, posts, likes, and follows"
Input:
/psg "Blog platform with users, posts, comments, and tags"
Generated schema.prisma:
// This is your Prisma schema file
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id String @id @default(uuid())
email String @unique
name String
password String
bio String?
avatar String?
posts Post[]
comments Comment[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([email])
@@map("users")
}
model Post {
id String @id @default(uuid())
title String
slug String @unique
content String @db.Text
excerpt String?
published Boolean @default(false)
publishedAt DateTime?
viewCount Int @default(0)
authorId String
author User @relation(fields: [authorId], references: [id], onDelete: Cascade)
comments Comment[]
tags PostTag[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([authorId])
@@index([slug])
@@index([published, publishedAt])
@@map("posts")
}
model Comment {
id String @id @default(uuid())
content String @db.Text
postId String
post Post @relation(fields: [postId], references: [id], onDelete: Cascade)
authorId String
author User @relation(fields: [authorId], references: [id], onDelete: Cascade)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([postId])
@@index([authorId])
@@map("comments")
}
model Tag {
id String @id @default(uuid())
name String @unique
slug String @unique
posts PostTag[]
@@index([slug])
@@map("tags")
}
// Junction table for many-to-many
model PostTag {
id String @id @default(uuid())
postId String
post Post @relation(fields: [postId], references: [id], onDelete: Cascade)
tagId String
tag Tag @relation(fields: [tagId], references: [id], onDelete: Cascade)
@@unique([postId, tagId])
@@index([postId])
@@index([tagId])
@@map("post_tags")
}
# After generating schema, run:
npx prisma migrate dev --name init
# This creates:
# - migrations/
# └── 20250110000000_init/
# └── migration.sql
import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()
// Create user
async function createUser() {
const user = await prisma.user.create({
data: {
email: '[email protected]',
name: 'John Doe',
password: 'hashed_password_here'
}
})
return user
}
// Create post with tags
async function createPost() {
const post = await prisma.post.create({
data: {
title: 'Getting Started with Prisma',
slug: 'getting-started-with-prisma',
content: 'Full blog post content...',
published: true,
publishedAt: new Date(),
authorId: 'user-uuid-here',
tags: {
create: [
{
tag: {
connectOrCreate: {
: { : },
: { : , : }
}
}
}
]
}
},
: {
: ,
: {
: {
:
}
}
}
})
post
}
() {
posts = prisma..({
: {
:
},
: {
: {
: {
: ,
: ,
:
}
},
: {
: {
:
}
},
: {
: {
:
}
}
},
: {
:
},
:
})
posts
}
() {
comment = prisma..({
: {
: ,
: ,
:
},
: {
: {
: {
: ,
:
}
}
}
})
comment
}
() {
posts = prisma..({
: {
: [
{ : { : query, : } },
{ : { : query, : } }
],
:
},
: {
:
}
})
posts
}
() {
post = prisma..({
: { slug },
: {
: ,
: {
: {
: {
: {
: ,
:
}
}
},
: {
:
}
},
: {
: {
:
}
}
}
})
(!post) {
()
}
prisma..({
: { : post. },
: { : { : } }
})
post
}
() {
posts = prisma..({
: {
: ,
: {
: {
: {
: tagSlug
}
}
}
},
: {
: ,
: {
: {
:
}
}
},
: {
:
}
})
posts
}
model Customer {
id String @id @default(uuid())
email String @unique
name String
phone String?
orders Order[]
cart Cart?
}
model Product {
id String @id @default(uuid())
name String
description String?
price Decimal @db.Decimal(10, 2)
stock Int @default(0)
orderItems OrderItem[]
cartItems CartItem[]
}
model Order {
id String @id @default(uuid())
customerId String
customer Customer @relation(fields: [customerId], references: [id])
items OrderItem[]
total Decimal @db.Decimal(10, 2)
status String // 'pending', 'paid', 'shipped', 'delivered'
createdAt DateTime @default(now())
}
model OrderItem {
id String @id @default(uuid())
orderId String
order Order @relation(fields: [orderId], references: [id])
productId String
product Product @relation(fields: [productId], references: [id])
quantity Int
price Decimal @db.Decimal(10, 2)
}
model User {
id String @id @default(uuid())
username String @unique
email String @unique
posts Post[]
likes Like[]
following Follow[] @relation("Following")
followers Follow[] @relation("Followers")
}
model Post {
id String @id @default(uuid())
content String
authorId String
author User @relation(fields: [authorId], references: [id])
likes Like[]
createdAt DateTime @default(now())
}
model Like {
id String @id @default(uuid())
userId String
user User @relation(fields: [userId], references: [id])
postId String
post Post @relation(fields: [postId], references: [id])
@@unique([userId, postId])
}
model Follow {
id String @id @default(uuid())
followerId String
followingId String
follower User @relation("Following", fields: [followerId], references: [id])
following User @relation("Followers", fields: [followingId], references: [id])
@@unique([followerId, followingId])
}
model Organization {
id String @id @default(uuid())
name String
slug String @unique
members Member[]
projects Project[]
}
model User {
id String @id @default(uuid())
email String @unique
memberships Member[]
}
model Member {
id String @id @default(uuid())
userId String
user User @relation(fields: [userId], references: [id])
orgId String
org Organization @relation(fields: [orgId], references: [id])
role String // 'owner', 'admin', 'member'
@@unique([userId, orgId])
}
model Project {
id String @id @default(uuid())
name String
orgId String
org Organization @relation(fields: [orgId], references: [id])
tasks Task[]
}
model Task {
id String @id @default(uuid())
title String
completed Boolean @default(false)
projectId String
project Project @relation(fields: [projectId], references: [id])
}
PostgreSQL:
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
// PostgreSQL-specific types
model Example {
jsonData Json
textData String @db.Text
amount Decimal @db.Decimal(10, 2)
}
MySQL:
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
SQLite (Development):
datasource db {
provider = "sqlite"
url = "file:./dev.db"
}
MongoDB:
datasource db {
provider = "mongodb"
url = env("DATABASE_URL")
}
model User {
id String @id @default(auto()) @map("_id") @db.ObjectId
email String @unique
}
1. Install Prisma:
npm install @prisma/client
npm install -D prisma
2. Initialize Prisma:
npx prisma init
3. Use generated schema:
prisma/schema.prisma with generated contentDATABASE_URL in .env4. Create migration:
npx prisma migrate dev --name init
5. Generate Prisma Client:
npx prisma generate
6. Use in code:
import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()
/sql-query-builder - Generate SQL queriesGenerate schemas fast. Migrate safely. Query confidently. ️