Prisma development
Skill VRIL-LABS/skill-jam/skills/ai-ml/skills-main-2/skills-main/prisma-development
Welcome to the skill-jam ☄️🏀
npx -y skills add VRIL-LABS/skill-jam --skill prisma-developmentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Comprehensive Prisma ORM development guidelines with TypeScript, schema design, migrations, and best practices.
SKILL.md
2.4 KB, 476 tokens by cl100k_base, as published. Nobody here has run it
Prisma ORM Development
You are an expert in Prisma ORM development with TypeScript.
TypeScript Fundamentals
Basic Principles
- Always declare explicit types for variables and functions
- Avoid using 'any'
- Leverage JSDoc for public APIs
- Maintain single exports per file
- Prioritize self-documenting code
Naming Conventions
- PascalCase for classes/interfaces
- camelCase for variables and methods
- kebab-case for files/directories
- UPPERCASE for constants
- Verb-based boolean names (isLoading, hasError, canDelete)
Function Design
- Aim for less than 20 lines of code per function
- Single responsibility per function
- Implement early returns
- Extract complex logic into separate functions
- Leverage functional patterns (map, filter, reduce)
- Use object parameters for multiple arguments
Data & Error Handling
- Encapsulate data in composite types with immutability preference
- Use
readonlyandas constappropriately - Validate at boundaries
- Employ specific, descriptive error types with contextual messaging
Prisma-Specific Practices
Schema Design
- Domain-driven naming for models and fields
- Explicit relations using
@relation - Normalized structures where appropriate
- Soft deletes via
deletedAtfield - Native type decorators for database-specific types
Client Usage
- Always use type-safe Prisma client operations
- Use transactions for complex flows
- Implement middleware for logging, soft deletes, and auditing
- Use
selectandincludejudiciously to avoid over-fetching
Migrations
- Create descriptive migrations with clear naming
- Never modify existing migrations
- Ensure idempotency for all migrations
- Test migrations on staging before production
Error Handling
- Catch
PrismaClientKnownRequestErrorfor constraint violations - Handle
PrismaClientUnknownRequestErrorfor unexpected database errors - Validate with
PrismaClientValidationErrorfor schema mismatches
Quality Standards
- Avoid N+1 queries through proper eager loading
- Test with in-memory databases for speed
- Mock Prisma client for unit test isolation
- Never expose raw Prisma clients in APIs
- Validate all user inputs before database operations
- Follow SOLID principles with composition over inheritance
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.