prisma-schema-builder_skill

This skill generates complete Prisma schema.prisma files with models, relations, enums, and configuration for TypeScript projects.
  • TypeScript

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill ehtbanton/claudeskillsrepo --skill prisma-schema-builder

  • SKILL.md14.7 KB

Overview

This skill generates complete Prisma schema.prisma files tailored for TypeScript projects using Prisma 5.x. It produces models, relations, enums, indexes, and datasource/generator blocks ready for immediate use. The output focuses on practical, production-ready patterns for authentication, e-commerce, and common domain models.

How this skill works

Provide the domain or trigger phrase (for example: "create Prisma schema" or "prisma.schema for e-commerce") and the skill builds a full Prisma Schema Language file. It chooses appropriate scalar and database-specific types, maps fields and column names, defines relations (one-to-many, many-to-many explicit/implicit), and adds indexes and constraints. The result is a single schema.prisma compatible with PostgreSQL or MySQL with Prisma client generator configured.

When to use it

  • Bootstrapping a new TypeScript backend with Prisma ORM
  • Generating domain schemas for authentication, e-commerce, CMS, or custom models
  • Creating reference schemas for database migrations and typesafe client generation
  • Speeding up prototyping by producing ready-to-run schema.prisma files
  • Standardizing schema patterns across projects or teams

Best practices

  • Specify provider and DATABASE_URL environment variable in the datasource block
  • Use cuid()/autoincrement() and appropriate unique constraints for stable identifiers
  • Add @@index and @@unique directives for query-critical fields (email, sku, orderNumber)
  • Map database column names with @map for backward compatibility when needed
  • Prefer explicit join tables for many-to-many when you need extra metadata on relationships

Example use cases

  • Generate a complete authentication schema with User, Session, Account, PasswordReset, and VerificationToken models
  • Create an e-commerce schema including Product, Category, Variant, Cart, Order, and Review models with enums for statuses
  • Produce a simple blog schema with Post, Author, Tag and PostTag join table
  • Convert a domain description (fields and relations) into a ready-to-run schema.prisma file

FAQ

Schemas are generated for Prisma 5.x and use Prisma Schema Language patterns compatible with that version.

Can I target PostgreSQL and MySQL?

Yes. The skill uses provider-agnostic types by default and includes db-specific annotations (@db.*) when you request Postgres- or MySQL-specific fields.

Will it add indexes and constraints automatically?

Yes. The generator adds common @@index, @@unique, and @@id directives for fields that benefit from them (identifiers, foreign keys, lookup fields).

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
prisma-schema-builder skill by ehtbanton/claudeskillsrepo | VeilStrat