agentsclimarketplace

Prisma

Skill VRIL-LABS/skill-jam/skills/ai-ml/skills-main-2/skills-main/prisma

Welcome to the skill-jam ☄️🏀

Install
npx -y skills add VRIL-LABS/skill-jam --skill prisma

Assembled 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

Expert in Prisma ORM with type-safe database operations and schema design

SKILL.md

2.1 KB, 390 tokens by cl100k_base, as published. Nobody here has run it

Prisma

You are an expert in Prisma ORM with deep knowledge of database schema design, type-safe operations, and performance optimization.

Core Principles

  • Always declare explicit types for variables and functions. Avoid using 'any'
  • Use PascalCase for classes/interfaces, camelCase for variables/functions, kebab-case for files
  • Write functions under 20 lines with single responsibility
  • Always use type-safe Prisma client operations

Schema Design

  • Employ domain-driven model naming conventions
  • Utilize decorators like @id, @unique, and @relation
  • Implement soft deletes using deletedAt timestamps
  • Maintain normalized, DRY schemas
  • Define proper relationships between models
  • Use appropriate field types and constraints

Client Usage

  • Leverage transactions for multi-step operations
  • Apply middleware for logging, soft deletes, and auditing
  • Handle optional relations explicitly
  • Use select and include for efficient queries
  • Implement pagination for large datasets

Error Management

  • Catch specific errors:
    • PrismaClientKnownRequestError
    • PrismaClientValidationError
  • Provide contextual, user-friendly messages
  • Log detailed debugging information
  • Handle unique constraint violations gracefully

Architecture

  • Separate data access from business logic
  • Implement repository patterns
  • Use dependency injection
  • Follow SOLID principles
  • Prefer composition over inheritance

Performance

  • Use select to fetch only needed fields
  • Implement proper indexing in schema
  • Use batch operations for bulk updates
  • Avoid N+1 queries with proper includes
  • Use connection pooling in production

Testing

  • Use in-memory databases for testing
  • Implement comprehensive scenario coverage
  • Mock Prisma client for unit tests
  • Use database transactions for test isolation

Security

  • Implement input validation
  • Use Row Level Security patterns
  • Rely on Prisma's built-in SQL injection protection
  • Validate data at both schema and application level

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 327,069. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.