prisma-gen
Generate Prisma schema from plain English. Use when you need database models fast without writing boilerplate.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- prisma-gen
- description
- Generate Prisma schema from plain English. Use when you need database models fast without writing boilerplate.
02 资源文件 7
- 参考文档_meta.json278 B
- 参考文档package-lock.json30.2 KB
- 参考文档package.json642 B
- 参考文档README.md261 B
- 脚本src/cli.ts662 B
- 脚本src/index.ts738 B
- 参考文档tsconfig.json251 B
03 SKILL.md 正文
Prisma Gen
Stop hand-writing Prisma schemas. Just describe your data model in plain English and get a complete, production-ready schema.prisma file in seconds. No more googling relation syntax or forgetting @unique decorators.
One command. Zero config. Just works.
Quick Start
npx ai-prisma-gen "a blog with users, posts, comments, and tags"
What It Does
- Generates complete Prisma schema from natural language descriptions
- Handles relations automatically (one-to-many, many-to-many, self-referential)
- Adds proper indexes, constraints, and default values
- Supports all Prisma field types and decorators
- Outputs clean, formatted schema ready to use
Usage Examples
# E-commerce database
npx ai-prisma-gen "e-commerce with products, categories, orders, and user reviews"
# SaaS multi-tenant
npx ai-prisma-gen "multi-tenant saas with organizations, teams, users, and role-based permissions"
# Social app
npx ai-prisma-gen "social network with users, friendships, posts, likes, and direct messages"
# Save to file
npx ai-prisma-gen "task management with projects and assignees" > prisma/schema.prisma
Best Practices
- Be specific about relations - Say "users have many posts" instead of just "users and posts"
- Mention unique fields - Include "email should be unique" if that's what you need
- Include edge cases - Soft deletes, timestamps, status enums. Mention them upfront.
- Review before migrating - The schema is a starting point. Always check the output matches your needs.
When to Use This
- Starting a new project and need a database schema fast
- Prototyping an idea and don't want to waste time on boilerplate
- Learning Prisma and want to see how complex relations should look
- Converting a mental model into actual schema code
Part of the LXGIC Dev Toolkit
This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.
Find more:
- GitHub: https://github.com/LXGIC-Studios
- Twitter: https://x.com/lxgicstudios
- Substack: https://lxgicstudios.substack.com
- Website: https://lxgic.dev
Requirements
No install needed. Just run with npx. Node.js 18+ recommended. Requires OPENAI_API_KEY environment variable.
export OPENAI_API_KEY=sk-...
npx ai-prisma-gen --help
How It Works
Takes your plain English description, sends it to GPT with Prisma-specific prompting, and returns a properly formatted schema.prisma file. The AI understands Prisma conventions like @@index, @relation, and common patterns like soft deletes and timestamps.
License
MIT. Free forever. Use it however you want.
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.