create-prisma-model

Generate Prisma schema snippets and TypeScript repository helpers for Node.js projects.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/PeterCowling/base-shop --skill create-prisma-model
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: create-prisma-model
Source: https://github.com/PeterCowling/base-shop/tree/main/.claude/skills/create-prisma-model
Command: npx skills add https://github.com/PeterCowling/base-shop --skill create-prisma-model

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams consistently design Prisma models with proper relations, indexes, and a reusable repository pattern, reducing boilerplate and migration errors.

Core Features & Use Cases

  • Model design guidance: generate Prisma schema snippets with typed fields, relations, and indexes.
  • Repository scaffolding: create TypeScript repository helpers to query and mutate models.
  • Migration readiness: provide schema changes aligned with Prisma migrate workflow and versioning.
  • Use Case: when adding a new model to packages/platform-core/prisma/schema.prisma, this skill ensures correct relations and indexes and produces a ready-to-migrate patch.

Quick Start

Create a new model using the provided schema blueprint in packages/platform-core/prisma/schema.prisma and run Prisma migrate to apply changes.

Frequently Asked Questions about create-prisma-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define Prisma models with relations and indexes in a TypeScript project?▼

To define Prisma models with relations and indexes, generate schema snippets with typed fields and relation patterns using a repository pattern. This ensures correct schema structure and produces a ready-to-migrate patch for multi-model Node.js projects.

What is the best way to scaffold a Prisma repository pattern for Node.js?▼

The best way to scaffold a Prisma repository pattern is to automate the creation of TypeScript repository helpers that query and mutate models. This reduces boilerplate and standardizes data access across multi-model projects.

Does Prisma schema migration work with multi-model projects using TypeScript?▼

Yes, Prisma schema migration works with multi-model TypeScript projects by providing schema changes aligned with the Prisma migrate workflow. This ensures versioned, migration-ready changes for relations, indexes, and constraints.

How do I add relations and constraints to an existing Prisma schema?▼

To add relations and constraints to an existing Prisma schema, apply model design guidance that generates schema snippets with typed fields and relation patterns. This satisfies requirements for indexes, constraints, and migration-ready changes.

Why do I need a repository pattern when using Prisma ORM?▼

You need a repository pattern when using Prisma ORM to reduce boilerplate and standardize how applications query and mutate models. It creates reusable TypeScript helpers that prevent migration errors and ensure consistent data access.