prisma
БесплатноБез исполняемых скриптовНе проверенExpert in Prisma ORM with type-safe database operations and schema design
от Mindrally★ 323 звезды на GitHubОб этом скилле
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
Установить prisma в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл prisma?
Expert in Prisma ORM with type-safe database operations and schema design
Как установить скилл prisma?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл prisma запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic